Skip to content

Conversation

@willieyz
Copy link
Collaborator

@willieyz willieyz commented Oct 14, 2025

  • During PR Add instruction support for Curve25519 armv7-M optimization tasks #341, we noticed that some shifted immediate values need to be handled.

  • This PR adds support for simplifying shift operators (<< and >>) applied to immediate values.
    For example: movs r0, #38 << 1 will be simplified to movs r0, #76.

  • Apply on following architecture model:

    • aarch_neon
    • arch_v7m
    • arch_v81m

@willieyz willieyz force-pushed the simplify-shifted-immediate branch 2 times, most recently from 72e5ba4 to a5a3e71 Compare October 14, 2025 07:35
@willieyz willieyz marked this pull request as ready for review October 14, 2025 10:21
- This commit add the "<<", ">>" support for immediate value.
  e.g., "movs r0,#38<<1"

- this simplify support all three architecture: aarch64_neon, arch_v7m,
  arch_v81m.

Signed-off-by: willieyz <[email protected]>
@willieyz willieyz force-pushed the simplify-shifted-immediate branch from a5a3e71 to 95e558e Compare October 15, 2025 03:01
Copy link
Collaborator

@mkannwischer mkannwischer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @willieyz!

@mkannwischer mkannwischer merged commit 3353411 into main Oct 15, 2025
38 checks passed
@mkannwischer mkannwischer deleted the simplify-shifted-immediate branch October 15, 2025 04:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants