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:
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 requested fitzgen for a review on PR #10759.
abrown requested wasmtime-compiler-reviewers for a review on PR #10759.
alexcrichton submitted PR review.
alexcrichton created PR review comment:
Should this get collapsed into
ReadWriteas well below? This has the same handling forRegand 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)
abrown submitted PR review.
abrown created PR review comment:
Unfortunately, there's slightly different behavior for retrieving the underlying Cranelift type. The
ReadWritevariant needs to access thewritefield; this one should actually be doing aas_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.
abrown updated PR #10759.
abrown merged PR #10759.
Last updated: Dec 06 2025 at 07:03 UTC