OSDN Git Service

[ARM, Asm] Add diagnostics for general-purpose register operands
authorOliver Stannard <oliver.stannard@arm.com>
Tue, 10 Oct 2017 12:31:53 +0000 (12:31 +0000)
committerOliver Stannard <oliver.stannard@arm.com>
Tue, 10 Oct 2017 12:31:53 +0000 (12:31 +0000)
commitfe1782b4a9756b3278ff1a13c5ef1535bcf70b8d
tree50a88620486133266f28949f1389c38f0e320720
parent73de2f1810fe717c6bf56724d59de6ce32c23dea
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315303 91177308-0d34-0410-b5e6-96231b3b80d8
16 files changed:
lib/Target/ARM/ARMRegisterInfo.td
lib/Target/ARM/AsmParser/ARMAsmParser.cpp
test/MC/ARM/basic-thumb2-instructions-v8.s
test/MC/ARM/diagnostics.s
test/MC/ARM/ldrd-strd-gnu-thumb-bad-regs.s
test/MC/ARM/lsl-zero-errors.s
test/MC/ARM/negative-immediates-fail.s
test/MC/ARM/negative-immediates-thumb1-fail.s
test/MC/ARM/register-token-source-loc.s
test/MC/ARM/thumb-branch-errors.s
test/MC/ARM/thumb-diagnostics.s
test/MC/ARM/thumb-mov.s
test/MC/ARM/thumb2-diagnostics.s
test/MC/ARM/thumb2-strd.s
test/MC/ARM/thumbv8m.s
test/MC/ARM/vmrs_vmsr.s