1 //===-- PPCInstrFutureMMA.td - Future Instruction Set ------*- tablegen -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file describes the instructions introduced for the Future CPU for MMA.
12 //===----------------------------------------------------------------------===//
14 class XX3Form_AT3_XABp5_P1<bits<6> opcode, bits<8> xo, dag OOL, dag IOL,
15 string asmstr, list<dag> pattern>
16 : I<opcode, OOL, IOL, asmstr, NoItinerary> {
22 let Pattern = pattern;
24 let Inst{6-8} = AT{2-0};
26 let Inst{11-14} = XAp{3-0};
28 let Inst{16-19} = XBp{3-0};
31 let Inst{29} = XAp{4};
32 let Inst{30} = XBp{4};
36 class XX2Form_AT3_XBp5_P2<bits<6> opcode, bits<9> xo, dag OOL, dag IOL,
37 string asmstr, list<dag> pattern>
38 : I<opcode, OOL, IOL, asmstr, NoItinerary> {
43 let Pattern = pattern;
45 let Inst{6-8} = AT{2-0};
48 let Inst{16-19} = XBp{3-0};
51 let Inst{30} = XBp{4};
55 class XForm_ATB3<bits<6> opcode, bits<5> o, bits<10> xo, dag OOL, dag IOL,
56 string asmstr, list<dag> pattern>
57 : I <opcode, OOL, IOL, asmstr, NoItinerary> {
61 let Pattern = pattern;
63 let Inst{6-8} = AT{2-0};
66 let Inst{16-18} = AB{2-0};
72 let Predicates = [IsISAFuture] in {
73 def DMXXEXTFDMR512 : XX3Form_AT3_XABp5_P1<60, 226,
74 (outs vsrprc:$XAp, vsrprc:$XBp),
76 "dmxxextfdmr512 $AT, $XAp, $XBp, 0", []> {
80 def DMXXEXTFDMR512_HI : XX3Form_AT3_XABp5_P1<60, 226,
81 (outs vsrprc:$XAp, vsrprc:$XBp),
83 "dmxxextfdmr512 $AT, $XAp, $XBp, 1", []> {
87 def DMXXINSTFDMR512 : XX3Form_AT3_XABp5_P1<60, 234, (outs wacc:$AT),
88 (ins vsrprc:$XAp, vsrprc:$XBp),
89 "dmxxinstfdmr512 $AT, $XAp, $XBp, 0", []> {
93 def DMXXINSTFDMR512_HI : XX3Form_AT3_XABp5_P1<60, 234, (outs wacc_hi:$AT),
94 (ins vsrprc:$XAp, vsrprc:$XBp),
95 "dmxxinstfdmr512 $AT, $XAp, $XBp, 1", []> {
99 def DMXXEXTFDMR256 : XX2Form_AT3_XBp5_P2<60, 484, (outs vsrprc:$XBp),
100 (ins dmrrowp:$AT, u2imm:$P),
101 "dmxxextfdmr256 $AT, $XBp, $P", []>;
103 def DMXXINSTFDMR256 : XX2Form_AT3_XBp5_P2<60, 485, (outs dmrrowp:$AT),
104 (ins vsrprc:$XBp, u2imm:$P),
105 "dmxxinstfdmr256 $AT, $XBp, $P", []>;
107 def DMMR : XForm_ATB3<31, 6, 177, (outs dmr:$AT), (ins dmr:$AB),
108 "dmmr $AT, $AB", []>;
110 def DMXOR : XForm_ATB3<31, 7, 177, (outs dmr:$AT), (ins dmr:$ATi, dmr:$AB),
111 "dmxor $AT, $AB", []>,
112 RegConstraint<"$ATi = $AT">, NoEncode<"$ATi">;
114 def DMSETDMRZ : XForm_AT3<31, 2, 177, (outs dmr:$AT), (ins),
115 "dmsetdmrz $AT", NoItinerary, []>;