summaryrefslogtreecommitdiff
path: root/test/MC
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2011-04-07 01:37:34 +0000
committerJohnny Chen <johnny.chen@apple.com>2011-04-07 01:37:34 +0000
commitf16f4e09ec28fe2de13a1bcda391d7d16a368e3a (patch)
treecfcc3338e26c4a0b8e0db6a8c991998291d6e38f /test/MC
parent0e382192c1a7750a157e470f749645ac2266d317 (diff)
downloadllvm-f16f4e09ec28fe2de13a1bcda391d7d16a368e3a.tar.gz
llvm-f16f4e09ec28fe2de13a1bcda391d7d16a368e3a.tar.bz2
llvm-f16f4e09ec28fe2de13a1bcda391d7d16a368e3a.tar.xz
Sanity check MSRi for invalid mask values and reject it as invalid.
rdar://problem/9246844 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129050 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC')
-rw-r--r--test/MC/Disassembler/ARM/invalid-MSRi-arm.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/MC/Disassembler/ARM/invalid-MSRi-arm.txt b/test/MC/Disassembler/ARM/invalid-MSRi-arm.txt
new file mode 100644
index 0000000000..e9d5deb043
--- /dev/null
+++ b/test/MC/Disassembler/ARM/invalid-MSRi-arm.txt
@@ -0,0 +1,12 @@
+# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding}
+
+# Opcode=206 Name=MSRi 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: 0: 0| 0: 0: 1: 1| 0: 0: 1: 0| 0: 0: 0: 0| 1: 1: 1: 1| 0: 0: 0: 1| 1: 0: 1: 0| 0: 1: 1: 1|
+# -------------------------------------------------------------------------------------------------
+#
+# A5.2.11 MSR (immediate), and hints & B6.1.6 MSR (immediate)
+# The hints instructions have more specific encodings, so if mask == 0,
+# we should reject this as an invalid instruction.
+0xa7 0xf1 0x20 0x3