2011-07-13 18:49:30 +00:00
|
|
|
@ RUN: not llvm-mc -triple=armv7-apple-darwin < %s 2> %t
|
|
|
|
@ RUN: FileCheck --check-prefix=CHECK-ERRORS < %t %s
|
|
|
|
|
|
|
|
@ Check for various assembly diagnostic messages on invalid input.
|
|
|
|
|
2011-07-14 22:04:21 +00:00
|
|
|
@ 's' bit on an instruction that can't accept it.
|
|
|
|
mlss r1, r2, r3, r4
|
|
|
|
@ CHECK-ERRORS: error: instruction 'mls' can not set flags,
|
|
|
|
@ CHECK-ERRORS: but 's' suffix specified
|
|
|
|
|
|
|
|
|
2011-07-13 18:49:30 +00:00
|
|
|
@ Out of range shift immediate values.
|
|
|
|
adc r1, r2, r3, lsl #invalid
|
|
|
|
adc r4, r5, r6, lsl #-1
|
|
|
|
adc r4, r5, r6, lsl #32
|
|
|
|
adc r4, r5, r6, lsr #-1
|
|
|
|
adc r4, r5, r6, lsr #33
|
|
|
|
adc r4, r5, r6, asr #-1
|
|
|
|
adc r4, r5, r6, asr #33
|
|
|
|
adc r4, r5, r6, ror #-1
|
|
|
|
adc r4, r5, r6, ror #32
|
|
|
|
|
|
|
|
@ CHECK-ERRORS: error: invalid immediate shift value
|
|
|
|
@ CHECK-ERRORS: adc r1, r2, r3, lsl #invalid
|
|
|
|
@ CHECK-ERRORS: ^
|
|
|
|
@ CHECK-ERRORS: error: immediate shift value out of range
|
|
|
|
@ CHECK-ERRORS: adc r4, r5, r6, lsl #-1
|
|
|
|
@ CHECK-ERRORS: ^
|
|
|
|
@ CHECK-ERRORS: error: immediate shift value out of range
|
|
|
|
@ CHECK-ERRORS: adc r4, r5, r6, lsl #32
|
|
|
|
@ CHECK-ERRORS: ^
|
|
|
|
@ CHECK-ERRORS: error: immediate shift value out of range
|
|
|
|
@ CHECK-ERRORS: adc r4, r5, r6, lsr #-1
|
|
|
|
@ CHECK-ERRORS: ^
|
|
|
|
@ CHECK-ERRORS: error: immediate shift value out of range
|
|
|
|
@ CHECK-ERRORS: adc r4, r5, r6, lsr #33
|
|
|
|
@ CHECK-ERRORS: ^
|
|
|
|
@ CHECK-ERRORS: error: immediate shift value out of range
|
|
|
|
@ CHECK-ERRORS: adc r4, r5, r6, asr #-1
|
|
|
|
@ CHECK-ERRORS: ^
|
|
|
|
@ CHECK-ERRORS: error: immediate shift value out of range
|
|
|
|
@ CHECK-ERRORS: adc r4, r5, r6, asr #33
|
|
|
|
@ CHECK-ERRORS: ^
|
|
|
|
@ CHECK-ERRORS: error: immediate shift value out of range
|
|
|
|
@ CHECK-ERRORS: adc r4, r5, r6, ror #-1
|
|
|
|
@ CHECK-ERRORS: ^
|
|
|
|
@ CHECK-ERRORS: error: immediate shift value out of range
|
|
|
|
@ CHECK-ERRORS: adc r4, r5, r6, ror #32
|
2011-07-13 20:10:10 +00:00
|
|
|
|
|
|
|
|
|
|
|
@ Out of range 16-bit immediate on BKPT
|
|
|
|
bkpt #65536
|
|
|
|
|
2011-07-13 22:01:08 +00:00
|
|
|
@ CHECK-ERRORS: error: invalid operand for instruction
|
|
|
|
|
|
|
|
@ Out of range 4 and 3 bit immediates on CDP[2]
|
|
|
|
|
|
|
|
@ Out of range immediates for CDP/CDP2
|
|
|
|
cdp p7, #2, c1, c1, c1, #8
|
|
|
|
cdp p7, #1, c1, c1, c1, #8
|
|
|
|
cdp2 p7, #2, c1, c1, c1, #8
|
|
|
|
cdp2 p7, #1, c1, c1, c1, #8
|
|
|
|
|
|
|
|
@ CHECK-ERRORS: error: invalid operand for instruction
|
|
|
|
@ CHECK-ERRORS: error: invalid operand for instruction
|
|
|
|
@ CHECK-ERRORS: error: invalid operand for instruction
|
2011-07-13 20:10:10 +00:00
|
|
|
@ CHECK-ERRORS: error: invalid operand for instruction
|
2011-07-13 22:59:38 +00:00
|
|
|
|
|
|
|
@ Out of range immediates for DBG
|
|
|
|
dbg #-1
|
|
|
|
dbg #16
|
|
|
|
|
|
|
|
@ CHECK-ERRORS: error: invalid operand for instruction
|
|
|
|
@ CHECK-ERRORS: error: invalid operand for instruction
|
|
|
|
@ Double-check that we're synced up with the right diagnostics.
|
|
|
|
@ CHECK-ERRORS: dbg #16
|
2011-07-14 21:19:17 +00:00
|
|
|
|
2011-07-14 21:26:42 +00:00
|
|
|
@ Out of range immediate for MCR/MCR2/MCRR/MCRR2
|
2011-07-14 21:19:17 +00:00
|
|
|
mcr p7, #8, r5, c1, c1, #4
|
|
|
|
mcr p7, #2, r5, c1, c1, #8
|
|
|
|
mcr2 p7, #8, r5, c1, c1, #4
|
|
|
|
mcr2 p7, #1, r5, c1, c1, #8
|
2011-07-14 21:26:42 +00:00
|
|
|
mcrr p7, #16, r5, r4, c1
|
|
|
|
mcrr2 p7, #16, r5, r4, c1
|
|
|
|
@ CHECK-ERRORS: error: invalid operand for instruction
|
|
|
|
@ CHECK-ERRORS: error: invalid operand for instruction
|
2011-07-14 21:19:17 +00:00
|
|
|
@ 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
|
2011-07-19 19:13:28 +00:00
|
|
|
|
|
|
|
|
|
|
|
@ Out of range immediate for MOV
|
|
|
|
movw r9, 0x10000
|
|
|
|
@ CHECK-ERRORS: error: invalid operand for instruction
|
2011-07-19 20:10:31 +00:00
|
|
|
|
|
|
|
@ Invalid 's' bit usage for MOVW
|
|
|
|
movs r6, #0xffff
|
|
|
|
movwseq r9, #0xffff
|
|
|
|
@ CHECK-ERRORS: error: invalid operand for instruction
|
|
|
|
@ CHECK-ERRORS: error: instruction 'movw' can not set flags, but 's' suffix specified
|
2011-07-19 20:23:25 +00:00
|
|
|
|
|
|
|
@ Out of range immediate for MOVT
|
|
|
|
movt r9, 0x10000
|
2011-07-19 20:35:35 +00:00
|
|
|
@ CHECK-ERRORS: error: invalid operand for instruction
|
|
|
|
|
|
|
|
@ 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
|
2011-07-19 20:23:25 +00:00
|
|
|
@ CHECK-ERRORS: error: invalid operand for instruction
|
2011-07-21 19:02:03 +00:00
|
|
|
|
|
|
|
@ Shifter operand validation for PKH instructions.
|
|
|
|
pkhbt r2, r2, r3, lsl #-1
|
|
|
|
pkhbt r2, r2, r3, lsl #32
|
|
|
|
pkhtb r2, r2, r3, asr #0
|
|
|
|
pkhtb r2, r2, r3, asr #33
|
|
|
|
pkhbt r2, r2, r3, asr #3
|
|
|
|
pkhtb r2, r2, r3, lsl #3
|
|
|
|
|
|
|
|
@ CHECK: error: immediate value out of range
|
|
|
|
@ CHECK: pkhbt r2, r2, r3, lsl #-1
|
|
|
|
@ CHECK: ^
|
|
|
|
@ CHECK: error: immediate value out of range
|
|
|
|
@ CHECK: pkhbt r2, r2, r3, lsl #32
|
|
|
|
@ CHECK: ^
|
|
|
|
@ CHECK: error: immediate value out of range
|
|
|
|
@ CHECK: pkhtb r2, r2, r3, asr #0
|
|
|
|
@ CHECK: ^
|
|
|
|
@ CHECK: error: immediate value out of range
|
|
|
|
@ CHECK: pkhtb r2, r2, r3, asr #33
|
|
|
|
@ CHECK: ^
|
|
|
|
@ CHECK: error: lsl operand expected.
|
|
|
|
@ CHECK: pkhbt r2, r2, r3, asr #3
|
|
|
|
@ CHECK: ^
|
|
|
|
@ CHECK: error: asr operand expected.
|
|
|
|
@ CHECK: pkhtb r2, r2, r3, lsl #3
|
|
|
|
@ CHECK: ^
|
2011-07-22 17:44:50 +00:00
|
|
|
|
|
|
|
|
|
|
|
@ bad values for SETEND
|
|
|
|
setendne be
|
|
|
|
setend me
|
|
|
|
setend 1
|
|
|
|
|
|
|
|
@ CHECK: error: instruction 'setend' is not predicable, but condition code specified
|
|
|
|
@ CHECK: setendne be
|
|
|
|
@ CHECK: ^
|
|
|
|
@ CHECK: error: 'be' or 'le' operand expected
|
|
|
|
@ CHECK: setend me
|
|
|
|
@ CHECK: ^
|
|
|
|
@ CHECK: error: 'be' or 'le' operand expected
|
|
|
|
@ CHECK: setend 1
|
|
|
|
@ CHECK: ^
|