Stream: git-wasmtime

Topic: wasmtime / PR #13583 Cranelift: add `_imm_s`/`_imm_u` ins...


view this post on Zulip Wasmtime GitHub notifications bot (Jun 06 2026 at 18:07):

aniasse opened PR #13583 from aniasse:cranelift-imm-s-u-builders to bytecodealliance:main:

Fixes #13529. Follow-up to the discussion in #13527.

Today the generated <inst>_imm builder picks sign- vs zero-extension from
a hardcoded list of opcodes in build_imm_const, which is easy to trip on.
This adds explicit <inst>_imm_s (sign-extend) and <inst>_imm_u
(zero-extend) variants instead, and build_imm_const now takes a plain
signed: bool. The extension only matters for i128; below that the masked
immediate is the same either way.

<inst>_imm stays for back-compat but is now #[deprecated] in favor of the
explicit ones. I migrated the ~100 in-tree callers over by their historical
signedness — that part is a no-op (nothing internal uses these on i128),
which is why the diff is big but boring.

Skipped the SImm128/UImm128 newtype idea for now since the _s/_u
names already carry the signedness — can do it as a follow-up if you want.

Tested with the cranelift-codegen/frontend suites and the filetests, plus a
new unit test for the i128 extension behavior.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 06 2026 at 18:07):

aniasse requested cfallin for a review on PR #13583.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 06 2026 at 18:07):

aniasse requested wasmtime-compiler-reviewers for a review on PR #13583.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 06 2026 at 20:05):

github-actions[bot] added the label cranelift on PR #13583.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 06 2026 at 20:05):

github-actions[bot] added the label cranelift:meta on PR #13583.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 08 2026 at 15:59):

:thumbs_up: cfallin submitted PR review:

Thanks very much!

view this post on Zulip Wasmtime GitHub notifications bot (Jun 08 2026 at 15:59):

cfallin added PR #13583 Cranelift: add _imm_s/_imm_u instruction builder helpers to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 08 2026 at 16:23):

:check: cfallin merged PR #13583.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 08 2026 at 16:23):

cfallin removed PR #13583 Cranelift: add _imm_s/_imm_u instruction builder helpers from the merge queue.


Last updated: Jul 29 2026 at 05:03 UTC