1 //===-- MicroMipsDSPInstrFormats.td - Instruction Formats --*- 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 class MMDSPInst<string opstr = "">
11 : MipsInst<(outs), (ins), "", [], NoItinerary, FrmOther>, PredicateControl {
12 let InsnPredicates = [HasDSP];
13 let AdditionalPredicates = [InMicroMips];
14 string BaseOpcode = opstr;
15 string Arch = "mmdsp";
16 let DecoderNamespace = "MicroMips";
19 class POOL32A_3R_FMT<string opstr, bits<11> op> : MMDSPInst<opstr> {
24 let Inst{31-26} = 0b000000;
31 class POOL32A_2R_FMT<string opstr, bits<10> op> : MMDSPInst<opstr> {
35 let Inst{31-26} = 0b000000;
39 let Inst{5-0} = 0b111100;
42 class POOL32A_2RAC_FMT<string opstr, bits<8> op> : MMDSPInst<opstr> {
47 let Inst{31-26} = 0b000000;
52 let Inst{5-0} = 0b111100;
55 class POOL32A_3RB0_FMT<string opstr, bits<10> op> : MMDSPInst<opstr> {
60 let Inst{31-26} = 0b000000;
68 class POOL32A_2RSA4_FMT<string opstr, bits<12> op> : MMDSPInst<opstr> {
73 let Inst{31-26} = 0b000000;
80 class POOL32A_2RSA3_FMT<string opstr, bits<7> op> : MMDSPInst<opstr> {
85 let Inst{31-26} = 0b000000;
90 let Inst{5-0} = 0b111100;
93 class POOL32A_2RSA5B0_FMT<string opstr, bits<10> op> : MMDSPInst<opstr> {
98 let Inst{31-26} = 0b000000;
100 let Inst{20-16} = rs;
101 let Inst{15-11} = sa;
106 class POOL32A_2RSA4B0_FMT<string opstr, bits<11> op> : MMDSPInst<opstr> {
111 let Inst{31-26} = 0b000000;
112 let Inst{25-21} = rt;
113 let Inst{20-16} = rs;
114 let Inst{15-12} = sa;
119 class POOL32A_2RSA4OP6_FMT<string opstr, bits<6> op> : MMDSPInst<opstr> {
124 let Inst{31-26} = 0b000000;
125 let Inst{25-21} = rt;
126 let Inst{20-16} = rs;
127 let Inst{15-12} = sa;
129 let Inst{5-0} = 0b111100;
132 class POOL32A_1RIMM5AC_FMT<string opstr, bits<8> funct> : MMDSPInst<opstr> {
137 let Inst{31-26} = 0b000000;
138 let Inst{25-21} = rt;
139 let Inst{20-16} = imm;
140 let Inst{15-14} = ac;
141 let Inst{13-6} = funct;
142 let Inst{5-0} = 0b111100;