correct suffix matching to search for s/l/t suffixes on
authorChris Lattner <sabre@nondot.org>
Sat, 6 Nov 2010 18:28:02 +0000 (18:28 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 6 Nov 2010 18:28:02 +0000 (18:28 +0000)
commitfb7000fcbde3b5257ac055e1e5abdee5df21842b
tree6bba41c2b56d8a55f6de082e98d604e70a115c1b
parentf788854d20b12c60fd8b43c587adb3227b6b1bff
correct suffix matching to search for s/l/t suffixes on
floating point stack instructions instead of looking for b/w/l/q.

This fixes issues where we'd accidentally match fistp to fistpl,
when it is in fact an ambiguous instruction.

This changes the behavior of llvm-mc to reject fstp, which was the
correct fix for rdar://8456389:
t.s:1:1: error: ambiguous instructions require an explicit suffix (could be 'fstps', 'fstpl', or 'fstpt')
fstp (%rax)

it also causes us to correctly reject fistp and fist, which addresses
PR8528:

t.s:2:1: error: ambiguous instructions require an explicit suffix (could be 'fistps', or 'fistpl')
fistp (%rax)
^
t.s:3:1: error: ambiguous instructions require an explicit suffix (could be 'fists', or 'fistl')
fist (%rax)
^

Thanks to Ismail Donmez for tracking down the issue here!

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