[WebAssembly] call_indirect issues table number relocs
authorAndy Wingo <wingo@igalia.com>
Fri, 12 Feb 2021 10:22:13 +0000 (11:22 +0100)
committerAndy Wingo <wingo@igalia.com>
Mon, 1 Mar 2021 15:49:00 +0000 (16:49 +0100)
commit2632ba6a358a62c5cbaddc141de81b756b68698f
tree2b1d689a5c3b4bd072f1c4d62a738d3254b928f0
parentb62928b21ec8c8c5f41c7b30adc14bbd027c908c
[WebAssembly] call_indirect issues table number relocs

If the reference-types feature is enabled, call_indirect will explicitly
reference its corresponding function table via TABLE_NUMBER
relocations against a table symbol.

Also, as before, address-taken functions can also cause the function
table to be created, only with reference-types they additionally cause a
symbol table entry to be emitted.

Differential Revision: https://reviews.llvm.org/D90948
22 files changed:
lld/test/wasm/compress-relocs.ll
llvm/include/llvm/MC/MCSymbolWasm.h
llvm/lib/MC/WasmObjectWriter.cpp
llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp
llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyInstPrinter.cpp
llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
llvm/lib/Target/WebAssembly/WebAssemblyFastISel.cpp
llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
llvm/lib/Target/WebAssembly/WebAssemblyInstrCall.td
llvm/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp
llvm/lib/Target/WebAssembly/WebAssemblyUtilities.cpp
llvm/lib/Target/WebAssembly/WebAssemblyUtilities.h
llvm/test/CodeGen/WebAssembly/function-pointer64.ll
llvm/test/CodeGen/WebAssembly/multivalue.ll
llvm/test/MC/WebAssembly/basic-assembly.s
llvm/test/MC/WebAssembly/call-indirect-relocs.s [new file with mode: 0644]
llvm/test/MC/WebAssembly/function-alias.ll
llvm/test/MC/WebAssembly/reloc-code.ll
llvm/test/MC/WebAssembly/reloc-pic.s
llvm/test/MC/WebAssembly/tail-call-encodings.s
llvm/test/MC/WebAssembly/type-index.s
llvm/test/MC/WebAssembly/weak-alias.s