aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/MC/ARM/basic-thumb2-instructions.s19
-rw-r--r--test/MC/ARM/thumb2-diagnostics.s14
2 files changed, 33 insertions, 0 deletions
diff --git a/test/MC/ARM/basic-thumb2-instructions.s b/test/MC/ARM/basic-thumb2-instructions.s
index f9d7f11e36..b51fb8c41b 100644
--- a/test/MC/ARM/basic-thumb2-instructions.s
+++ b/test/MC/ARM/basic-thumb2-instructions.s
@@ -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
diff --git a/test/MC/ARM/thumb2-diagnostics.s b/test/MC/ARM/thumb2-diagnostics.s
index 93e2e984a6..e38f53c6cf 100644
--- a/test/MC/ARM/thumb2-diagnostics.s
+++ b/test/MC/ARM/thumb2-diagnostics.s
@@ -28,3 +28,17 @@
@ 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