[llvm-commits] [llvm] r117823 - in /llvm/trunk/lib/Target/X86: AsmParser/X86AsmParser.cpp X86InstrInfo.td

Chris Lattner sabre at nondot.org
Sat Oct 30 11:22:53 PDT 2010


Author: lattner
Date: Sat Oct 30 13:22:53 2010
New Revision: 117823

URL: http://llvm.org/viewvc/llvm-project?rev=117823&view=rev
Log:
move fcompi alias to .td file and zap some useless code.

Modified:
    llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp
    llvm/trunk/lib/Target/X86/X86InstrInfo.td

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=117823&r1=117822&r2=117823&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp (original)
+++ llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp Sat Oct 30 13:22:53 2010
@@ -622,8 +622,6 @@
                  SmallVectorImpl<MCParsedAsmOperand*> &Operands) {
   // FIXME: Hack to recognize some aliases.
   StringRef PatchedName = StringSwitch<StringRef>(Name)
-    .Case("repe", "rep")
-    .Case("repz", "rep")
     .Case("push", Is64Bit ? "pushq" : "pushl")
     .Case("pop", Is64Bit ? "popq" : "popl")
     .Case("pushf", Is64Bit ? "pushfq" : "pushfl")
@@ -921,15 +919,6 @@
                                              NameLoc, NameLoc));
   }
 
-  // The assembler accepts this instruction with no operand as a synonym for an
-  // instruction taking %st(1),%st(0). e.g. "fcompi" -> "fcompi %st(1),st(0)".
-  if (Name == "fcompi" && Operands.size() == 1) {
-    Operands.push_back(X86Operand::CreateReg(MatchRegisterName("st(1)"),
-                                             NameLoc, NameLoc));
-    Operands.push_back(X86Operand::CreateReg(MatchRegisterName("st(0)"),
-                                             NameLoc, NameLoc));
-  }
-
   // The assembler accepts these instructions with two few operands as a synonym
   // for taking %st(1),%st(0) or X, %st(0).
   if ((Name == "fcomi" || Name == "fucomi" || Name == "fucompi" ||

Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.td?rev=117823&r1=117822&r2=117823&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrInfo.td (original)
+++ llvm/trunk/lib/Target/X86/X86InstrInfo.td Sat Oct 30 13:22:53 2010
@@ -1293,6 +1293,7 @@
 def : MnemonicAlias<"fcmovnae", "fcmovb">;
 def : MnemonicAlias<"fcmovna",  "fcmovbe">;
 def : MnemonicAlias<"fcmovae",  "fcmovnb">;
+def : MnemonicAlias<"fcompi",   "fcomip">;
 def : MnemonicAlias<"fildq",    "fildll">;
 def : MnemonicAlias<"fldcww",   "fldcw">;
 def : MnemonicAlias<"fnstcww", "fnstcw">;





More information about the llvm-commits mailing list