We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 84b0266 commit 554a2faCopy full SHA for 554a2fa
llvm/lib/MC/WasmObjectWriter.cpp
@@ -1022,7 +1022,8 @@ void WasmObjectWriter::writeElemSection(
1022
encodeULEB128(TableNumber, W->OS); // the table number
1023
1024
// init expr for starting offset
1025
- W->OS << char(wasm::WASM_OPCODE_I32_CONST);
+ W->OS << char(is64Bit() ? wasm::WASM_OPCODE_I64_CONST
1026
+ : wasm::WASM_OPCODE_I32_CONST);
1027
encodeSLEB128(InitialTableOffset, W->OS);
1028
W->OS << char(wasm::WASM_OPCODE_END);
1029
llvm/test/MC/WebAssembly/reloc-pic64.s
@@ -110,7 +110,7 @@ hidden_func:
110
# CHECK-NEXT: - Type: ELEM
111
# CHECK-NEXT: Segments:
112
# CHECK-NEXT: Offset:
113
-# CHECK-NEXT: Opcode: I32_CONST
+# CHECK-NEXT: Opcode: I64_CONST
114
# CHECK-NEXT: Value: 1
115
# CHECK-NEXT: Functions: [ 5 ]
116
# CHECK-NEXT: - Type: DATACOUNT
0 commit comments