Stream: git-wasmtime

Topic: wasmtime / PR #11083 x64: Optimize codegen of shift/rotat...


view this post on Zulip Wasmtime GitHub notifications bot (Jun 19 2025 at 22:51):

alexcrichton requested abrown for a review on PR #11083.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 19 2025 at 22:51):

alexcrichton requested wasmtime-compiler-reviewers for a review on PR #11083.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 19 2025 at 22:51):

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 Display implementations. The Capstone disassembly is a bit odd where the immediate is printed as $1 instead of $0x1 and 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:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (Jun 20 2025 at 01:49):

abrown submitted PR review:

Nice!

view this post on Zulip Wasmtime GitHub notifications bot (Jun 20 2025 at 02:12):

abrown merged PR #11083.


Last updated: Dec 06 2025 at 07:03 UTC