Stream: git-wasmtime

Topic: wasmtime / PR #12708 winch(aarch64): Improve addressing m...


view this post on Zulip Wasmtime GitHub notifications bot (Mar 03 2026 at 18:01):

saulecabrera opened PR #12708 from saulecabrera:winch-improve-addressing-modes to bytecodealliance:main:

Prior to this commit, Winch's Address representation relied on the general (reg, offset) form for offset-based addressing, leaving the materialization of the addressing mode to Cranelift. This approach led to the following bug found by the fuzzer:

When offsets cannot be encoded as a 9-bit signed immediate offset or a 12-bit unsigned immediate offset with scaling, the offset must be loaded into a register and the addressing mode is transformed to its (reg, reg) form. Cranelift's addressing mode materialization currently uses x16 as a scratch register to load the offset; even though both Cranelift and Winch use x16 as a scratch register, its usage is not in sync, therefore clobbers can happen.

This commit improves addressing modes by requiring early materialization of addressing modes into their respective Cranelift variants.

<!--
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 (Mar 03 2026 at 18:01):

saulecabrera requested fitzgen for a review on PR #12708.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 03 2026 at 18:01):

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

view this post on Zulip Wasmtime GitHub notifications bot (Mar 03 2026 at 18:01):

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

view this post on Zulip Wasmtime GitHub notifications bot (Mar 03 2026 at 18:05):

saulecabrera submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 03 2026 at 18:05):

saulecabrera created PR review comment:

I removed this from the top-level Address since it's only used here, which removes one level of indirection.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 03 2026 at 20:51):

github-actions[bot] added the label winch on PR #12708.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 03 2026 at 20:52):

github-actions[bot] commented on PR #12708:

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>


Last updated: Mar 23 2026 at 16:19 UTC