[llvm-commits] [llvm] r118358 - /llvm/trunk/lib/Target/X86/X86InstrInfo.td
Chris Lattner
sabre at nondot.org
Sat Nov 6 15:05:44 PDT 2010
Author: lattner
Date: Sat Nov 6 17:05:43 2010
New Revision: 118358
URL: http://llvm.org/viewvc/llvm-project?rev=118358&view=rev
Log:
work-in-progress
Modified:
llvm/trunk/lib/Target/X86/X86InstrInfo.td
Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.td?rev=118358&r1=118357&r2=118358&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrInfo.td (original)
+++ llvm/trunk/lib/Target/X86/X86InstrInfo.td Sat Nov 6 17:05:43 2010
@@ -1504,9 +1504,9 @@
// errors, since its encoding is the most compact.
def : InstAlias<"sldt $mem", (SLDT16m i16mem:$mem)>;
-// "rc[lr] X" is an alias for "rcl X, 1"
/*
-multiclass RotateAlias<string Mnemonic, string Opc> {
+// "shl X, $1" is an alias for "shl X".
+multiclass ShiftRotateByOneAlias<string Mnemonic, string Opc> {
def : InstAlias<!strconcat(Mnemonic, "b $op, $$1"),
(!cast<Instruction>(!strconcat(Opc, "8r1")) GR8:$op)>;
def : InstAlias<!strconcat(Mnemonic, "w $op, $$1"),
@@ -1525,13 +1525,12 @@
(!cast<Instruction>(!strconcat(Opc, "64m1")) i64mem:$op)>;
}
-defm : RotateAlias<"rcl", "RCL">;
-defm : RotateAlias<"rcr", "RCR">;
-defm : RotateAlias<"rol", "ROL">;
-defm : RotateAlias<"ror", "ROR">;
+defm : ShiftRotateByOneAlias<"rcl", "RCL">;
+defm : ShiftRotateByOneAlias<"rcr", "RCR">;
+defm : ShiftRotateByOneAlias<"rol", "ROL">;
+defm : ShiftRotateByOneAlias<"ror", "ROR">;
*/
-
// test: We accept "testX <reg>, <mem>" and "testX <mem>, <reg>" as synonyms.
def : InstAlias<"testb $val, $mem", (TEST8rm GR8 :$val, i8mem :$mem)>;
def : InstAlias<"testw $val, $mem", (TEST16rm GR16:$val, i16mem:$mem)>;
More information about the llvm-commits
mailing list