[lld] b52fc59 - [WebAssembly] Fixed memory.init always using 64-bit ptr
Wouter van Oortmerssen via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 12 12:25:01 PDT 2020
Author: Wouter van Oortmerssen
Date: 2020-08-12T12:23:36-07:00
New Revision: b52fc59e17044eecdf009f46825f2f44851a3e1d
URL: https://github.com/llvm/llvm-project/commit/b52fc59e17044eecdf009f46825f2f44851a3e1d
DIFF: https://github.com/llvm/llvm-project/commit/b52fc59e17044eecdf009f46825f2f44851a3e1d.diff
LOG: [WebAssembly] Fixed memory.init always using 64-bit ptr
(because the is64 flag was tested incorrectly in LLD).
Added:
Modified:
lld/wasm/Writer.cpp
Removed:
################################################################################
diff --git a/lld/wasm/Writer.cpp b/lld/wasm/Writer.cpp
index dddecad4ac53..495050c0b631 100644
--- a/lld/wasm/Writer.cpp
+++ b/lld/wasm/Writer.cpp
@@ -838,7 +838,7 @@ void Writer::createInitMemoryFunction() {
for (const OutputSegment *s : segments) {
if (needsPassiveInitialization(s)) {
// destination address
- if (config->is64) {
+ if (config->is64.getValueOr(false)) {
writeI64Const(os, s->startVA, "destination address");
} else {
writeI32Const(os, static_cast<int32_t>(s->startVA),
More information about the llvm-commits
mailing list