Stream: git-wasmtime

Topic: wasmtime / PR #7494 Use scratch XMM register for spilling...


view this post on Zulip Wasmtime GitHub notifications bot (Nov 07 2023 at 15:38):

jeffcharles opened PR #7494 from jeffcharles:winch-spilled-floats-fix to bytecodealliance:main:

<!--
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
-->
I observed an assertion failure of assertion failed: self.sp_offset == locals_size in the epilogue function when there's a float on the value stack and a spill is triggered when using Winch. When we spill, we use the scratch register which results in 8 bytes being allocated on the stack and when we pop the float to return that value, we only free 4 bytes because it's a float. This changes the spilling behaviour to use a floating point scratch register instead so we increment the stack by the same amount we will decrement it by when popping the function result.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 07 2023 at 15:38):

jeffcharles requested fitzgen for a review on PR #7494.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 07 2023 at 15:38):

jeffcharles requested wasmtime-compiler-reviewers for a review on PR #7494.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 07 2023 at 15:58):

saulecabrera submitted PR review:

Looks good to me, thanks! FWIW (as discussed offline) as part of my work on multi-value I'm changing the push/pop behaviour to be type-sized. But this change is good enough to address the bug.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 07 2023 at 16:45):

saulecabrera merged PR #7494.


Last updated: Oct 23 2024 at 20:03 UTC