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/thumb-not-mclass.s
Sjoerd Meijer 810b9e24b2 ARMAsmParser: clean up of isImmediate functions
- we are now using immediate AsmOperands so that the range check functions are
  tablegen'ed.
- Big bonus is that error messages become much more accurate, i.e. instead of a
  useless "invalid operand" error message it will not say that the immediate
  operand must in range [x,y], which is why regression tests needed updating.

More tablegen operand descriptions could probably benefit from using
immediateAsmOperand, but this is a first good step to get rid of most of the
nearly identical range check functions. I will address the remaining immediate
operands in next clean ups.

Differential Revision: https://reviews.llvm.org/D31333

llvm-svn: 299358
2017-04-03 14:50:04 +00:00

27 lines
880 B
ArmAsm

@ RUN: not llvm-mc -triple=thumbv7m-apple-darwin -show-encoding < %s 2> %t
@ RUN: FileCheck < %t %s
@ RUN: not llvm-mc -triple=thumbv6m -show-encoding < %s 2> %t
@ RUN: FileCheck < %t %s
.syntax unified
.globl _func
@ Check that the assembler rejects thumb instructions that are not valid
@ on mclass.
@------------------------------------------------------------------------------
@ BLX (immediate)
@------------------------------------------------------------------------------
blx _baz
@ CHECK: error: instruction requires: !armv*m
@------------------------------------------------------------------------------
@ SETEND
@------------------------------------------------------------------------------
setend be
setend le
@ CHECK: error: immediate operand must be in the range [0,1]
@ CHECK: error: immediate operand must be in the range [0,1]