summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorDerek Schuff <dschuff@google.com>2017-04-17 20:28:28 +0000
committerDerek Schuff <dschuff@google.com>2017-04-17 20:28:28 +0000
commitf7a4f3dd95b907b693a986cb0cf076fa1e93e276 (patch)
treea0a4e2778d2176635c2db7e2dbb0912b7eed6d68 /llvm
parent86321b2bc8350428d0b2eb81fff09d49098e9359 (diff)
downloadbcm5719-llvm-f7a4f3dd95b907b693a986cb0cf076fa1e93e276.tar.gz
bcm5719-llvm-f7a4f3dd95b907b693a986cb0cf076fa1e93e276.zip
[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
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCCodeEmitter.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCCodeEmitter.cpp b/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCCodeEmitter.cpp
index a0b00894749..544cd653fd7 100644
--- a/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCCodeEmitter.cpp
+++ b/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCCodeEmitter.cpp
@@ -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);
}
OpenPOWER on IntegriCloud