[llvm] r343830 - [WebAssembly] Fixed missing "global" symbol type in AsmParser.
Wouter van Oortmerssen via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 4 16:48:53 PDT 2018
Author: aardappel
Date: Thu Oct 4 16:48:53 2018
New Revision: 343830
URL: http://llvm.org/viewvc/llvm-project?rev=343830&view=rev
Log:
[WebAssembly] Fixed missing "global" symbol type in AsmParser.
Summary:
These are emitted by the wasm backend for e.g.
__stack_pointer at GLOBAL which previously wasn't accepted by the
assembler.
Reviewers: aheejin, dschuff
Subscribers: sbc100, jgravelle-google, llvm-commits, sunfish
Differential Revision: https://reviews.llvm.org/D52911
Modified:
llvm/trunk/lib/MC/MCExpr.cpp
llvm/trunk/test/MC/WebAssembly/basic-assembly.s
Modified: llvm/trunk/lib/MC/MCExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCExpr.cpp?rev=343830&r1=343829&r2=343830&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCExpr.cpp (original)
+++ llvm/trunk/lib/MC/MCExpr.cpp Thu Oct 4 16:48:53 2018
@@ -419,6 +419,7 @@ MCSymbolRefExpr::getVariantKindForName(S
.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)
Modified: llvm/trunk/test/MC/WebAssembly/basic-assembly.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/WebAssembly/basic-assembly.s?rev=343830&r1=343829&r2=343830&view=diff
==============================================================================
--- llvm/trunk/test/MC/WebAssembly/basic-assembly.s (original)
+++ llvm/trunk/test/MC/WebAssembly/basic-assembly.s Thu Oct 4 16:48:53 2018
@@ -47,6 +47,7 @@ test0:
#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 @@ test0:
# 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
More information about the llvm-commits
mailing list