aboutsummaryrefslogtreecommitdiffstats
path: root/test/MC/ARM/diagnostics.s
diff options
context:
space:
mode:
Diffstat (limited to 'test/MC/ARM/diagnostics.s')
-rw-r--r--test/MC/ARM/diagnostics.s80
1 files changed, 80 insertions, 0 deletions
diff --git a/test/MC/ARM/diagnostics.s b/test/MC/ARM/diagnostics.s
index 6b9574b..6f66dc3 100644
--- a/test/MC/ARM/diagnostics.s
+++ b/test/MC/ARM/diagnostics.s
@@ -621,3 +621,83 @@ foo2:
@ CHECK-ERRORS: error: destination register and base register can't be identical
@ CHECK-ERRORS: ldrsb r0, [r0], r1
@ CHECK-ERRORS: ^
+
+ @ Out of range modified immediate values
+ mov r5, #-256, #6
+ mov r6, #42, #7
+ mvn r5, #256, #6
+ mvn r6, #42, #298
+ cmp r5, #65535, #6
+ cmp r6, #42, #31
+ cmn r5, #-1, #6
+ cmn r6, #42, #32
+ msr APSR_nzcvq, #-128, #2
+ msr apsr_nzcvqg, #0, #1
+ adc r7, r8, #-256, #2
+ adc r7, r8, #128, #1
+ sbc r7, r8, #-256, #2
+ sbc r7, r8, #128, #1
+ add r7, r8, #-2149, #0
+ add r7, r8, #100, #1
+ sub r7, r8, #-2149, #0
+ sub r7, r8, #100, #1
+ and r7, r8, #-2149, #0
+ and r7, r8, #100, #1
+ orr r7, r8, #-2149, #0
+ orr r7, r8, #100, #1
+ eor r7, r8, #-2149, #0
+ eor r7, r8, #100, #1
+ bic r7, r8, #-2149, #0
+ bic r7, r8, #100, #1
+ rsb r7, r8, #-2149, #0
+ rsb r7, r8, #100, #1
+ adds r7, r8, #-2149, #0
+ adds r7, r8, #100, #1
+ subs r7, r8, #-2149, #0
+ subs r7, r8, #100, #1
+ rsbs r7, r8, #-2149, #0
+ rsbs r7, r8, #100, #1
+ rsc r7, r8, #-2149, #0
+ rsc r7, r8, #100, #1
+ TST r7, #-2149, #0
+ TST r7, #100, #1
+ TEQ r7, #-2149, #0
+ TEQ r7, #100, #1
+@ CHECK-ERRORS: error: immediate operand must a number in the range [0, 255]
+@ CHECK-ERRORS: error: immediate operand must an even number in the range [0, 30]
+@ CHECK-ERRORS: error: immediate operand must a number in the range [0, 255]
+@ CHECK-ERRORS: error: immediate operand must an even number in the range [0, 30]
+@ CHECK-ERRORS: error: immediate operand must a number in the range [0, 255]
+@ CHECK-ERRORS: error: immediate operand must an even number in the range [0, 30]
+@ CHECK-ERRORS: error: immediate operand must a number in the range [0, 255]
+@ CHECK-ERRORS: error: immediate operand must an even number in the range [0, 30]
+@ CHECK-ERRORS: error: immediate operand must a number in the range [0, 255]
+@ CHECK-ERRORS: error: immediate operand must an even number in the range [0, 30]
+@ CHECK-ERRORS: error: immediate operand must a number in the range [0, 255]
+@ CHECK-ERRORS: error: immediate operand must an even number in the range [0, 30]
+@ CHECK-ERRORS: error: immediate operand must a number in the range [0, 255]
+@ CHECK-ERRORS: error: immediate operand must an even number in the range [0, 30]
+@ CHECK-ERRORS: error: immediate operand must a number in the range [0, 255]
+@ CHECK-ERRORS: error: immediate operand must an even number in the range [0, 30]
+@ CHECK-ERRORS: error: immediate operand must a number in the range [0, 255]
+@ CHECK-ERRORS: error: immediate operand must an even number in the range [0, 30]
+@ CHECK-ERRORS: error: immediate operand must a number in the range [0, 255]
+@ CHECK-ERRORS: error: immediate operand must an even number in the range [0, 30]
+@ CHECK-ERRORS: error: immediate operand must a number in the range [0, 255]
+@ CHECK-ERRORS: error: immediate operand must an even number in the range [0, 30]
+@ CHECK-ERRORS: error: immediate operand must a number in the range [0, 255]
+@ CHECK-ERRORS: error: immediate operand must an even number in the range [0, 30]
+@ CHECK-ERRORS: error: immediate operand must a number in the range [0, 255]
+@ CHECK-ERRORS: error: immediate operand must an even number in the range [0, 30]
+@ CHECK-ERRORS: error: immediate operand must a number in the range [0, 255]
+@ CHECK-ERRORS: error: immediate operand must an even number in the range [0, 30]
+@ CHECK-ERRORS: error: immediate operand must a number in the range [0, 255]
+@ CHECK-ERRORS: error: immediate operand must an even number in the range [0, 30]
+@ CHECK-ERRORS: error: immediate operand must a number in the range [0, 255]
+@ CHECK-ERRORS: error: immediate operand must an even number in the range [0, 30]
+@ CHECK-ERRORS: error: immediate operand must a number in the range [0, 255]
+@ CHECK-ERRORS: error: immediate operand must an even number in the range [0, 30]
+@ CHECK-ERRORS: error: immediate operand must a number in the range [0, 255]
+@ CHECK-ERRORS: error: immediate operand must an even number in the range [0, 30]
+@ CHECK-ERRORS: error: immediate operand must a number in the range [0, 255]
+@ CHECK-ERRORS: error: immediate operand must an even number in the range [0, 30]