Stream: git-wasmtime

Topic: wasmtime / PR #5460 support select_spectre_guard and sele...


view this post on Zulip Wasmtime GitHub notifications bot (Dec 16 2022 at 20:26):

cfallin edited PR #5460 from x64-select-spectre-guard-i128 to main:

Fixes #5452.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Dec 16 2022 at 20:27):

cfallin edited PR #5460 from x64-select-spectre-guard-i128 to main:

Fixes #5452.
Fixes #5453.

On riscv64, there is apparently an autoconversion from ValueRegs to
Reg that takes just the low register [0], and removing this conversion
causes 48 errors. As a result of this, select with an i128 condition
was silently miscompiling, testing only the low 64 bits. We should
remove this autoconversion to ensure we aren't missing any other silent
truncations, but for now this PR just adds the explicit I128 logic for
select / select_spectre_guard.

[0] https://github.com/bytecodealliance/wasmtime/blob/d9fdbfd50e653f93403405e4c4fd56cb77d034ae/cranelift/codegen/src/isa/riscv64/inst.isle#L1762

view this post on Zulip Wasmtime GitHub notifications bot (Dec 16 2022 at 20:27):

cfallin submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 16 2022 at 20:27):

cfallin created PR review comment:

Updated!

view this post on Zulip Wasmtime GitHub notifications bot (Dec 16 2022 at 20:40):

jameysharp submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 16 2022 at 20:40):

jameysharp submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 16 2022 at 20:40):

jameysharp created PR review comment:

If I'm not mistaken, I think you're fixing #5200 as well here.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 16 2022 at 20:40):

jameysharp created PR review comment:

If I'm not mistaken, I think you're fixing #5199 as well here.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 16 2022 at 20:47):

cfallin updated PR #5460 from x64-select-spectre-guard-i128 to main.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 16 2022 at 20:47):

cfallin edited PR #5460 from x64-select-spectre-guard-i128 to main:

Fixes #5199.
Fixes #5200.
Fixes #5452.
Fixes #5453.

On riscv64, there is apparently an autoconversion from ValueRegs to
Reg that takes just the low register [0], and removing this conversion
causes 48 errors. As a result of this, select with an i128 condition
was silently miscompiling, testing only the low 64 bits. We should
remove this autoconversion to ensure we aren't missing any other silent
truncations, but for now this PR just adds the explicit I128 logic for
select / select_spectre_guard.

[0] https://github.com/bytecodealliance/wasmtime/blob/d9fdbfd50e653f93403405e4c4fd56cb77d034ae/cranelift/codegen/src/isa/riscv64/inst.isle#L1762

view this post on Zulip Wasmtime GitHub notifications bot (Dec 16 2022 at 20:47):

cfallin submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 16 2022 at 20:47):

cfallin created PR review comment:

Updated!

view this post on Zulip Wasmtime GitHub notifications bot (Dec 16 2022 at 20:47):

cfallin created PR review comment:

Updated description, thanks!

view this post on Zulip Wasmtime GitHub notifications bot (Dec 16 2022 at 20:47):

cfallin submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 16 2022 at 20:48):

jameysharp submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 16 2022 at 22:18):

cfallin merged PR #5460.


Last updated: Dec 23 2024 at 12:05 UTC