1 @ RUN: not llvm-mc -triple=thumbv6-apple-darwin < %s 2> %t
2 @ RUN: FileCheck --check-prefix=CHECK-ERRORS < %t %s
3 @ RUN: not llvm-mc -triple=thumbv5-apple-darwin < %s 2> %t
4 @ RUN: FileCheck --check-prefix=CHECK-ERRORS-V5 < %t %s
6 @ Check for various assembly diagnostic messages on invalid input.
8 @ ADD instruction w/o 'S' suffix.
10 @ CHECK-ERRORS: error: invalid instruction
11 @ CHECK-ERRORS: add r1, r2, r3
14 @ Instructions which require v6+ for both registers to be low regs.
17 @ CHECK-ERRORS: error: instruction variant requires Thumb2
18 @ CHECK-ERRORS: add r2, r3
20 @ CHECK-ERRORS-V5: error: instruction variant requires ARMv6 or later
21 @ CHECK-ERRORS-V5: mov r2, r3
25 @ Out of range immediates for ASR instruction.
28 @ CHECK-ERRORS: error: invalid operand for instruction
29 @ CHECK-ERRORS: asrs r2, r3, #33
31 @ CHECK-ERRORS: error: invalid operand for instruction
32 @ CHECK-ERRORS: asrs r2, r3, #0
35 @ Out of range immediates for BKPT instruction.
38 error: invalid operand for instruction
41 error: invalid operand for instruction
45 @ Invalid writeback and register lists for LDM
48 @ CHECK-ERRORS: error: registers must be in range r0-r7
49 @ CHECK-ERRORS: ldm r2!, {r5, r8}
51 @ CHECK-ERRORS: error: writeback operator '!' expected
52 @ CHECK-ERRORS: ldm r2, {r5, r7}
56 @ Out of range immediates for LSL instruction.
59 @ CHECK-ERRORS: error: invalid operand for instruction
60 @ CHECK-ERRORS: lsls r4, r5, #-1
62 @ CHECK-ERRORS: error: invalid operand for instruction
63 @ CHECK-ERRORS: lsls r4, r5, #32
66 @ Mismatched source/destination operands for MUL instruction.
68 @ CHECK-ERRORS: error: destination register must match second source register
69 @ CHECK-ERRORS: muls r1, r2, r3