[llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaInstrInfo.td

Chris Lattner lattner at cs.uiuc.edu
Wed Oct 19 20:57:15 PDT 2005



Changes in directory llvm/lib/Target/Alpha:

AlphaInstrInfo.td updated: 1.60 -> 1.61
---
Log message:

simplify this a bit by using immediates


---
Diffs of the changes:  (+16 -24)

 AlphaInstrInfo.td |   40 ++++++++++++++++------------------------
 1 files changed, 16 insertions(+), 24 deletions(-)


Index: llvm/lib/Target/Alpha/AlphaInstrInfo.td
diff -u llvm/lib/Target/Alpha/AlphaInstrInfo.td:1.60 llvm/lib/Target/Alpha/AlphaInstrInfo.td:1.61
--- llvm/lib/Target/Alpha/AlphaInstrInfo.td:1.60	Wed Oct 19 19:28:31 2005
+++ llvm/lib/Target/Alpha/AlphaInstrInfo.td	Wed Oct 19 22:57:03 2005
@@ -20,14 +20,6 @@
   // field.  Used by instructions like 'addi'.
   return (unsigned long)N->getValue() == (unsigned char)N->getValue();
 }]>;
-def imm2  : PatLeaf<(imm), [{
-  // imm2 predicate - True if the immediate is a 2
-  return N->getValue() == 2;
-}]>;
-def imm3  : PatLeaf<(imm), [{
-  // imm3 predicate - True if the immediate is a 3
-  return N->getValue() == 3;
-}]>;
 
 
   // //#define FP    $15
@@ -217,37 +209,37 @@
 def ORNOTi   : OFormL<0x11, 0x28, "ornot $RA,$L,$RC", []>;
 //                      [(set GPRC:$RC, (or GPRC:$RA, (not immUExt8:$L)))]>;
 def S4ADDL   : OForm< 0x10, 0x02, "s4addl $RA,$RB,$RC", 
-                      [(set GPRC:$RC, (sext_inreg (add (shl GPRC:$RA, imm2), GPRC:$RB), i32))]>;
+                      [(set GPRC:$RC, (sext_inreg (add (shl GPRC:$RA, 2), GPRC:$RB), i32))]>;
 def S4ADDLi  : OFormL<0x10, 0x02, "s4addl $RA,$L,$RC", 
-                      [(set GPRC:$RC, (sext_inreg (add (shl GPRC:$RA, imm2), immUExt8:$L), i32))]>;
+                      [(set GPRC:$RC, (sext_inreg (add (shl GPRC:$RA, 2), immUExt8:$L), i32))]>;
 def S4ADDQ   : OForm< 0x10, 0x22, "s4addq $RA,$RB,$RC", 
-                      [(set GPRC:$RC, (add (shl GPRC:$RA, imm2), GPRC:$RB))]>;
+                      [(set GPRC:$RC, (add (shl GPRC:$RA, 2), GPRC:$RB))]>;
 def S4ADDQi  : OFormL<0x10, 0x22, "s4addq $RA,$L,$RC", 
-                      [(set GPRC:$RC, (add (shl GPRC:$RA, imm2), immUExt8:$L))]>;
+                      [(set GPRC:$RC, (add (shl GPRC:$RA, 2), immUExt8:$L))]>;
 def S4SUBL   : OForm< 0x10, 0x0B, "s4subl $RA,$RB,$RC",
-                      [(set GPRC:$RC, (sext_inreg (sub (shl GPRC:$RA, imm2), GPRC:$RB), i32))]>;
+                      [(set GPRC:$RC, (sext_inreg (sub (shl GPRC:$RA, 2), GPRC:$RB), i32))]>;
 def S4SUBLi  : OFormL<0x10, 0x0B, "s4subl $RA,$L,$RC",
-                      [(set GPRC:$RC, (sext_inreg (sub (shl GPRC:$RA, imm2), immUExt8:$L), i32))]>;
+                      [(set GPRC:$RC, (sext_inreg (sub (shl GPRC:$RA, 2), immUExt8:$L), i32))]>;
 def S4SUBQ   : OForm< 0x10, 0x2B, "s4subq $RA,$RB,$RC", 
-                      [(set GPRC:$RC, (sub (shl GPRC:$RA, imm2), GPRC:$RB))]>;
+                      [(set GPRC:$RC, (sub (shl GPRC:$RA, 2), GPRC:$RB))]>;
 def S4SUBQi  : OFormL<0x10, 0x2B, "s4subq $RA,$L,$RC", 
-                      [(set GPRC:$RC, (sub (shl GPRC:$RA, imm2), immUExt8:$L))]>;
+                      [(set GPRC:$RC, (sub (shl GPRC:$RA, 2), immUExt8:$L))]>;
 def S8ADDL   : OForm< 0x10, 0x12, "s8addl $RA,$RB,$RC", 
-                      [(set GPRC:$RC, (sext_inreg (add (shl GPRC:$RA, imm3), GPRC:$RB), i32))]>;
+                      [(set GPRC:$RC, (sext_inreg (add (shl GPRC:$RA, 3), GPRC:$RB), i32))]>;
 def S8ADDLi  : OFormL<0x10, 0x12, "s8addl $RA,$L,$RC", 
-                      [(set GPRC:$RC, (sext_inreg (add (shl GPRC:$RA, imm3), immUExt8:$L), i32))]>;
+                      [(set GPRC:$RC, (sext_inreg (add (shl GPRC:$RA, 3), immUExt8:$L), i32))]>;
 def S8ADDQ   : OForm< 0x10, 0x32, "s8addq $RA,$RB,$RC", 
-                      [(set GPRC:$RC, (add (shl GPRC:$RA, imm3), GPRC:$RB))]>;
+                      [(set GPRC:$RC, (add (shl GPRC:$RA, 3), GPRC:$RB))]>;
 def S8ADDQi  : OFormL<0x10, 0x32, "s8addq $RA,$L,$RC", 
-                      [(set GPRC:$RC, (add (shl GPRC:$RA, imm3), immUExt8:$L))]>;
+                      [(set GPRC:$RC, (add (shl GPRC:$RA, 3), immUExt8:$L))]>;
 def S8SUBL   : OForm< 0x10, 0x1B, "s8subl $RA,$RB,$RC", 
-                      [(set GPRC:$RC, (sext_inreg (sub (shl GPRC:$RA, imm3), GPRC:$RB), i32))]>;
+                      [(set GPRC:$RC, (sext_inreg (sub (shl GPRC:$RA, 3), GPRC:$RB), i32))]>;
 def S8SUBLi  : OFormL<0x10, 0x1B, "s8subl $RA,$L,$RC", 
-                      [(set GPRC:$RC, (sext_inreg (sub (shl GPRC:$RA, imm3), immUExt8:$L), i32))]>;
+                      [(set GPRC:$RC, (sext_inreg (sub (shl GPRC:$RA, 3), immUExt8:$L), i32))]>;
 def S8SUBQ   : OForm< 0x10, 0x3B, "s8subq $RA,$RB,$RC", 
-                      [(set GPRC:$RC, (sub (shl GPRC:$RA, imm3), GPRC:$RB))]>;
+                      [(set GPRC:$RC, (sub (shl GPRC:$RA, 3), GPRC:$RB))]>;
 def S8SUBQi  : OFormL<0x10, 0x3B, "s8subq $RA,$L,$RC", 
-                      [(set GPRC:$RC, (sub (shl GPRC:$RA, imm3), immUExt8:$L))]>;
+                      [(set GPRC:$RC, (sub (shl GPRC:$RA, 3), immUExt8:$L))]>;
 
 def SEXTB    : OForm< 0x1C, 0x00, "sextb $RB,$RC", []>; //Sign extend byte
 def SEXTW    : OForm< 0x1C, 0x01, "sextw $RB,$RC", []>; //Sign extend word






More information about the llvm-commits mailing list