Now that we know if we had a total fail on the instruction mnemonic,
commit114fe8e732fc66092fdce3b87e6d39db34ae6806
authorChris Lattner <sabre@nondot.org>
Mon, 6 Sep 2010 21:54:15 +0000 (6 21:54 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 6 Sep 2010 21:54:15 +0000 (6 21:54 +0000)
tree8867189fb700584ffa41f74430dd93849bdc4577
parent8ecfab9ee19200f5473b76b8adb8637bbd25a38e
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