alexcrichton requested abrown for a review on PR #11083.
alexcrichton requested wasmtime-compiler-reviewers for a review on PR #11083.
alexcrichton opened PR #11083 from alexcrichton:x64-shift-m1 to bytecodealliance:main:
There are custom encodings of shift/rotate instructions when the amount being shifted/rotated by is 1, and these encodings are slightly smaller than the default encodings. This commit updates instruction selection to use these encodings when shifts-by-immediate are encountered.
Note that these new instructions in the assembler all have custom
Displayimplementations. The Capstone disassembly is a bit odd where the immediate is printed as$1instead of$0x1and additionally the immediate isn't printed at all when the thing-to-be-shifted is a memory location.<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
abrown submitted PR review:
Nice!
abrown merged PR #11083.
Last updated: Dec 06 2025 at 07:03 UTC