[PATCH] D54647: [WebAssembly] Initial implementation of -fPIC codegeneration

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 15 16:29:11 PDT 2019


sbc100 added inline comments.


================
Comment at: llvm/lib/Target/WebAssembly/WebAssemblyFastISel.cpp:422
+
+    unsigned OpcConst = WebAssembly::CONST_I32;
+    unsigned ConstReg = createResultReg(&WebAssembly::I32RegClass);
----------------
tlively wrote:
> Should this be dependent on `Subtarget->hasAddr64()` like `Opc` is?
Hmm , good question.   I'm temped to not to add to much wasm64 code because we have no way of testing it and its premature .. so I think I'll just remove the ternary above.


================
Comment at: llvm/test/MC/WebAssembly/reloc-pic.s:1
+# RUN: llvm-mc -triple=wasm32-unknown-unknown -filetype=obj -o %t.o < %s
+# RUN: obj2yaml %t.o | FileCheck %s
----------------
tlively wrote:
> If you want, you can avoid the temp file and output to stdout using `-o -`. I find that having the entire test on one line with no intermediate files makes the test easier to debug when something changes.
Thanks (looks like i don't even need `-o -` as its the default.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D54647





More information about the llvm-commits mailing list