2 string Arch = "micromips";
3 list<dag> Pattern = [];
6 class ADD_FM_MM<bits<6> op, bits<10> funct> : MMArch {
18 let Inst{9-0} = funct;
21 class ADDI_FM_MM<bits<6> op> : MMArch {
31 let Inst{15-0} = imm16;
34 class SLTI_FM_MM<bits<6> op> : MMArch {
44 let Inst{15-0} = imm16;
47 class LUI_FM_MM : MMArch {
53 let Inst{31-26} = 0x10;
54 let Inst{25-21} = 0xd;
56 let Inst{15-0} = imm16;
59 class MULT_FM_MM<bits<10> funct> : MMArch {
65 let Inst{31-26} = 0x00;
68 let Inst{15-6} = funct;
72 class SRA_FM_MM<bits<10> funct, bit rotate> : MMArch {
82 let Inst{15-11} = shamt;
83 let Inst{10} = rotate;
84 let Inst{9-0} = funct;
87 class SRLV_FM_MM<bits<10> funct, bit rotate> : MMArch {
98 let Inst{10} = rotate;
99 let Inst{9-0} = funct;
102 class LW_FM_MM<bits<6> op> : MMArch {
108 let Inst{31-26} = op;
109 let Inst{25-21} = rt;
110 let Inst{20-16} = addr{20-16};
111 let Inst{15-0} = addr{15-0};
114 class LWL_FM_MM<bits<4> funct> {
120 let Inst{31-26} = 0x18;
121 let Inst{25-21} = rt;
122 let Inst{20-16} = addr{20-16};
123 let Inst{15-12} = funct;
124 let Inst{11-0} = addr{11-0};
127 class CMov_F_I_FM_MM<bits<7> func> : MMArch {
134 let Inst{31-26} = 0x15;
135 let Inst{25-21} = rd;
136 let Inst{20-16} = rs;
137 let Inst{15-13} = fcc;
138 let Inst{12-6} = func;
139 let Inst{5-0} = 0x3b;
142 class MTLO_FM_MM<bits<10> funct> : MMArch {
147 let Inst{31-26} = 0x00;
148 let Inst{25-21} = 0x00;
149 let Inst{20-16} = rs;
150 let Inst{15-6} = funct;
151 let Inst{5-0} = 0x3c;
154 class MFLO_FM_MM<bits<10> funct> : MMArch {
159 let Inst{31-26} = 0x00;
160 let Inst{25-21} = 0x00;
161 let Inst{20-16} = rd;
162 let Inst{15-6} = funct;
163 let Inst{5-0} = 0x3c;
166 class CLO_FM_MM<bits<10> funct> : MMArch {
172 let Inst{31-26} = 0x00;
173 let Inst{25-21} = rd;
174 let Inst{20-16} = rs;
175 let Inst{15-6} = funct;
176 let Inst{5-0} = 0x3c;
179 class SEB_FM_MM<bits<10> funct> : MMArch {
185 let Inst{31-26} = 0x00;
186 let Inst{25-21} = rd;
187 let Inst{20-16} = rt;
188 let Inst{15-6} = funct;
189 let Inst{5-0} = 0x3c;
192 class EXT_FM_MM<bits<6> funct> : MMArch {
200 let Inst{31-26} = 0x00;
201 let Inst{25-21} = rt;
202 let Inst{20-16} = rs;
203 let Inst{15-11} = size;
204 let Inst{10-6} = pos;
205 let Inst{5-0} = funct;
208 class J_FM_MM<bits<6> op> : MMArch {
213 let Inst{31-26} = op;
214 let Inst{25-0} = target;
217 class JR_FM_MM<bits<8> funct> : MMArch {
222 let Inst{31-21} = 0x00;
223 let Inst{20-16} = rs;
224 let Inst{15-14} = 0x0;
225 let Inst{13-6} = funct;
226 let Inst{5-0} = 0x3c;
229 class JALR_FM_MM<bits<10> funct> : MMArch {
235 let Inst{31-26} = 0x00;
236 let Inst{25-21} = rd;
237 let Inst{20-16} = rs;
238 let Inst{15-6} = funct;
239 let Inst{5-0} = 0x3c;
242 class BEQ_FM_MM<bits<6> op> : MMArch {
249 let Inst{31-26} = op;
250 let Inst{25-21} = rt;
251 let Inst{20-16} = rs;
252 let Inst{15-0} = offset;
255 class BGEZ_FM_MM<bits<5> funct> : MMArch {
261 let Inst{31-26} = 0x10;
262 let Inst{25-21} = funct;
263 let Inst{20-16} = rs;
264 let Inst{15-0} = offset;
267 class BGEZAL_FM_MM<bits<5> funct> : MMArch {
273 let Inst{31-26} = 0x10;
274 let Inst{25-21} = funct;
275 let Inst{20-16} = rs;
276 let Inst{15-0} = offset;