[PATCH] D82130: [WebAssembly] Adding 64-bit versions of __stack_pointer and other globals

Wouter van Oortmerssen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 22 09:39:56 PDT 2020


aardappel marked 2 inline comments as done.
aardappel added a comment.

I'll likely fork `userstack.ll` since the majority of lines need changes.



================
Comment at: lld/wasm/Driver.cpp:385
+    StringRef s = arg->getValue();
+    if (s == "wasm32")
+      config->is64 = false;
----------------
dschuff wrote:
> any particular reason this shouldn't use the more conventional `-m32`/`m64`?
> edit: nevermind, this is lld not clang. I'll defer to Sam's opinion on lld flags.
Yup, @sbc100 suggested this.


================
Comment at: llvm/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp:84
     WasmSym->setGlobalType(wasm::WasmGlobalType{
-        uint8_t(Subtarget.hasAddr64() ? wasm::WASM_TYPE_I64
-                                      : wasm::WASM_TYPE_I32),
+        uint8_t(Subtarget.hasAddr64() && strcmp(Name, "__table_base") != 0
+                    ? wasm::WASM_TYPE_I64
----------------
dschuff wrote:
> should __table_base stay as i32?
I'd think so, right? since it refers to table indices, not memory


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82130/new/

https://reviews.llvm.org/D82130





More information about the llvm-commits mailing list