[llvm-commits] [llvm] r115156 - 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 09:42:53 PDT 2010
Author: lattner
Date: Thu Sep 30 11:42:53 2010
New Revision: 115156
URL: http://llvm.org/viewvc/llvm-project?rev=115156&view=rev
Log:
implement support for finit, PR8258
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=115156&r1=115155&r2=115156&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp (original)
+++ llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp Thu Sep 30 11:42:53 2010
@@ -1119,7 +1119,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") {
+ if (Op->getToken() == "fstsw" || Op->getToken() == "fstcw" ||
+ Op->getToken() == "finit") {
MCInst Inst;
Inst.setOpcode(X86::WAIT);
Out.EmitInstruction(Inst);
@@ -1129,6 +1130,7 @@
StringSwitch<const char*>(Op->getToken())
.Case("fstsw", "fnstsw")
.Case("fstcw", "fnstcw")
+ .Case("finit", "fninit")
.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=115156&r1=115155&r2=115156&view=diff
==============================================================================
--- llvm/trunk/test/MC/AsmParser/X86/x86_instructions.s (original)
+++ llvm/trunk/test/MC/AsmParser/X86/x86_instructions.s Thu Sep 30 11:42:53 2010
@@ -421,6 +421,16 @@
// CHECK: wait
// CHECK: fnstcw (%rsp)
+// PR8259
+fstcw (%rsp)
+// CHECK: wait
+// CHECK: fnstcw (%rsp)
+
+// PR8258
+finit
+// CHECK: wait
+// CHECK: fninit
+
// rdar://8456382 - cvtsd2si support.
cvtsd2si %xmm1, %rax
More information about the llvm-commits
mailing list