summaryrefslogtreecommitdiff
path: root/test/wasm/function-index.test
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-12-18 20:12:21 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-12-18 20:12:21 +0000
commiteb1ff93d02b5f17b6b409e83c6d9be585f4a04b3 (patch)
tree7490b4a8943293f251ad733465936e6ec302b3e9 /test/wasm/function-index.test
parentbafea25f368c63f0b39789906adfed6e39219e64 (diff)
Notes
Diffstat (limited to 'test/wasm/function-index.test')
-rw-r--r--test/wasm/function-index.test18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/wasm/function-index.test b/test/wasm/function-index.test
new file mode 100644
index 0000000000000..03bd879b5176f
--- /dev/null
+++ b/test/wasm/function-index.test
@@ -0,0 +1,18 @@
+# RUN: llc -filetype=obj -mtriple=wasm32-unknown-uknown-wasm %p/Inputs/ret32.ll -o %t.ret32.o
+# RUN: llc -filetype=obj -mtriple=wasm32-unknown-uknown-wasm %p/Inputs/ret64.ll -o %t.ret64.o
+# RUN: lld -flavor wasm -r -o %t.wasm %t.ret32.o %t.ret64.o
+# RUN: obj2yaml %t.wasm | FileCheck %s
+
+CHECK: Sections:
+CHECK: - Type: TYPE
+CHECK: Signatures:
+CHECK: - Index: 0
+CHECK: ReturnType: I32
+CHECK: ParamTypes:
+CHECK: - F32
+CHECK: - Index: 1
+CHECK: ReturnType: I64
+CHECK: ParamTypes:
+CHECK: - F64
+CHECK: - Type: FUNCTION
+CHECK: FunctionTypes: [ 0, 1 ]