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 @ 's' bit on an instruction that can't accept it.
8 @ CHECK-ERRORS: error: instruction 'mls' can not set flags,
9 @ CHECK-ERRORS: but 's' suffix specified
12 @ Out of range shift immediate values.
13 adc r1, r2, r3, lsl #invalid
14 adc r4, r5, r6, lsl #-1
15 adc r4, r5, r6, lsl #32
16 adc r4, r5, r6, lsr #-1
17 adc r4, r5, r6, lsr #33
18 adc r4, r5, r6, asr #-1
19 adc r4, r5, r6, asr #33
20 adc r4, r5, r6, ror #-1
21 adc r4, r5, r6, ror #32
23 @ CHECK-ERRORS: error: invalid immediate shift value
24 @ CHECK-ERRORS: adc r1, r2, r3, lsl #invalid
26 @ CHECK-ERRORS: error: immediate shift value out of range
27 @ CHECK-ERRORS: adc r4, r5, r6, lsl #-1
29 @ CHECK-ERRORS: error: immediate shift value out of range
30 @ CHECK-ERRORS: adc r4, r5, r6, lsl #32
32 @ CHECK-ERRORS: error: immediate shift value out of range
33 @ CHECK-ERRORS: adc r4, r5, r6, lsr #-1
35 @ CHECK-ERRORS: error: immediate shift value out of range
36 @ CHECK-ERRORS: adc r4, r5, r6, lsr #33
38 @ CHECK-ERRORS: error: immediate shift value out of range
39 @ CHECK-ERRORS: adc r4, r5, r6, asr #-1
41 @ CHECK-ERRORS: error: immediate shift value out of range
42 @ CHECK-ERRORS: adc r4, r5, r6, asr #33
44 @ CHECK-ERRORS: error: immediate shift value out of range
45 @ CHECK-ERRORS: adc r4, r5, r6, ror #-1
47 @ CHECK-ERRORS: error: immediate shift value out of range
48 @ CHECK-ERRORS: adc r4, r5, r6, ror #32
51 @ Out of range 16-bit immediate on BKPT
54 @ CHECK-ERRORS: error: invalid operand for instruction
56 @ Out of range 4 and 3 bit immediates on CDP[2]
58 @ Out of range immediates for CDP/CDP2
59 cdp p7, #2, c1, c1, c1, #8
60 cdp p7, #1, c1, c1, c1, #8
61 cdp2 p7, #2, c1, c1, c1, #8
62 cdp2 p7, #1, c1, c1, c1, #8
64 @ CHECK-ERRORS: error: invalid operand for instruction
65 @ CHECK-ERRORS: error: invalid operand for instruction
66 @ CHECK-ERRORS: error: invalid operand for instruction
67 @ CHECK-ERRORS: error: invalid operand for instruction
69 @ Out of range immediates for DBG
73 @ CHECK-ERRORS: error: invalid operand for instruction
74 @ CHECK-ERRORS: error: invalid operand for instruction
75 @ Double-check that we're synced up with the right diagnostics.
76 @ CHECK-ERRORS: dbg #16
78 @ Out of range immediate for MCR/MCR2/MCRR/MCRR2
79 mcr p7, #8, r5, c1, c1, #4
80 mcr p7, #2, r5, c1, c1, #8
81 mcr2 p7, #8, r5, c1, c1, #4
82 mcr2 p7, #1, r5, c1, c1, #8
83 mcrr p7, #16, r5, r4, c1
84 mcrr2 p7, #16, r5, r4, c1
85 @ CHECK-ERRORS: error: invalid operand for instruction
86 @ CHECK-ERRORS: error: invalid operand for instruction
87 @ CHECK-ERRORS: error: invalid operand for instruction
88 @ CHECK-ERRORS: error: invalid operand for instruction
89 @ CHECK-ERRORS: error: invalid operand for instruction
90 @ CHECK-ERRORS: error: invalid operand for instruction
93 @ Out of range immediate for MOV
95 @ CHECK-ERRORS: error: invalid operand for instruction
97 @ Invalid 's' bit usage for MOVW
100 @ CHECK-ERRORS: error: invalid operand for instruction
101 @ CHECK-ERRORS: error: instruction 'movw' can not set flags, but 's' suffix specified
103 @ Out of range immediate for MOVT
105 @ CHECK-ERRORS: error: invalid operand for instruction