Stream: git-wasmtime

Topic: wasmtime / PR #8054 winch: Fix sp_offset usage when calle...


view this post on Zulip Wasmtime GitHub notifications bot (Mar 06 2024 at 17:39):

elliottt opened PR #8054 from elliottt:trevor/winch-clobber-sp-offset to bytecodealliance:main:

If non-empty callee-save registers are passed to the winch MacroAssembler::prologue function, the stack offset used when computing the value in address_from_sp is incorrect. To fix this, we now reset the internal stack offset to 0 after the prologue, to ensure that we're skipping the callee save space. The prologue stack offset is restored for the epilogue, ensuring that the prologue and epilogue have a consistent view of the state of the stack when they run.

<!--
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 06 2024 at 17:39):

elliottt requested abrown for a review on PR #8054.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 06 2024 at 17:39):

elliottt requested wasmtime-compiler-reviewers for a review on PR #8054.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 06 2024 at 17:40):

elliottt requested saulecabrera for a review on PR #8054.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 06 2024 at 19:44):

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

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 (Mar 06 2024 at 21:20):

lpereira submitted PR review:

:shipit:

view this post on Zulip Wasmtime GitHub notifications bot (Mar 06 2024 at 22:40):

elliottt closed without merge PR #8054.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 06 2024 at 22:40):

elliottt commented on PR #8054:

After discussing things with @cfallin, I think I'm going to close this PR and pursue restoring the old "save everything" calling convention in cranelift. That would match winch's existing calling convention, and would avoid the problems this PR solves in a different way, as we wouldn't have any trampolines in winch, which is what introduces the issues with address_from_sp in the first place.


Last updated: Dec 23 2024 at 12:05 UTC