[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCInstrAltivec.td PPCInstrFormats.td
Chris Lattner
lattner at cs.uiuc.edu
Sat Mar 25 16:42:01 PST 2006
Changes in directory llvm/lib/Target/PowerPC:
PPCInstrAltivec.td updated: 1.5 -> 1.6
PPCInstrFormats.td updated: 1.67 -> 1.68
---
Log message:
implement the vsldoi intrinsic.
---
Diffs of the changes: (+26 -4)
PPCInstrAltivec.td | 12 ++++++++----
PPCInstrFormats.td | 18 ++++++++++++++++++
2 files changed, 26 insertions(+), 4 deletions(-)
Index: llvm/lib/Target/PowerPC/PPCInstrAltivec.td
diff -u llvm/lib/Target/PowerPC/PPCInstrAltivec.td:1.5 llvm/lib/Target/PowerPC/PPCInstrAltivec.td:1.6
--- llvm/lib/Target/PowerPC/PPCInstrAltivec.td:1.5 Sat Mar 25 17:10:40 2006
+++ llvm/lib/Target/PowerPC/PPCInstrAltivec.td Sat Mar 25 18:41:48 2006
@@ -71,13 +71,13 @@
def LVEBX: XForm_1<31, 7, (ops VRRC:$vD, memrr:$src),
"lvebx $vD, $src", LdStGeneral,
[(set VRRC:$vD, (v16i8 (PPClve_x xoaddr:$src)))]>;
-def LVEHX: XForm_1<31, 39, (ops VRRC:$vD, memrr:$src),
+def LVEHX: XForm_1<31, 39, (ops VRRC:$vD, memrr:$src),
"lvehx $vD, $src", LdStGeneral,
[(set VRRC:$vD, (v8i16 (PPClve_x xoaddr:$src)))]>;
-def LVEWX: XForm_1<31, 71, (ops VRRC:$vD, memrr:$src),
+def LVEWX: XForm_1<31, 71, (ops VRRC:$vD, memrr:$src),
"lvewx $vD, $src", LdStGeneral,
[(set VRRC:$vD, (v4f32 (PPClve_x xoaddr:$src)))]>;
-def LVX : XForm_1<31, 103, (ops VRRC:$vD, memrr:$src),
+def LVX : XForm_1<31, 103, (ops VRRC:$vD, memrr:$src),
"lvx $vD, $src", LdStGeneral,
[(set VRRC:$vD, (v4f32 (load xoaddr:$src)))]>;
}
@@ -121,7 +121,11 @@
"vperm $vD, $vA, $vB, $vC", VecPerm,
[(set VRRC:$vD,
(PPCvperm (v4f32 VRRC:$vA), VRRC:$vB, VRRC:$vC))]>;
-
+def VSLDOI : VAForm_2<44, (ops VRRC:$vD, VRRC:$vA, VRRC:$vB, u5imm:$SH),
+ "vsldoi $vD, $vA, $vB, $SH", VecFP,
+ [(set VRRC:$vD,
+ (int_ppc_altivec_vsldoi VRRC:$vA, VRRC:$vB,
+ imm:$SH))]>;
// VX-Form instructions. AltiVec arithmetic ops.
def VADDCUW : VXForm_1<384, (ops VRRC:$vD, VRRC:$vA, VRRC:$vB),
Index: llvm/lib/Target/PowerPC/PPCInstrFormats.td
diff -u llvm/lib/Target/PowerPC/PPCInstrFormats.td:1.67 llvm/lib/Target/PowerPC/PPCInstrFormats.td:1.68
--- llvm/lib/Target/PowerPC/PPCInstrFormats.td:1.67 Tue Mar 21 19:44:36 2006
+++ llvm/lib/Target/PowerPC/PPCInstrFormats.td Sat Mar 25 18:41:48 2006
@@ -607,6 +607,24 @@
let Inst{26-31} = xo;
}
+class VAForm_2<bits<6> xo, dag OL, string asmstr,
+ InstrItinClass itin, list<dag> pattern>
+ : I<4, OL, asmstr, itin> {
+ bits<5> VD;
+ bits<5> VA;
+ bits<5> VB;
+ bits<4> SH;
+
+ let Pattern = pattern;
+
+ let Inst{6-10} = VD;
+ let Inst{11-15} = VA;
+ let Inst{16-20} = VB;
+ let Inst{21} = 0;
+ let Inst{22-25} = SH;
+ let Inst{26-31} = xo;
+}
+
// E-2 VX-Form
class VXForm_1<bits<11> xo, dag OL, string asmstr,
InstrItinClass itin, list<dag> pattern>
More information about the llvm-commits
mailing list