Stream: git-wasmtime

Topic: wasmtime / PR #10989 winch: Simplify constant handling, p...


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

saulecabrera requested fitzgen for a review on PR #10989.

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

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:

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 09 2025 at 18:41):

saulecabrera requested wasmtime-compiler-reviewers for a review on PR #10989.

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

saulecabrera requested wasmtime-core-reviewers for a review on PR #10989.

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

alexcrichton created PR review comment:

Would it make sense to tag this as #[deprecated] and annotate the remaining uses with #[expect(deprecated, reason = "...")]?

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

alexcrichton created PR review comment:

Would it make sense to have add_ir methods on masm which encapsulate this pattern? (it looks similar below in add for example)

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

alexcrichton submitted PR review:

This all look sound and good to me, definitely makes handling scratch registers less brittle!

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

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:

To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.

Learn more.
</details>

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

saulecabrera updated PR #10989.

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

saulecabrera submitted PR review.

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

saulecabrera created PR review comment:

Done in https://github.com/bytecodealliance/wasmtime/pull/10989/commits/3508ec7bcaf7b3b4bbad8e3eb8fe33a984ec53c6

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

saulecabrera submitted PR review.

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

saulecabrera created PR review comment:

Yeah, great suggestion, added in https://github.com/bytecodealliance/wasmtime/pull/10989/commits/3508ec7bcaf7b3b4bbad8e3eb8fe33a984ec53c6

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

saulecabrera has enabled auto merge for PR #10989.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 09 2025 at 23:15):

saulecabrera merged PR #10989.


Last updated: Dec 06 2025 at 07:03 UTC