[PATCH] D79462: [WebAssembly] MC: Fix for data aliases with offsets (getelementptr)

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 7 10:14:23 PDT 2020


sbc100 marked 2 inline comments as done.
sbc100 added inline comments.


================
Comment at: llvm/test/CodeGen/WebAssembly/aliases.ll:2
+; Based llvm/test/CodeGen/X86/aliases.ll
+; RUN: llc < %s -mtriple=wasm32-unknown-uknown -asm-verbose=false | FileCheck %s
+
----------------
aheejin wrote:
> Can we also check if `llvm-mc` can correctly parse the result of this test? That will possibly break the current codebase.
None of the other tests in this directory to do that.  In general I see this directory as testing CodeGen only.   The ability for MC to parse this stuff is tested separately in `llvm/test/MC/WebAssembly/`.   See the two new tests I added there.


================
Comment at: llvm/test/MC/WebAssembly/offset.s:12
+
+.set sym_b, sym_a + 4
+
----------------
aheejin wrote:
> Does this handle something like
> ```
> .set sym_c, 16
> ```
> too? The code assumes there always exists a base symbol.
Yes, you are right it looks like we don't support absolute addresses like this yet.  If its OK with you I'll leave that as a followup change?    We might need a different symbol flag for that because currently all our data symbols need to be relative to a segment,.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D79462





More information about the llvm-commits mailing list