summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-09-22 04:04:03 +0000
committerChris Lattner <sabre@nondot.org>2010-09-22 04:04:03 +0000
commit0c289c140ee7a68e3d06b9d8ae6060758345ad4e (patch)
treea88e0238d640881505a9ff92eac64adb2cdbb189 /lib
parent61129252e44067ae112dc856c64c814344b7e7c9 (diff)
downloadllvm-0c289c140ee7a68e3d06b9d8ae6060758345ad4e.tar.gz
llvm-0c289c140ee7a68e3d06b9d8ae6060758345ad4e.tar.bz2
llvm-0c289c140ee7a68e3d06b9d8ae6060758345ad4e.tar.xz
fix rdar://8456389 - llvm-mc mismatch with 'as' on 'fstp'
-This line, and those below, will be ignored-- M test/MC/AsmParser/X86/x86_instructions.s M lib/Target/X86/AsmParser/X86AsmParser.cpp git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114527 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/X86/AsmParser/X86AsmParser.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Target/X86/AsmParser/X86AsmParser.cpp b/lib/Target/X86/AsmParser/X86AsmParser.cpp
index 4c51ed674e..d8650e0604 100644
--- a/lib/Target/X86/AsmParser/X86AsmParser.cpp
+++ b/lib/Target/X86/AsmParser/X86AsmParser.cpp
@@ -1015,6 +1015,14 @@ ParseInstruction(StringRef Name, SMLoc NameLoc,
Operands[0] = X86Operand::CreateToken("movsl", NameLoc);
}
+ // fstp <mem> -> fstps <mem>. Without this, we'll default to fstpl due to
+ // suffix searching.
+ if (Name == "fstp" && Operands.size() == 2 &&
+ static_cast<X86Operand*>(Operands[1])->isMem()) {
+ delete Operands[0];
+ Operands[0] = X86Operand::CreateToken("fstps", NameLoc);
+ }
+
return false;
}