[PATCH] D90948: [WebAssembly] call_indirect issues table number relocs
Andy Wingo via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 15 06:11:19 PST 2021
wingo added a comment.
Well, this patch was a bit of a journey! But finally it's ready, having calved off a number of precursor patches that landed already. Notably we needed to fix wasm-ld to be able to understand table symbols, before emitting them here.
So in this patch, we add a "table" operand to `call_indirect`, causing `call_indirect` instructions to emit `TABLE_NUMBER` relocs. We add support for this operand in the asm parser; if the table is not given, it defaults to __indirect_function_table as usual. Likewise, lowering in codegen synthesizes a reference to the `__indirect_function_table` when making `call_indirect` MC instructions. The end result is that MC and CodeGen tests end up making more relocs, the `call_indirect` instructions have 5-byte LEBs for the table number, and there are symbols in the output for tables.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D90948/new/
https://reviews.llvm.org/D90948
More information about the llvm-commits
mailing list