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 inaddress_from_sp
is incorrect. To fix this, we now reset the internal stack offset to0
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:
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
-->
elliottt requested abrown for a review on PR #8054.
elliottt requested wasmtime-compiler-reviewers for a review on PR #8054.
elliottt requested saulecabrera for a review on PR #8054.
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:
- saulecabrera: winch
To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.
Learn more.
</details>
lpereira submitted PR review:
:shipit:
elliottt closed without merge PR #8054.
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