You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit fixes a mistake with our inline assembly for resumption of
an exception on various platforms. This was detected during the
development of #11592 for riscv64 but I believe this affects other
platforms too. The basic issue is that our inline assembly blocks are
all clobbering the frame pointer because that's what wasm uses but we
have no constraint against preventing any input to these inline assembly
blocks from being allocated into the frame pointer. This means that if
the destination to jump to is allocated to the frame pointer register
then we'll jump to wasm's old frame pointer, no the actual destination,
because the frame pointer register is clobbered before jumping. An
example of this for riscv64 is on [godbolt] where the `s0` register, the
frame pointer on riscv64, is clobbered and then jumped to.
The fix in this PR is to manually allocate all registers. All input
operands are allocated to explicit registers rather than letting the
compiler pick which register they're in. This ensures no overlap with
the frame pointer and fixes the test in question. Note that s390x isn't
updated here as it doesn't have a frame pointer.
[godbolt]: https://godbolt.org/z/E9vWb9coq
0 commit comments