[WebAssembly] Encode block signatures as SLEB instead of ULEB
Use SLEB (varint) for block_type immediates in accordance with the spec. Patch by Yury Delendik llvm-svn: 300490
This commit is contained in:
parent
86321b2bc8
commit
f7a4f3dd95
|
@ -94,6 +94,8 @@ void WebAssemblyMCCodeEmitter::encodeInstruction(
|
|||
MCFixupKind(WebAssembly::fixup_code_global_index), MI.getLoc()));
|
||||
++MCNumFixups;
|
||||
encodeULEB128(uint64_t(MO.getImm()), OS);
|
||||
} else if (Info.OperandType == WebAssembly::OPERAND_SIGNATURE) {
|
||||
encodeSLEB128(int64_t(MO.getImm()), OS);
|
||||
} else {
|
||||
encodeULEB128(uint64_t(MO.getImm()), OS);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue