X86 MC: Handle instructions like fxsave that match multiple operand sizes
authorReid Kleckner <reid@kleckner.net>
Wed, 27 Aug 2014 20:10:38 +0000 (20:10 +0000)
committerReid Kleckner <reid@kleckner.net>
Wed, 27 Aug 2014 20:10:38 +0000 (20:10 +0000)
commit2ab3b563da6fca59e0a5fc4fbc621b80c7c6649e
treea8ee5f4668985b562d71c192f1263adffa67e50c
parent8ee308f4991942e391689e26806cd2fbdfd59b7d
X86 MC: Handle instructions like fxsave that match multiple operand sizes

Instructions like 'fxsave' and control flow instructions like 'jne'
match any operand size. The loop I added to the Intel syntax matcher
assumed that using a different size would give a different instruction.
Now it handles the case where we get the same instruction for different
memory operand sizes.

This also allows us to remove the hack we had for unsized absolute
memory operands, because we can successfully match things like 'jnz'
without reporting ambiguity.  Removing this hack uncovered test case
involving 'fadd' that was ambiguous. The memory operand could have been
single or double precision.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216604 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/AsmParser/X86AsmParser.cpp
test/MC/X86/intel-syntax-ambiguous.s
test/MC/X86/intel-syntax.s