saulecabrera opened PR #8886 from saulecabrera:save-state-before-br_if
to bytecodealliance:main
:
Fixes: https://github.com/bytecodealliance/wasmtime/issues/8848
Similar to all the control instructions, any state must be explicitly saved before emitting the code for
br_if
.This commit ensures that live locals and registers are explicilty saved before emitting the code for
br_if
. Prior to this commit, live locals and registers were not saved every time causing incorrect behavior in cases where the calculation of the conditional argument didn't trigger a spill.This change introduces the explicit spill after calculating the branch condition argument to minimize memory traffic in case the conditional is already in a 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
-->
saulecabrera requested abrown for a review on PR #8886.
saulecabrera requested wasmtime-compiler-reviewers for a review on PR #8886.
saulecabrera requested fitzgen for a review on PR #8886.
saulecabrera requested wasmtime-core-reviewers for a review on PR #8886.
Last updated: Nov 22 2024 at 16:03 UTC