Fix the JIT encoding of VSEL

llvm-svn: 27160
This commit is contained in:
Chris Lattner 2006-03-27 03:34:17 +00:00
parent df59d5314c
commit 1738c293b5
2 changed files with 24 additions and 4 deletions

View File

@ -116,16 +116,16 @@ def VNMSUBFP: VAForm_1<47, (ops VRRC:$vD, VRRC:$vA, VRRC:$vC, VRRC:$vB),
VRRC:$vB)))]>,
Requires<[FPContractions]>;
def VPERM : VAForm_1<43, (ops VRRC:$vD, VRRC:$vA, VRRC:$vC, VRRC:$vB),
"vperm $vD, $vA, $vB, $vC", VecPerm,
[(set VRRC:$vD,
def VPERM : VAForm_1a<43, (ops VRRC:$vD, VRRC:$vA, VRRC:$vB, VRRC:$vC),
"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))]>;
def VSEL : VAForm_1<42, (ops VRRC:$vD, VRRC:$vA, VRRC:$vB, VRRC:$vC),
def VSEL : VAForm_1a<42, (ops VRRC:$vD, VRRC:$vA, VRRC:$vB, VRRC:$vC),
"vsel $vD, $vA, $vB, $vC", VecFP,
[(set VRRC:$vD,
(int_ppc_altivec_vsel VRRC:$vA, VRRC:$vB, VRRC:$vC))]>;

View File

@ -590,6 +590,8 @@ class MDForm_1<bits<6> opcode, bits<3> xo, dag OL, string asmstr,
}
// E-1 VA-Form
// VAForm_1 - DACB ordering.
class VAForm_1<bits<6> xo, dag OL, string asmstr,
InstrItinClass itin, list<dag> pattern>
: I<4, OL, asmstr, itin> {
@ -607,6 +609,24 @@ class VAForm_1<bits<6> xo, dag OL, string asmstr,
let Inst{26-31} = xo;
}
// VAForm_1a - DABC ordering.
class VAForm_1a<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<5> VC;
let Pattern = pattern;
let Inst{6-10} = VD;
let Inst{11-15} = VA;
let Inst{16-20} = VB;
let Inst{21-25} = VC;
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> {