[llvm-branch-commits] [llvm-branch] r119198 - in /llvm/branches/Apple/whitney/lib/Target/X86: AsmParser/X86AsmParser.cpp X86InstrInfo.td
Daniel Dunbar
daniel at zuster.org
Mon Nov 15 13:43:11 PST 2010
Author: ddunbar
Date: Mon Nov 15 15:43:11 2010
New Revision: 119198
URL: http://llvm.org/viewvc/llvm-project?rev=119198&view=rev
Log:
Merge r117822:
--
Author: Chris Lattner <clattner at apple.com>
Date: Sat Oct 30 18:17:33 2010 +0000
move rep aliases to td file
Modified:
llvm/branches/Apple/whitney/lib/Target/X86/AsmParser/X86AsmParser.cpp
llvm/branches/Apple/whitney/lib/Target/X86/X86InstrInfo.td
Modified: llvm/branches/Apple/whitney/lib/Target/X86/AsmParser/X86AsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/whitney/lib/Target/X86/AsmParser/X86AsmParser.cpp?rev=119198&r1=119197&r2=119198&view=diff
==============================================================================
--- llvm/branches/Apple/whitney/lib/Target/X86/AsmParser/X86AsmParser.cpp (original)
+++ llvm/branches/Apple/whitney/lib/Target/X86/AsmParser/X86AsmParser.cpp Mon Nov 15 15:43:11 2010
@@ -620,13 +620,10 @@
bool X86ATTAsmParser::
ParseInstruction(StringRef Name, SMLoc NameLoc,
SmallVectorImpl<MCParsedAsmOperand*> &Operands) {
- // FIXME: Hack to recognize "sal..." and "rep..." for now. We need a way to
- // represent alternative syntaxes in the .td file, without requiring
- // instruction duplication.
+ // FIXME: Hack to recognize some aliases.
StringRef PatchedName = StringSwitch<StringRef>(Name)
.Case("repe", "rep")
.Case("repz", "rep")
- .Case("repnz", "repne")
.Case("push", Is64Bit ? "pushq" : "pushl")
.Case("pop", Is64Bit ? "popq" : "popl")
.Case("pushf", Is64Bit ? "pushfq" : "pushfl")
@@ -721,7 +718,8 @@
// Determine whether this is an instruction prefix.
bool isPrefix =
PatchedName == "lock" || PatchedName == "rep" ||
- PatchedName == "repne";
+ PatchedName == "repe" || PatchedName == "repz" ||
+ PatchedName == "repne" || PatchedName == "repnz";
// This does the actual operand parsing. Don't parse any more if we have a
Modified: llvm/branches/Apple/whitney/lib/Target/X86/X86InstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/whitney/lib/Target/X86/X86InstrInfo.td?rev=119198&r1=119197&r2=119198&view=diff
==============================================================================
--- llvm/branches/Apple/whitney/lib/Target/X86/X86InstrInfo.td (original)
+++ llvm/branches/Apple/whitney/lib/Target/X86/X86InstrInfo.td Mon Nov 15 15:43:11 2010
@@ -1269,6 +1269,10 @@
def : MnemonicAlias<"pushfd", "pushfl">;
def : MnemonicAlias<"popfd", "popfl">;
+def : MnemonicAlias<"repe", "rep">;
+def : MnemonicAlias<"repz", "rep">;
+def : MnemonicAlias<"repnz", "repne">;
+
def : MnemonicAlias<"salb", "shlb">;
def : MnemonicAlias<"salw", "shlw">;
def : MnemonicAlias<"sall", "shll">;
More information about the llvm-branch-commits
mailing list