[llvm-commits] [llvm] r115168 - in /llvm/trunk: lib/Target/X86/AsmParser/X86AsmParser.cpp test/MC/AsmParser/X86/x86_instructions.s
Chris Lattner
sabre at nondot.org
Thu Sep 30 10:11:29 PDT 2010
Author: lattner
Date: Thu Sep 30 12:11:29 2010
New Revision: 115168
URL: http://llvm.org/viewvc/llvm-project?rev=115168&view=rev
Log:
preemptively add the rest of the non-n fpstack instructions.
Modified:
llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp
llvm/trunk/test/MC/AsmParser/X86/x86_instructions.s
Modified: llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp?rev=115168&r1=115167&r2=115168&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp (original)
+++ llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp Thu Sep 30 12:11:29 2010
@@ -1120,7 +1120,8 @@
// First, handle aliases that expand to multiple instructions.
// FIXME: This should be replaced with a real .td file alias mechanism.
if (Op->getToken() == "fstsw" || Op->getToken() == "fstcw" ||
- Op->getToken() == "finit") {
+ Op->getToken() == "finit" || Op->getToken() == "fsave" ||
+ Op->getToken() == "fstenv") {
MCInst Inst;
Inst.setOpcode(X86::WAIT);
Out.EmitInstruction(Inst);
@@ -1128,9 +1129,11 @@
delete Operands[0];
const char *Repl =
StringSwitch<const char*>(Op->getToken())
- .Case("fstsw", "fnstsw")
- .Case("fstcw", "fnstcw")
.Case("finit", "fninit")
+ .Case("fsave", "fnsave")
+ .Case("fstcw", "fnstcw")
+ .Case("fstenv", "fnstenv")
+ .Case("fstsw", "fnstsw")
.Default(0);
assert(Repl && "Unknown wait-prefixed instruction");
Operands[0] = X86Operand::CreateToken(Repl, IDLoc);
Modified: llvm/trunk/test/MC/AsmParser/X86/x86_instructions.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/X86/x86_instructions.s?rev=115168&r1=115167&r2=115168&view=diff
==============================================================================
--- llvm/trunk/test/MC/AsmParser/X86/x86_instructions.s (original)
+++ llvm/trunk/test/MC/AsmParser/X86/x86_instructions.s Thu Sep 30 12:11:29 2010
@@ -431,6 +431,10 @@
// CHECK: wait
// CHECK: fninit
+fsave 32493
+// CHECK: wait
+// CHECK: fnsave 32493
+
// rdar://8456382 - cvtsd2si support.
cvtsd2si %xmm1, %rax
More information about the llvm-commits
mailing list