blob: c54272d4ba8ce5524fd57d9f08986faa05bcae6e [file] [log] [blame]
Joerg Sonnenberger39f095a2014-08-07 12:18:21 +00001//=======-- PPCInstrSPE.td - The PowerPC SPE Extension -*- tablegen -*-=======//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This file describes the Signal Processing Engine extension to
11// the PowerPC instruction set.
12//
13//===----------------------------------------------------------------------===//
14
15class EVXForm_1<bits<11> xo, dag OOL, dag IOL, string asmstr,
16 InstrItinClass itin> : I<4, OOL, IOL, asmstr, itin> {
17 bits<5> RT;
18 bits<5> RA;
19 bits<5> RB;
20
21 let Pattern = [];
22
23 let Inst{6-10} = RT;
24 let Inst{11-15} = RA;
25 let Inst{16-20} = RB;
26 let Inst{21-31} = xo;
27}
28
29let Predicates = [HasSPE], isAsmParserOnly = 1 in {
30
31def EVMRA : EVXForm_1<1220, (outs gprc:$RT), (ins gprc:$RA),
32 "evmra $RT, $RA", IIC_VecFP> {
33 let RB = 0;
34}
35
36def EVLDDX : EVXForm_1<768, (outs gprc:$RT), (ins gprc:$RA, gprc:$RB),
37 "evlddx $RT, $RA, $RB", IIC_VecFP>;
38def EVLDWX : EVXForm_1<770, (outs gprc:$RT), (ins gprc:$RA, gprc:$RB),
39 "evldwx $RT, $RA, $RB", IIC_VecFP>;
40def EVLDHX : EVXForm_1<772, (outs gprc:$RT), (ins gprc:$RA, gprc:$RB),
41 "evldhx $RT, $RA, $RB", IIC_VecFP>;
42def EVLHHESPLATX : EVXForm_1<776, (outs gprc:$RT), (ins gprc:$RA, gprc:$RB),
43 "evlhhesplatx $RT, $RA, $RB", IIC_VecFP>;
44def EVLHHOUSPLATX : EVXForm_1<780, (outs gprc:$RT), (ins gprc:$RA, gprc:$RB),
45 "evlhhousplatx $RT, $RA, $RB", IIC_VecFP>;
46def EVLHHOSSPLATX : EVXForm_1<782, (outs gprc:$RT), (ins gprc:$RA, gprc:$RB),
47 "evlhhossplatx $RT, $RA, $RB", IIC_VecFP>;
48def EVLWHEX : EVXForm_1<784, (outs gprc:$RT), (ins gprc:$RA, gprc:$RB),
49 "evlwhex $RT, $RA, $RB", IIC_VecFP>;
50def EVLWHOUX : EVXForm_1<788, (outs gprc:$RT), (ins gprc:$RA, gprc:$RB),
51 "evlwhoux $RT, $RA, $RB", IIC_VecFP>;
52def EVLWHOSX : EVXForm_1<790, (outs gprc:$RT), (ins gprc:$RA, gprc:$RB),
53 "evlwhosx $RT, $RA, $RB", IIC_VecFP>;
54def EVLWWSPLATX : EVXForm_1<792, (outs gprc:$RT), (ins gprc:$RA, gprc:$RB),
55 "evlwwsplatx $RT, $RA, $RB", IIC_VecFP>;
56def EVLWHSPLATX : EVXForm_1<796, (outs gprc:$RT), (ins gprc:$RA, gprc:$RB),
57 "evlwhsplatx $RT, $RA, $RB", IIC_VecFP>;
58
59def EVMERGEHI : EVXForm_1<556, (outs gprc:$RT), (ins gprc:$RA, gprc:$RB),
60 "evmergehi $RT, $RA, $RB", IIC_VecFP>;
61def EVMERGELO : EVXForm_1<557, (outs gprc:$RT), (ins gprc:$RA, gprc:$RB),
62 "evmergelo $RT, $RA, $RB", IIC_VecFP>;
63def EVMERGEHILO : EVXForm_1<558, (outs gprc:$RT), (ins gprc:$RA, gprc:$RB),
64 "evmergehilo $RT, $RA, $RB", IIC_VecFP>;
65def EVMERGELOHI : EVXForm_1<559, (outs gprc:$RT), (ins gprc:$RA, gprc:$RB),
66 "evmergelohi $RT, $RA, $RB", IIC_VecFP>;
67
68} // HasSPE