Now that we know if we had a total fail on the instruction mnemonic,
authorChris Lattner <sabre@nondot.org>
Mon, 6 Sep 2010 21:54:15 +0000 (21:54 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 6 Sep 2010 21:54:15 +0000 (21:54 +0000)
commita008e8ac73cb3cf2eaf006fbb1b62905c8626758
tree8867189fb700584ffa41f74430dd93849bdc4577
parentfa0d74d58e6c70ef032afb5f83680276dc4d7370
Now that we know if we had a total fail on the instruction mnemonic,
give a more detailed error.  Before:

t.s:11:4: error: unrecognized instruction
   addl $1, $1
   ^
t.s:12:4: error: unrecognized instruction
   f2efqefa $1
   ^

After:

t.s:11:4: error: invalid operand for instruction
   addl $1, $1
   ^
t.s:12:4: error: invalid instruction mnemonic 'f2efqefa'
   f2efqefa $1
   ^

This fixes rdar://8017912 - llvm-mc says "unrecognized instruction" when it means "invalid operands"

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113176 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/AsmParser/X86AsmParser.cpp
utils/TableGen/AsmMatcherEmitter.cpp