[PATCH] D52911: [WebAssembly] Fixed missing "global" symbol type in AsmParser.

Wouter van Oortmerssen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 4 16:46:08 PDT 2018


aardappel updated this revision to Diff 168410.
aardappel added a comment.

Added simple test.


Repository:
  rL LLVM

https://reviews.llvm.org/D52911

Files:
  lib/MC/MCExpr.cpp
  test/MC/WebAssembly/basic-assembly.s


Index: test/MC/WebAssembly/basic-assembly.s
===================================================================
--- test/MC/WebAssembly/basic-assembly.s
+++ test/MC/WebAssembly/basic-assembly.s
@@ -47,6 +47,7 @@
     #i32x4.trunc_s/f32x4:sat
     i32.trunc_s/f32
     #i32.trunc_s:sat/f32
+	get_global	__stack_pointer at GLOBAL
     end_function
 
 
@@ -87,4 +88,5 @@
 # CHECK-NEXT:      get_local   5
 # CHECK-NEXT:      f32x4.add
 # CHECK-NEXT:      i32.trunc_s/f32
+# CHECK-NEXT:      get_global	__stack_pointer at GLOBAL
 # CHECK-NEXT:      end_function
Index: lib/MC/MCExpr.cpp
===================================================================
--- lib/MC/MCExpr.cpp
+++ lib/MC/MCExpr.cpp
@@ -419,6 +419,7 @@
     .Case("hi8", VK_AVR_HI8)
     .Case("hlo8", VK_AVR_HLO8)
     .Case("function", VK_WebAssembly_FUNCTION)
+    .Case("global", VK_WebAssembly_GLOBAL)
     .Case("typeindex", VK_WebAssembly_TYPEINDEX)
     .Case("gotpcrel32 at lo", VK_AMDGPU_GOTPCREL32_LO)
     .Case("gotpcrel32 at hi", VK_AMDGPU_GOTPCREL32_HI)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52911.168410.patch
Type: text/x-patch
Size: 1019 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181004/850f55f3/attachment.bin>


More information about the llvm-commits mailing list