OSDN Git Service

[Asm, ARM] Add fallback diag for multiple invalid operands
authorOliver Stannard <oliver.stannard@arm.com>
Mon, 4 Dec 2017 12:02:32 +0000 (12:02 +0000)
committerOliver Stannard <oliver.stannard@arm.com>
Mon, 4 Dec 2017 12:02:32 +0000 (12:02 +0000)
commita53a7f062724ce041e148dd26df1f2fb5073d8d6
tree9c29f69b7d819ae105efc614123b0bdb404c5b5e
parent62f11d908ed4e9b576d6769cfdbce3e215c40cd1
[Asm, ARM] Add fallback diag for multiple invalid operands

This adds a "invalid operands for instruction" diagnostic for
instructions where there is an instruction encoding with the correct
mnemonic and which is available for this target, but where multiple
operands do not match those which were provided. This makes it clear
that there is some combination of operands that is valid for the current
target, which the default diagnostic of "invalid instruction" does not.

Since this is a very general error, we only emit it if we don't have a
more specific error.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319649 91177308-0d34-0410-b5e6-96231b3b80d8
13 files changed:
include/llvm/MC/MCParser/MCTargetAsmParser.h
lib/Target/ARM/AsmParser/ARMAsmParser.cpp
test/MC/ARM/diagnostics.s
test/MC/ARM/invalid-fp-armv8.s
test/MC/ARM/invalid-neon-v8.s
test/MC/ARM/ldrd-strd-gnu-arm-bad-regs.s
test/MC/ARM/ldrd-strd-gnu-bad-inst.s
test/MC/ARM/ldrd-strd-gnu-sp.s
test/MC/ARM/ldrd-strd-gnu-thumb-bad-regs.s
test/MC/ARM/thumb-mov.s
test/MC/ARM/thumb2-diagnostics.s
test/MC/ARM/vfp4.s
utils/TableGen/AsmMatcherEmitter.cpp