[all-commits] [llvm/llvm-project] 396d25: [WebAssembly] Don't assert on a non-zero call_indi...
Jonas Devlieghere via All-commits
all-commits at lists.llvm.org
Thu Jul 16 16:03:46 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 396d2555ddac2d6a4885ec3ad2c73fcee00f5bd3
https://github.com/llvm/llvm-project/commit/396d2555ddac2d6a4885ec3ad2c73fcee00f5bd3
Author: Jonas Devlieghere <jonas at devlieghere.com>
Date: 2026-07-16 (Thu, 16 Jul 2026)
Changed paths:
M llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyInstPrinter.cpp
M llvm/test/MC/Disassembler/WebAssembly/wasm.txt
Log Message:
-----------
[WebAssembly] Don't assert on a non-zero call_indirect table index (#210120)
WebAssemblyInstPrinter::printInst asserted that a non-symbol table
operand of call_indirect is the immediate 0, on the assumption that only
MVP single-table compilation units reach the printer. That is true for
code generated by the compiler, but the printer is shared by the
disassembler.
The disassembler must produce output for any byte sequence it is pointed
at and shouldn't abort on the operand values it decodes. A non-zero
immediate table index is both a valid encoding, from a multi-table
module, and a routine result of best-effort disassembly of a range that
is not all code, which is how I hit this in LLDB.
Print the table operand when it is a symbol or a non-zero immediate, and
omit it only for the implicit table 0. This makes the output lossless
and unambiguous, matching how a table symbol is already printed. MVP and
table-symbol output are unchanged, so there is no effect on the
compiler's assembly.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list