summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorWouter van Oortmerssen <aardappel@gmail.com>2019-02-05 01:19:45 +0000
committerWouter van Oortmerssen <aardappel@gmail.com>2019-02-05 01:19:45 +0000
commit1a91cb0402270a3ce77a9397abda655384d89a43 (patch)
treec55a16056aad9f18a9e8fde3934cac4409cf9a63 /llvm/test
parent60731071dedd20ca77e2f53d17b148e25d3bf489 (diff)
downloadbcm5719-llvm-1a91cb0402270a3ce77a9397abda655384d89a43.tar.gz
bcm5719-llvm-1a91cb0402270a3ce77a9397abda655384d89a43.zip
[WebAssembly] Make disassembler always emit most canonical name.
Summary: There are a few instructions that all map to the same opcode, so when disassembling, we have to pick one. That was just the first one before (the except_ref variant in the case of "call"), now it is the one marked as IsCanonical in tablegen, or failing that, the shortest name (which is typically the "canonical" one). Also introduced a canonical "end" instruction for this purpose. Reviewers: dschuff, tlively Subscribers: sbc100, jgravelle-google, aheejin, llvm-commits, sunfish Tags: #llvm Differential Revision: https://reviews.llvm.org/D57713 llvm-svn: 353131
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/MC/Disassembler/WebAssembly/wasm.txt11
-rw-r--r--llvm/test/MC/WebAssembly/objdump.s4
2 files changed, 11 insertions, 4 deletions
diff --git a/llvm/test/MC/Disassembler/WebAssembly/wasm.txt b/llvm/test/MC/Disassembler/WebAssembly/wasm.txt
index 2632f231cec..8a119fb6b0f 100644
--- a/llvm/test/MC/Disassembler/WebAssembly/wasm.txt
+++ b/llvm/test/MC/Disassembler/WebAssembly/wasm.txt
@@ -22,6 +22,10 @@
# FIXME: WebAssemblyInstPrinter does not print immediates.
0x11 0x80 0x01 0x00
+# CHECK: call 0
+# CHECK-NOT: except_ref.call 0
+0x10 0x00
+
# CHECK: local.get 128
0x20 0x80 0x01
@@ -29,8 +33,7 @@
# CHECK: i64.trunc_sat_f64_u
0xFC 0x07
-# v128.const is arbitrarily disassembled as v16i8
-# CHECK: v128.const 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
+# CHECK: v128.const 50462976, 117835012, 185207048, 252579084
0xFD 0x02 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0A 0x0B 0x0C 0x0D 0x0E 0x0F
# CHECK: v8x16.shuffle 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
@@ -48,3 +51,7 @@
# Check br_table, which has its own operand type.
# CHECK: br_table {0, 1, 2}
0x0E 0x02 0x00 0x01 0x02
+
+# This can mean end_block/end_loop/end_if/end_function/end_try..
+# CHECK: end
+0x0B
diff --git a/llvm/test/MC/WebAssembly/objdump.s b/llvm/test/MC/WebAssembly/objdump.s
index d156ec60eef..f1cedc7db86 100644
--- a/llvm/test/MC/WebAssembly/objdump.s
+++ b/llvm/test/MC/WebAssembly/objdump.s
@@ -19,8 +19,8 @@ test1:
# CHECK-LABEL: test0:
# CHECK-NEXT: .local f32, f64, v128, v128
# CHECK-NEXT: 9: 20 02 local.get 2
-# CHECK-NEXT: b: 0b end_block
+# CHECK-NEXT: b: 0b end
# CHECK-LABEL: test1:
# CHECK-NEXT: .local i32, i64, except_ref
# CHECK-NEXT: 14: 20 03 local.get 3
-# CHECK-NEXT: 16: 0b end_block
+# CHECK-NEXT: 16: 0b end
OpenPOWER on IntegriCloud