saulecabrera requested fitzgen for a review on PR #10989.
saulecabrera opened PR #10989 from saulecabrera:winch-isa-dependent-imm to bytecodealliance:main:
This patch is best reviewed commit by commit.
This is a follow-up to https://github.com/bytecodealliance/wasmtime/pull/10888
Scratch registers are used throughout Winch's codebase to handle constant values that cannot be directly encoded in specific instructions. Since the encoding rules are ISA-specific, selecting instructions for these operations often requires scratch registers. Ideally, these temporary registers should be acquired without adding any register pressure to prevent value spilling.
The objective of this change is to make it generally safer to work with scratch registers and prevent accidental clobbering of such registers.
<!--
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
-->
saulecabrera requested wasmtime-compiler-reviewers for a review on PR #10989.
saulecabrera requested wasmtime-core-reviewers for a review on PR #10989.
alexcrichton created PR review comment:
Would it make sense to tag this as
#[deprecated]and annotate the remaining uses with#[expect(deprecated, reason = "...")]?
alexcrichton created PR review comment:
Would it make sense to have
add_irmethods onmasmwhich encapsulate this pattern? (it looks similar below inaddfor example)
alexcrichton submitted PR review:
This all look sound and good to me, definitely makes handling scratch registers less brittle!
github-actions[bot] commented on PR #10989:
Subscribe to Label Action
cc @saulecabrera
<details>
This issue or pull request has been labeled: "winch"Thus the following users have been cc'd because of the following labels:
- saulecabrera: winch
To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.
Learn more.
</details>
saulecabrera updated PR #10989.
saulecabrera submitted PR review.
saulecabrera created PR review comment:
saulecabrera submitted PR review.
saulecabrera created PR review comment:
Yeah, great suggestion, added in https://github.com/bytecodealliance/wasmtime/pull/10989/commits/3508ec7bcaf7b3b4bbad8e3eb8fe33a984ec53c6
saulecabrera has enabled auto merge for PR #10989.
saulecabrera merged PR #10989.
Last updated: Dec 06 2025 at 07:03 UTC