[SystemZ] Improve AsmParser handling of invalid instructions
authorRichard Sandiford <rsandifo@linux.vnet.ibm.com>
Fri, 24 May 2013 14:26:46 +0000 (14:26 +0000)
committerRichard Sandiford <rsandifo@linux.vnet.ibm.com>
Fri, 24 May 2013 14:26:46 +0000 (14:26 +0000)
commitbfe3212dd807d018cb66479829fd81c8e7bd0f81
tree881fd3800ad9f6e1dc8560763aae90edd641b483
parentf386961da34426d12de8558ad04ad7f22c71489a
[SystemZ] Improve AsmParser handling of invalid instructions

Previously, an invalid instruction like:

foo     %r1, %r0

would generate the rather odd error message:

....: error: unknown token in expression
foo     %r1, %r0
^

We now get the more informative:

....: error: invalid instruction
foo     %r1, %r0
^

The same would happen if an address were used where a register was expected.
We now get "invalid operand for instruction" instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182644 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp
test/MC/SystemZ/regs-bad.s
test/MC/SystemZ/tokens.s [new file with mode: 0644]