[llvm-commits] CVS: llvm/lib/Target/PowerPC/PowerPCInstrInfo.td
Chris Lattner
lattner at cs.uiuc.edu
Wed Sep 14 11:18:51 PDT 2005
Changes in directory llvm/lib/Target/PowerPC:
PowerPCInstrInfo.td updated: 1.97 -> 1.98
---
Log message:
Fix some bugs noticed by new checking code
---
Diffs of the changes: (+14 -8)
PowerPCInstrInfo.td | 22 ++++++++++++++--------
1 files changed, 14 insertions(+), 8 deletions(-)
Index: llvm/lib/Target/PowerPC/PowerPCInstrInfo.td
diff -u llvm/lib/Target/PowerPC/PowerPCInstrInfo.td:1.97 llvm/lib/Target/PowerPC/PowerPCInstrInfo.td:1.98
--- llvm/lib/Target/PowerPC/PowerPCInstrInfo.td:1.97 Fri Sep 9 13:17:41 2005
+++ llvm/lib/Target/PowerPC/PowerPCInstrInfo.td Wed Sep 14 13:18:39 2005
@@ -400,16 +400,16 @@
[]>, isDOT;
def ORI : DForm_4<24, (ops GPRC:$dst, GPRC:$src1, u16imm:$src2),
"ori $dst, $src1, $src2",
- [(set GPRC:$rD, (or GPRC:$rA, immZExt16:$imm))]>;
+ [(set GPRC:$dst, (or GPRC:$src1, immZExt16:$src2))]>;
def ORIS : DForm_4<25, (ops GPRC:$dst, GPRC:$src1, u16imm:$src2),
"oris $dst, $src1, $src2",
- [(set GPRC:$rD, (or GPRC:$rA, imm16Shifted:$imm))]>;
+ [(set GPRC:$dst, (or GPRC:$src1, imm16Shifted:$src2))]>;
def XORI : DForm_4<26, (ops GPRC:$dst, GPRC:$src1, u16imm:$src2),
"xori $dst, $src1, $src2",
- [(set GPRC:$rD, (xor GPRC:$rA, immZExt16:$imm))]>;
+ [(set GPRC:$dst, (xor GPRC:$src1, immZExt16:$src2))]>;
def XORIS : DForm_4<27, (ops GPRC:$dst, GPRC:$src1, u16imm:$src2),
"xoris $dst, $src1, $src2",
- [(set GPRC:$rD, (xor GPRC:$rA, imm16Shifted:$imm))]>;
+ [(set GPRC:$dst, (xor GPRC:$src2, imm16Shifted:$src2))]>;
def NOP : DForm_4_zero<24, (ops), "nop">;
def CMPI : DForm_5<11, (ops CRRC:$crD, i1imm:$L, GPRC:$rA, s16imm:$imm),
"cmpi $crD, $L, $rA, $imm">;
@@ -473,7 +473,7 @@
[(set GPRC:$rA, (not (and GPRC:$rS, GPRC:$rB)))]>;
def AND : XForm_6<31, 28, (ops GPRC:$rA, GPRC:$rS, GPRC:$rB),
"and $rA, $rS, $rB",
- [(set GPRC:$rT, (and GPRC:$rA, GPRC:$rB))]>;
+ [(set GPRC:$rA, (and GPRC:$rS, GPRC:$rB))]>;
def ANDo : XForm_6<31, 28, (ops GPRC:$rA, GPRC:$rS, GPRC:$rB),
"and. $rA, $rS, $rB",
[]>, isDOT;
@@ -482,7 +482,7 @@
[(set GPRC:$rA, (and GPRC:$rS, (not GPRC:$rB)))]>;
def OR : XForm_6<31, 444, (ops GPRC:$rA, GPRC:$rS, GPRC:$rB),
"or $rA, $rS, $rB",
- [(set GPRC:$rT, (or GPRC:$rA, GPRC:$rB))]>;
+ [(set GPRC:$rA, (or GPRC:$rS, GPRC:$rB))]>;
def NOR : XForm_6<31, 124, (ops GPRC:$rA, GPRC:$rS, GPRC:$rB),
"nor $rA, $rS, $rB",
[(set GPRC:$rA, (not (or GPRC:$rS, GPRC:$rB)))]>;
@@ -494,10 +494,10 @@
[(set GPRC:$rA, (or GPRC:$rS, (not GPRC:$rB)))]>;
def EQV : XForm_6<31, 284, (ops GPRC:$rA, GPRC:$rS, GPRC:$rB),
"eqv $rA, $rS, $rB",
- [(set GPRC:$rT, (not (xor GPRC:$rA, GPRC:$rB)))]>;
+ [(set GPRC:$rA, (not (xor GPRC:$rS, GPRC:$rB)))]>;
def XOR : XForm_6<31, 316, (ops GPRC:$rA, GPRC:$rS, GPRC:$rB),
"xor $rA, $rS, $rB",
- [(set GPRC:$rT, (xor GPRC:$rA, GPRC:$rB))]>;
+ [(set GPRC:$rA, (xor GPRC:$rS, GPRC:$rB))]>;
def SLD : XForm_6<31, 27, (ops GPRC:$rA, GPRC:$rS, GPRC:$rB),
"sld $rA, $rS, $rB",
[]>, isPPC64;
@@ -773,6 +773,12 @@
def : Pat<(xor GPRC:$in, imm:$imm),
(XORIS (XORI GPRC:$in, (LO16 imm:$imm)), (HI16 imm:$imm))>;
+// Same as above, but using a temporary.
+def : Pattern<(xor GPRC:$in, imm:$imm),
+ [(set GPRC:$tmp, (XORI GPRC:$in, (LO16 imm:$imm))),
+ (XORIS GPRC:$tmp, (HI16 imm:$imm))]>;
+
+
//===----------------------------------------------------------------------===//
// PowerPCInstrInfo Definition
//
More information about the llvm-commits
mailing list