Stream: git-wasmtime

Topic: wasmtime / PR #12213 Cranelift: pulley: don't use call{1,...


view this post on Zulip Wasmtime GitHub notifications bot (Dec 23 2025 at 04:05):

cfallin opened PR #12213 from cfallin:fix-pulley-call1234 to bytecodealliance:main:

These Pulley instructions are an optimization: they incorporate moves from other registers to x0/x1/x2/x3 as part of the call itself.

This works fine for the default calling convention, but the logic that absorbs these moves and removes them from the list given to the rest of the VCode/ABI machinery embeds a tacit assumption: the argument registers are volatile (caller-saved). In particular, this is because the call{1,2,3,4} instructions are not marked as clobbering x0/x1/x2/x3 explicitly.

To fix this issue, this PR simply omits the magical folding that happens in the emission code. An alternative would be to try to add the clobbers to the special instructions, but actually we don't want these to be just "clobbers": we want the usual regalloc constraints to take effect and the values to be represented as continuing valid/live in the registers after return, and the proper way to do that is to leave the args on the call and let the regalloc operand pass add the fixed-reg operands.

Discovered while trying to land #12183.

<!--
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 (Dec 23 2025 at 04:05):

cfallin requested fitzgen for a review on PR #12213.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 23 2025 at 04:05):

cfallin requested wasmtime-compiler-reviewers for a review on PR #12213.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 23 2025 at 05:48):

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

Subscribe to Label Action

cc @cfallin, @fitzgen

<details>
This issue or pull request has been labeled: "cranelift", "isle"

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 (Dec 23 2025 at 15:55):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 23 2025 at 16:19):

alexcrichton merged PR #12213.


Last updated: Jan 09 2026 at 13:15 UTC