Stream: git-wasmtime

Topic: wasmtime / PR #9003 Cranelift(x64): Fix lowering for `sto...


view this post on Zulip Wasmtime GitHub notifications bot (Jul 24 2024 at 17:57):

fitzgen opened PR #9003 from fitzgen:fix-rmw-and-floats-on-x64 to bytecodealliance:main:

x86-64 allows us to do these kinds of read-modify-write operations in one instruction in general, however we also need to ensure that the non-memory operand is in a GPR. Because Cranelift allows b{and,or,xor}s on floating point types, that means we might need to insert a move from an XMM to a GPR.

Found in https://github.com/bytecodealliance/wasmtime/pull/8941 but is actually unrelated to safepoints and stack maps, they just made this pattern more likely to occur. AFAICT, Wasm can't ever trigger this bug, and would only be something of concern for other CLIF producers.

<!--
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 (Jul 24 2024 at 17:57):

fitzgen requested cfallin for a review on PR #9003.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 24 2024 at 17:57):

fitzgen requested wasmtime-compiler-reviewers for a review on PR #9003.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 24 2024 at 18:17):

elliottt submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 24 2024 at 18:17):

elliottt created PR review comment:

Should this match against (RegisterClass.Gpr _) instead, to avoid potentially backtracking here instead of forcing the assertion failure in put_in_reg like before?

view this post on Zulip Wasmtime GitHub notifications bot (Jul 24 2024 at 23:11):

fitzgen updated PR #9003.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 24 2024 at 23:11):

fitzgen submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 24 2024 at 23:11):

fitzgen created PR review comment:

Good idea.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 24 2024 at 23:12):

fitzgen has enabled auto merge for PR #9003.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 24 2024 at 23:57):

elliottt submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 25 2024 at 00:28):

fitzgen merged PR #9003.


Last updated: Dec 23 2024 at 12:05 UTC