Thumb2 assembly parsing and encoding for MRC/MRC2/MRRC/MRRC2.
authorJim Grosbach <grosbach@apple.com>
Wed, 14 Sep 2011 19:28:49 +0000 (19:28 +0000)
committerJim Grosbach <grosbach@apple.com>
Wed, 14 Sep 2011 19:28:49 +0000 (19:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139717 91177308-0d34-0410-b5e6-96231b3b80d8

test/MC/ARM/basic-thumb2-instructions.s
test/MC/ARM/thumb2-diagnostics.s

index f9d7f11e36fc3d12a75819577dbedfce494d6fb6..b51fb8c41ba4fd26d1ed74ea50faa98b5a60c351 100644 (file)
@@ -1042,6 +1042,25 @@ _func:
 @ CHECK: it    eq                      @ encoding: [0x08,0xbf]
 @ CHECK: movteq        r4, #4080               @ encoding: [0xc0,0xf6,0xf0,0x74]
 
+@------------------------------------------------------------------------------
+@ MRC/MRC2
+@------------------------------------------------------------------------------
+        mrc  p14, #0, r1, c1, c2, #4
+        mrc2  p14, #0, r1, c1, c2, #4
+
+@ CHECK: mrc   p14, #0, r1, c1, c2, #4 @ encoding: [0x11,0xee,0x92,0x1e]
+@ CHECK: mrc2  p14, #0, r1, c1, c2, #4 @ encoding: [0x11,0xfe,0x92,0x1e]
+
+
+@------------------------------------------------------------------------------
+@ MRRC/MRRC2
+@------------------------------------------------------------------------------
+        mrrc  p7, #1, r5, r4, c1
+        mrrc2  p7, #1, r5, r4, c1
+
+@ CHECK: mrrc  p7, #1, r5, r4, c1      @ encoding: [0x54,0xec,0x11,0x57]
+@ CHECK: mrrc2 p7, #1, r5, r4, c1      @ encoding: [0x54,0xfc,0x11,0x57]
+
 
 @------------------------------------------------------------------------------
 @ IT
index 93e2e984a6833301dbc283a3503eb47986680567..e38f53c6cfdc895209cffc02557da53848434158 100644 (file)
 @ CHECK-ERRORS: error: predicated instructions must be in IT block
 @ CHECK-ERRORS:         nopeq
 @ CHECK-ERRORS:         ^
+
+        @ Out of range immediates for MRC/MRC2/MRRC/MRRC2
+        mrc  p14, #8, r1, c1, c2, #4
+        mrc  p14, #1, r1, c1, c2, #8
+        mrc2  p14, #8, r1, c1, c2, #4
+        mrc2  p14, #0, r1, c1, c2, #9
+        mrrc  p7, #16, r5, r4, c1
+        mrrc2  p7, #17, r5, r4, c1
+@ CHECK-ERRORS: error: invalid operand for instruction
+@ CHECK-ERRORS: error: invalid operand for instruction
+@ CHECK-ERRORS: error: invalid operand for instruction
+@ CHECK-ERRORS: error: invalid operand for instruction
+@ CHECK-ERRORS: error: invalid operand for instruction
+@ CHECK-ERRORS: error: invalid operand for instruction