diff options
author | Sam Clegg <sbc@chromium.org> | 2018-03-01 18:06:21 +0000 |
---|---|---|
committer | Sam Clegg <sbc@chromium.org> | 2018-03-01 18:06:21 +0000 |
commit | 03e101f1b00d463d3a070a43a7ac8f13db291c37 (patch) | |
tree | 000e836f3e42c60f9803b35cc41f798471314bf3 /llvm/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp | |
parent | c6a75a69f15e42dd4c6b1a79f6d1a4e3df9f75ea (diff) | |
download | llvm-03e101f1b00d463d3a070a43a7ac8f13db291c37.zip llvm-03e101f1b00d463d3a070a43a7ac8f13db291c37.tar.gz llvm-03e101f1b00d463d3a070a43a7ac8f13db291c37.tar.bz2 |
[WebAssembly] Use uint8_t for single byte values to match the spec
The original BinaryEncoding.md document used to specify that
these values were `varint7`, but the official spec lists them
explicitly as single byte values and not LEB.
A similar change for wabt is in flight:
https://github.com/WebAssembly/wabt/pull/782
Differential Revision: https://reviews.llvm.org/D43921
llvm-svn: 326454
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp')
-rw-r--r-- | llvm/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp index c8afa39..ac2258a 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp +++ b/llvm/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp @@ -95,10 +95,10 @@ MCSymbol *WebAssemblyMCInstLower::GetExternalSymbolSymbol( // here; this method is precisely there for fetching the signatures of known // Clang-provided symbols. if (strcmp(Name, "__stack_pointer") == 0) { - wasm::ValType iPTR = - Subtarget.hasAddr64() ? wasm::ValType::I64 : wasm::ValType::I32; WasmSym->setType(wasm::WASM_SYMBOL_TYPE_GLOBAL); - WasmSym->setGlobalType(wasm::WasmGlobalType{int32_t(iPTR), true}); + WasmSym->setGlobalType(wasm::WasmGlobalType{ + Subtarget.hasAddr64() ? wasm::WASM_TYPE_I64 : wasm::WASM_TYPE_I32, + true}); return WasmSym; } |