Stream: git-wasmtime

Topic: wasmtime / PR #10759 asm: implement write-only operands


view this post on Zulip Wasmtime GitHub notifications bot (May 09 2025 at 20:54):

abrown opened PR #10759 from abrown:asm-write to bytecodealliance:main:

This change adds support to the new assembler for write-only operands. This implementation appeared first in [#10754] but is split out here to unblock implementation of instructions that require it: multiplication, conversions, moves, etc. This starts roughly the same as what was implemented for write-only XMMs in [#10754] but includes support for write-only GPRs as well and generates the temporary registers which are needed.

[#10754]: https://github.com/bytecodealliance/wasmtime/pull/10754

<!--
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 (May 09 2025 at 20:54):

abrown requested fitzgen for a review on PR #10759.

view this post on Zulip Wasmtime GitHub notifications bot (May 09 2025 at 20:54):

abrown requested wasmtime-compiler-reviewers for a review on PR #10759.

view this post on Zulip Wasmtime GitHub notifications bot (May 09 2025 at 21:18):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (May 09 2025 at 21:18):

alexcrichton created PR review comment:

Should this get collapsed into ReadWrite as well below? This has the same handling for Reg and all the other cases look applicable for one-operand-written instructions too (e.g. if something stores in memory or outputs to a fixed register)

view this post on Zulip Wasmtime GitHub notifications bot (May 09 2025 at 21:37):

abrown submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (May 09 2025 at 21:37):

abrown created PR review comment:

Unfortunately, there's slightly different behavior for retrieving the underlying Cranelift type. The ReadWrite variant needs to access the write field; this one should actually be doing a as_ref().to_reg() (let me fix that). I think in the fullness of time we will want to merge some things like I did over in the assembler generator but let's leave this as-is until we have a few more write-only instructions implemented.

view this post on Zulip Wasmtime GitHub notifications bot (May 09 2025 at 21:38):

abrown updated PR #10759.

view this post on Zulip Wasmtime GitHub notifications bot (May 09 2025 at 22:20):

abrown merged PR #10759.


Last updated: Dec 06 2025 at 07:03 UTC