Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aarch64: Add support for the extr instruction #10229

Merged
merged 3 commits into from
Feb 14, 2025

Conversation

alexcrichton
Copy link
Member

This is pattern-matched from bor patterns of a specific shape. I found this when doing some benchmarking of Wasmtime on aarch64 and I saw LLVM generating this pattern but Wasmtime didn't. I didn't perform any benchmarking between wasmtime/native though, so I'm just relying on this reducing the number of instructions to probably be a wee bit faster.

This is pattern-matched from `bor` patterns of a specific shape. I found
this when doing some benchmarking of Wasmtime on aarch64 and I saw LLVM
generating this pattern but Wasmtime didn't. I didn't perform any
benchmarking between wasmtime/native though, so I'm just relying on this
reducing the number of instructions to probably be a wee bit faster.
@alexcrichton alexcrichton requested review from a team as code owners February 13, 2025 21:06
@alexcrichton alexcrichton requested review from cfallin and dicej and removed request for a team February 13, 2025 21:06
Copy link
Member

@cfallin cfallin left a comment

Choose a reason for hiding this comment

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

Good find, thanks!

@github-actions github-actions bot added cranelift Issues related to the Cranelift code generator cranelift:area:aarch64 Issues related to AArch64 backend. isle Related to the ISLE domain-specific language labels Feb 13, 2025
Copy link

Subscribe to Label Action

cc @cfallin, @fitzgen

This issue or pull request has been labeled: "cranelift", "cranelift:area:aarch64", "isle"

Thus the following users have been cc'd because of the following labels:

  • cfallin: isle
  • fitzgen: isle

To subscribe or unsubscribe from this label, edit the .github/subscribe-to-label.json configuration file.

Learn more.

@alexcrichton alexcrichton added this pull request to the merge queue Feb 14, 2025
Merged via the queue into bytecodealliance:main with commit 0180c3a Feb 14, 2025
69 checks passed
@alexcrichton alexcrichton deleted the a64-extr branch February 14, 2025 01:44
alexcrichton added a commit to alexcrichton/wasmtime that referenced this pull request Feb 14, 2025
This commit is similar to bytecodealliance#10229 except that it uses the x64 `shld`
instruction. This instruction was not previously supported by Cranelift
so I opted to add support via the new `cranelift-assembler-x64` crate
instead of trying to fit it into the existing `emit.rs`/`MInst`
infrastructure. This was a good learning experience for myself and was
also fun to do!
alexcrichton added a commit to alexcrichton/wasmtime that referenced this pull request Feb 14, 2025
This commit is similar to bytecodealliance#10229 except that it uses the x64 `shld`
instruction. This instruction was not previously supported by Cranelift
so I opted to add support via the new `cranelift-assembler-x64` crate
instead of trying to fit it into the existing `emit.rs`/`MInst`
infrastructure. This was a good learning experience for myself and was
also fun to do!
github-merge-queue bot pushed a commit that referenced this pull request Feb 14, 2025
This commit is similar to #10229 except that it uses the x64 `shld`
instruction. This instruction was not previously supported by Cranelift
so I opted to add support via the new `cranelift-assembler-x64` crate
instead of trying to fit it into the existing `emit.rs`/`MInst`
infrastructure. This was a good learning experience for myself and was
also fun to do!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cranelift:area:aarch64 Issues related to AArch64 backend. cranelift Issues related to the Cranelift code generator isle Related to the ISLE domain-specific language
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants