1 @ RUN: not llvm-mc -triple=armv7-apple-darwin < %s 2> %t
2 @ RUN: FileCheck --check-prefix=CHECK-ERRORS < %t %s
4 @ Check for various assembly diagnostic messages on invalid input.
6 @ Out of range shift immediate values.
7 adc r1, r2, r3, lsl #invalid
8 adc r4, r5, r6, lsl #-1
9 adc r4, r5, r6, lsl #32
10 adc r4, r5, r6, lsr #-1
11 adc r4, r5, r6, lsr #33
12 adc r4, r5, r6, asr #-1
13 adc r4, r5, r6, asr #33
14 adc r4, r5, r6, ror #-1
15 adc r4, r5, r6, ror #32
17 @ CHECK-ERRORS: error: invalid immediate shift value
18 @ CHECK-ERRORS: adc r1, r2, r3, lsl #invalid
20 @ CHECK-ERRORS: error: immediate shift value out of range
21 @ CHECK-ERRORS: adc r4, r5, r6, lsl #-1
23 @ CHECK-ERRORS: error: immediate shift value out of range
24 @ CHECK-ERRORS: adc r4, r5, r6, lsl #32
26 @ CHECK-ERRORS: error: immediate shift value out of range
27 @ CHECK-ERRORS: adc r4, r5, r6, lsr #-1
29 @ CHECK-ERRORS: error: immediate shift value out of range
30 @ CHECK-ERRORS: adc r4, r5, r6, lsr #33
32 @ CHECK-ERRORS: error: immediate shift value out of range
33 @ CHECK-ERRORS: adc r4, r5, r6, asr #-1
35 @ CHECK-ERRORS: error: immediate shift value out of range
36 @ CHECK-ERRORS: adc r4, r5, r6, asr #33
38 @ CHECK-ERRORS: error: immediate shift value out of range
39 @ CHECK-ERRORS: adc r4, r5, r6, ror #-1
41 @ CHECK-ERRORS: error: immediate shift value out of range
42 @ CHECK-ERRORS: adc r4, r5, r6, ror #32
45 @ Out of range 16-bit immediate on BKPT
48 @ CHECK-ERRORS: error: invalid operand for instruction
50 @ Out of range 4 and 3 bit immediates on CDP[2]
52 @ Out of range immediates for CDP/CDP2
53 cdp p7, #2, c1, c1, c1, #8
54 cdp p7, #1, c1, c1, c1, #8
55 cdp2 p7, #2, c1, c1, c1, #8
56 cdp2 p7, #1, c1, c1, c1, #8
58 @ CHECK-ERRORS: error: invalid operand for instruction
59 @ CHECK-ERRORS: error: invalid operand for instruction
60 @ CHECK-ERRORS: error: invalid operand for instruction
61 @ CHECK-ERRORS: error: invalid operand for instruction
63 @ Out of range immediates for DBG
67 @ CHECK-ERRORS: error: invalid operand for instruction
68 @ CHECK-ERRORS: error: invalid operand for instruction
69 @ Double-check that we're synced up with the right diagnostics.
70 @ CHECK-ERRORS: dbg #16
72 @ Out of range immediate for MCR/MCR2/MCRR/MCRR2
73 mcr p7, #8, r5, c1, c1, #4
74 mcr p7, #2, r5, c1, c1, #8
75 mcr2 p7, #8, r5, c1, c1, #4
76 mcr2 p7, #1, r5, c1, c1, #8
77 mcrr p7, #16, r5, r4, c1
78 mcrr2 p7, #16, r5, r4, c1
79 @ CHECK-ERRORS: error: invalid operand for instruction
80 @ CHECK-ERRORS: error: invalid operand for instruction
81 @ CHECK-ERRORS: error: invalid operand for instruction
82 @ CHECK-ERRORS: error: invalid operand for instruction
83 @ CHECK-ERRORS: error: invalid operand for instruction
84 @ CHECK-ERRORS: error: invalid operand for instruction