[all-commits] [llvm/llvm-project] 96ef4f: Revert "[WebAssembly] call_indirect issues table n...

Sam Clegg via All-commits all-commits at lists.llvm.org
Tue Jan 19 15:11:30 PST 2021


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 96ef4f307df27f4e0946eb344bac2703017ad073
      https://github.com/llvm/llvm-project/commit/96ef4f307df27f4e0946eb344bac2703017ad073
  Author: Sam Clegg <sbc at chromium.org>
  Date:   2021-01-19 (Tue, 19 Jan 2021)

  Changed paths:
    M lld/test/wasm/call-indirect.ll
    M lld/test/wasm/compress-relocs.ll
    M lld/test/wasm/shared.ll
    M llvm/lib/MC/WasmObjectWriter.cpp
    M llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp
    M llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyInstPrinter.cpp
    M llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.h
    M llvm/lib/Target/WebAssembly/WebAssemblyFastISel.cpp
    M llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
    M llvm/lib/Target/WebAssembly/WebAssemblyInstrCall.td
    M llvm/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp
    M llvm/test/CodeGen/WebAssembly/function-pointer64.ll
    M llvm/test/CodeGen/WebAssembly/multivalue.ll
    M llvm/test/MC/WebAssembly/basic-assembly.s
    R llvm/test/MC/WebAssembly/call-indirect-relocs.s
    M llvm/test/MC/WebAssembly/reloc-code.ll
    M llvm/test/MC/WebAssembly/tail-call-encodings.s
    M llvm/test/MC/WebAssembly/type-index.s
    M llvm/test/MC/WebAssembly/weak-alias.s

  Log Message:
  -----------
  Revert "[WebAssembly] call_indirect issues table number relocs"

This reverts commit 418df4a6ab35d343cc0f2608c90a73dd9b8d0ab1.

This change broke emscripten tests, I believe because it started
generating 5-byte a wide table index in the call_indirect instruction.
Neither v8 nor wabt seem to be able to handle that.  The spec
currently says that this is single 0x0 byte and:

"In future versions of WebAssembly, the zero byte occurring in the
encoding of the call_indirectcall_indirect instruction may be used to
index additional tables."

So we need to revisit this change.  For backwards compat I guess
we need to guarantee that __indirect_function_table is always at
address zero.   We could also consider making this a single-byte
relocation with and assert if have more than 127 tables (for now).

Differential Revision: https://reviews.llvm.org/D95005




More information about the All-commits mailing list