1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-23 04:52:54 +02:00
llvm-mirror/test/MC/ARM/negative-immediates-fail.s
Oliver Stannard 3d936b9a18 [ARM, Asm] Add diagnostics for general-purpose register operands
This adds diagnostic strings for the ARM general-purpose register
classes, which will be used when these classes are expected by the
assembler, but the provided operand is not valid.

One of these, rGPR, requires C++ code to select the correct error
message, as that class contains different registers in pre-v8 and v8
targets. The rest can all have their diagnostic strings stored in the
tablegen description of them.

Differential revision: https://reviews.llvm.org/D36692

llvm-svn: 315303
2017-10-10 12:31:53 +00:00

30 lines
1.2 KiB
ArmAsm

# RUN: not llvm-mc -triple armv7 %s 2>&1| FileCheck %s
.arm
ADC r0, r1, #0xFFFFFEEE
# CHECK: error: invalid instruction, any one of the following would fix this:
# CHECK: note: invalid operand for instruction
# CHECK: note: operand must be a register in range [r0, r15]
ADC r0, r1, #0xABFEABFF
# CHECK: error: invalid instruction, any one of the following would fix this:
# CHECK: note: invalid operand for instruction
# CHECK: note: operand must be a register in range [r0, r15]
ADC r0, r1, #0xFFFFFE02
# CHECK: error: invalid instruction, any one of the following would fix this:
# CHECK: note: invalid operand for instruction
# CHECK: note: operand must be a register in range [r0, r15]
ADD.W r0, r0, #0xFF01FF01
# CHECK: error: invalid instruction, any one of the following would fix this:
# CHECK: note: invalid operand for instruction
# CHECK: note: operand must be a register in range [r0, r15]
ORR r0, r1, #0xFFFFFF00
# CHECK: error: invalid instruction, any one of the following would fix this:
# CHECK: note: invalid operand for instruction
# CHECK: note: operand must be a register in range [r0, r15]
# CHECK: note: instruction requires: thumb2
ORN r0, r1, #0xFFFFFF00
# CHECK: error: instruction requires: thumb2