elliottt opened PR #7979 from elliottt:trevor/winch-trampoline-stack-checks
to bytecodealliance:main
:
Stack overflow checking in trampolines is slightly different than when translating arbitrary wasm functions, as the vmctx isn't necessarily in the pinned register yet. To avoid bloating the function prologue, I opted to parameterize the
MacroAssembler::check_stack
function on the register that currently contains thevmctx
. This change allows the trampolines to pass the current location ofvmctx
instead of forcing it to live in the pinned register.
<!--
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 fitzgen for a review on PR #7979.
elliottt requested wasmtime-compiler-reviewers for a review on PR #7979.
elliottt requested saulecabrera for a review on PR #7979.
elliottt edited PR #7979:
Stack overflow checking in trampolines is slightly different than when translating arbitrary wasm functions, as the vmctx isn't necessarily in the pinned register yet. To avoid bloating the function prologue, I opted to parameterize the
MacroAssembler::check_stack
function on the register that currently contains thevmctx
. This change allows the trampolines to pass the current location ofvmctx
instead of forcing it to live in the pinned register.The first commit implements this change, while the second was a cleanup that I made while I was editing these files: I wanted to make more consistent use of the derived float register byte-size used while determining the space required for clobbers.
<!--
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
-->
saulecabrera submitted PR review:
Looks great to me, thanks!
elliottt merged PR #7979.
Last updated: Dec 23 2024 at 12:05 UTC