OSDN Git Service

ARMAsmParser: clean up of isImmediate functions
authorSjoerd Meijer <sjoerd.meijer@arm.com>
Mon, 3 Apr 2017 14:50:04 +0000 (14:50 +0000)
committerSjoerd Meijer <sjoerd.meijer@arm.com>
Mon, 3 Apr 2017 14:50:04 +0000 (14:50 +0000)
commitd369b4141bc4bebf87f53b6a27bca49491b4c9fa
tree7df8a544388cc90960fd9e87bbdaba874d8ae615
parent38c71d62897980e84cf0e5d7f293f455fc5a3fac
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299358 91177308-0d34-0410-b5e6-96231b3b80d8
14 files changed:
lib/Target/ARM/ARMInstrFormats.td
lib/Target/ARM/ARMInstrInfo.td
lib/Target/ARM/ARMInstrThumb.td
lib/Target/ARM/ARMInstrThumb2.td
lib/Target/ARM/AsmParser/ARMAsmParser.cpp
test/MC/ARM/basic-arm-instructions-v8.1a.s
test/MC/ARM/diagnostics.s
test/MC/ARM/negative-immediates-fail.s
test/MC/ARM/negative-immediates-thumb1-fail.s
test/MC/ARM/thumb-diagnostics.s
test/MC/ARM/thumb-not-mclass.s
test/MC/ARM/thumb2-diagnostics.s
test/MC/ARM/udf-arm-diagnostics.s
test/MC/ARM/udf-thumb-2-diagnostics.s