summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorWouter van Oortmerssen <aardappel@gmail.com>2018-11-12 20:15:01 +0000
committerWouter van Oortmerssen <aardappel@gmail.com>2018-11-12 20:15:01 +0000
commitcc75e77df5a3b6f0bc944408ff481de18b793f22 (patch)
treee805214a4932a7b8f1a7d293794521d69b23de40 /llvm/test
parentbd844e0de7aca247ec0a1a6ecd2742d99a86d15d (diff)
downloadbcm5719-llvm-cc75e77df5a3b6f0bc944408ff481de18b793f22.tar.gz
bcm5719-llvm-cc75e77df5a3b6f0bc944408ff481de18b793f22.zip
[WebAssembly] Added WasmAsmParser.
Summary: This is to replace the ELFAsmParser that WebAssembly was using, which so far was a stub that didn't do anything, and couldn't work correctly with wasm. This new class is there to implement generic directives related to wasm as a binary format. Wasm target specific directives are still parsed in WebAssemblyAsmParser as before. The two classes now cooperate more correctly too. Also implemented .result which was missing. Any unknown directives will now result in errors. Reviewers: dschuff, sbc100 Subscribers: mgorny, jgravelle-google, eraman, aheejin, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D54360 llvm-svn: 346700
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/CodeGen/WebAssembly/inline-asm-roundtrip.ll1
-rw-r--r--llvm/test/MC/WebAssembly/basic-assembly.s3
2 files changed, 4 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/WebAssembly/inline-asm-roundtrip.ll b/llvm/test/CodeGen/WebAssembly/inline-asm-roundtrip.ll
index 7fcc3cf276a..831fd44d804 100644
--- a/llvm/test/CodeGen/WebAssembly/inline-asm-roundtrip.ll
+++ b/llvm/test/CodeGen/WebAssembly/inline-asm-roundtrip.ll
@@ -22,6 +22,7 @@ target triple = "wasm32-unknown-unknown"
; CHECK-LABEL: main:
; CHECK-NEXT: .param i32, i32
+; CHECK-NEXT: .result i32
; CHECK-NEXT: .local i32
; CHECK-NEXT: i32.const 1
; CHECK-NEXT: set_local [[SRC:[0-9]+]]
diff --git a/llvm/test/MC/WebAssembly/basic-assembly.s b/llvm/test/MC/WebAssembly/basic-assembly.s
index c2b316c9243..9e09ab2e042 100644
--- a/llvm/test/MC/WebAssembly/basic-assembly.s
+++ b/llvm/test/MC/WebAssembly/basic-assembly.s
@@ -3,10 +3,12 @@
# RUN: llvm-mc -triple=wasm32-unknown-unknown -filetype=obj -mattr=+simd128,+nontrapping-fptoint,+exception-handling < %s
.text
+ .section .text.main,"",@
.type test0,@function
test0:
# Test all types:
.param i32, i64
+ .result i32
.local f32, f64, v128, v128
# Explicit getlocal/setlocal:
get_local 2
@@ -65,6 +67,7 @@ test0:
# CHECK: .text
# CHECK-LABEL: test0:
# CHECK-NEXT: .param i32, i64
+# CHECK-NEXT: .result i32
# CHECK-NEXT: .local f32, f64
# CHECK-NEXT: get_local 2
# CHECK-NEXT: set_local 2
OpenPOWER on IntegriCloud