summaryrefslogtreecommitdiff
path: root/test/MC
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2011-04-06 20:49:02 +0000
committerJohnny Chen <johnny.chen@apple.com>2011-04-06 20:49:02 +0000
commit4d81c9a6ba076e86671eebb9a0c533a45f357d2d (patch)
tree9a6a0128fa1544b2e482f62c22f9be9e0f9662e3 /test/MC
parenta040d47c74341327997a50e88bb8ad4ceda6989f (diff)
downloadllvm-4d81c9a6ba076e86671eebb9a0c533a45f357d2d.tar.gz
llvm-4d81c9a6ba076e86671eebb9a0c533a45f357d2d.tar.bz2
llvm-4d81c9a6ba076e86671eebb9a0c533a45f357d2d.tar.xz
A8.6.92 MCR (Encoding A1): if coproc == '101x' then SEE "Advanced SIMD and VFP"
Since these "Advanced SIMD and VFP" instructions have more specfic encoding bits specified, if coproc == 10 or 11, we should reject the insn as invalid. rdar://problem/9239922 rdar://problem/9239596 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129027 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC')
-rw-r--r--test/MC/Disassembler/ARM/invalid-MCR-arm.txt10
-rw-r--r--test/MC/Disassembler/ARM/neon-tests.txt3
-rw-r--r--test/MC/Disassembler/ARM/thumb-tests.txt3
3 files changed, 16 insertions, 0 deletions
diff --git a/test/MC/Disassembler/ARM/invalid-MCR-arm.txt b/test/MC/Disassembler/ARM/invalid-MCR-arm.txt
new file mode 100644
index 0000000000..d39b9c1d60
--- /dev/null
+++ b/test/MC/Disassembler/ARM/invalid-MCR-arm.txt
@@ -0,0 +1,10 @@
+# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding}
+
+# Opcode=171 Name=MCR Format=ARM_FORMAT_BRFRM(2)
+# 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
+# -------------------------------------------------------------------------------------------------
+# | 0: 0: 1: 0| 1: 1: 1: 0| 1: 0: 1: 0| 0: 0: 0: 0| 0: 0: 0: 1| 1: 0: 1: 1| 0: 0: 0: 1| 1: 0: 1: 1|
+# -------------------------------------------------------------------------------------------------
+#
+# Encoding error: coproc == 10 or 11 for MCR[R]/MR[R]C
+0x1b 0x1b 0xa0 0x2e
diff --git a/test/MC/Disassembler/ARM/neon-tests.txt b/test/MC/Disassembler/ARM/neon-tests.txt
index b08b9ddc5f..3a0a4a63fc 100644
--- a/test/MC/Disassembler/ARM/neon-tests.txt
+++ b/test/MC/Disassembler/ARM/neon-tests.txt
@@ -74,3 +74,6 @@
# CHECK: vmov.s8 r0, d8[1]
0x30 0x0b 0x58 0xee
+
+# CHECK: vmov r1, r0, d11
+0x1b 0x1b 0x50 0xec
diff --git a/test/MC/Disassembler/ARM/thumb-tests.txt b/test/MC/Disassembler/ARM/thumb-tests.txt
index 6052069392..358ecf001b 100644
--- a/test/MC/Disassembler/ARM/thumb-tests.txt
+++ b/test/MC/Disassembler/ARM/thumb-tests.txt
@@ -199,3 +199,6 @@
# CHECK: stc2 p12, cr15, [r9], {137}
0x89 0xfc 0x89 0xfc
+
+# CHECK: vmov r1, r0, d11
+0x50 0xec 0x1b 0x1b