Stream: git-wasmtime

Topic: wasmtime / PR #8886 Save state before emitting `br_if`


view this post on Zulip Wasmtime GitHub notifications bot (Jun 28 2024 at 16:30):

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:

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 (Jun 28 2024 at 16:30):

saulecabrera requested abrown for a review on PR #8886.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 28 2024 at 16:30):

saulecabrera requested wasmtime-compiler-reviewers for a review on PR #8886.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 28 2024 at 16:30):

saulecabrera requested fitzgen for a review on PR #8886.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 28 2024 at 16:30):

saulecabrera requested wasmtime-core-reviewers for a review on PR #8886.


Last updated: Nov 22 2024 at 16:03 UTC