aboutsummaryrefslogtreecommitdiffstats
path: root/test/MC
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2011-04-13 21:35:49 +0000
committerJohnny Chen <johnny.chen@apple.com>2011-04-13 21:35:49 +0000
commit6c7e4147dc7faf2f7b4bdaaf7940c2fe65d6fbc5 (patch)
tree3d2ae50eaf4d8108eb84e3cf68a88978557614bf /test/MC
parent471d73d5d387d52dc854145caca971dfd9fd506a (diff)
downloadexternal_llvm-6c7e4147dc7faf2f7b4bdaaf7940c2fe65d6fbc5.zip
external_llvm-6c7e4147dc7faf2f7b4bdaaf7940c2fe65d6fbc5.tar.gz
external_llvm-6c7e4147dc7faf2f7b4bdaaf7940c2fe65d6fbc5.tar.bz2
Check for unallocated instruction encodings when disassembling Thumb Branch instructions (tBcc and t2Bcc).
rdar://problem/9280470 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129471 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC')
-rw-r--r--test/MC/Disassembler/ARM/invalid-t2Bcc-thumb.txt11
-rw-r--r--test/MC/Disassembler/ARM/thumb-tests.txt4
2 files changed, 13 insertions, 2 deletions
diff --git a/test/MC/Disassembler/ARM/invalid-t2Bcc-thumb.txt b/test/MC/Disassembler/ARM/invalid-t2Bcc-thumb.txt
new file mode 100644
index 0000000..d0bc51e
--- /dev/null
+++ b/test/MC/Disassembler/ARM/invalid-t2Bcc-thumb.txt
@@ -0,0 +1,11 @@
+# RUN: llvm-mc --disassemble %s -triple=thumb-apple-darwin9 |& grep {invalid instruction encoding}
+
+# Opcode=1894 Name=t2Bcc Format=ARM_FORMAT_THUMBFRM(25)
+# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
+# -------------------------------------------------------------------------------------------------
+# | 1: 1: 1: 1| 0: 1: 1: 1| 1: 0: 1: 0| 1: 1: 1: 1| 1: 0: 0: 0| 1: 0: 1: 1| 0: 1: 0: 0| 0: 1: 0: 0|
+# -------------------------------------------------------------------------------------------------
+#
+# A8.6.16 B
+# if cond<3:1> == '111' then SEE "Related Encodings"
+0xaf 0xf7 0x44 0x8b
diff --git a/test/MC/Disassembler/ARM/thumb-tests.txt b/test/MC/Disassembler/ARM/thumb-tests.txt
index 4151e0c..04bde41 100644
--- a/test/MC/Disassembler/ARM/thumb-tests.txt
+++ b/test/MC/Disassembler/ARM/thumb-tests.txt
@@ -9,8 +9,8 @@
# CHECK: b #30
0x0f 0xe0
-# CHECK: b.w #-16
-0xff 0xf7 0xf8 0xaf
+# CHECK: bgt.w #-16
+0x3f 0xf7 0xf8 0xaf
# CHECK: bfi r2, r10, #0, #1
0x6a 0xf3 0x00 0x02