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

Derek Schuff via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 18 17:31:46 PDT 2020


dschuff added a comment.

Yeah I think a 64-bit version of userstack.ll makes sense.  (a fork or a second set of CHECKs, whatever you think would be cleaner). There's also `stack-alignment.ll` which covers dynamic stack adjustment.



================
Comment at: lld/wasm/Driver.cpp:385
+    StringRef s = arg->getValue();
+    if (s == "wasm32")
+      config->is64 = false;
----------------
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.


================
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
----------------
should __table_base stay as i32?


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

https://reviews.llvm.org/D82130





More information about the cfe-commits mailing list