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;
279 class SYNC_FM_MM : MMArch {
284 let Inst{31-26} = 0x00;
285 let Inst{25-21} = 0x0;
286 let Inst{20-16} = stype;
287 let Inst{15-6} = 0x1ad;
288 let Inst{5-0} = 0x3c;
291 class BRK_FM_MM : MMArch {
295 let Inst{31-26} = 0x0;
296 let Inst{25-16} = code_1;
297 let Inst{15-6} = code_2;
298 let Inst{5-0} = 0x07;
301 class SYS_FM_MM : MMArch {
304 let Inst{31-26} = 0x0;
305 let Inst{25-16} = code_;
306 let Inst{15-6} = 0x22d;
307 let Inst{5-0} = 0x3c;
310 class WAIT_FM_MM : MMArch {
313 let Inst{31-26} = 0x00;
314 let Inst{25-16} = 0x00;
315 let Inst{15-6} = 0x24d;
316 let Inst{5-0} = 0x3c;
319 class ER_FM_MM<bits<10> funct> : MMArch {
322 let Inst{31-26} = 0x00;
323 let Inst{25-16} = 0x00;
324 let Inst{15-6} = funct;
325 let Inst{5-0} = 0x3c;
328 class EI_FM_MM<bits<10> funct> : MMArch {
332 let Inst{31-26} = 0x00;
333 let Inst{25-21} = 0x00;
334 let Inst{20-16} = rt;
335 let Inst{15-6} = funct;
336 let Inst{5-0} = 0x3c;
339 class TEQ_FM_MM<bits<6> funct> : MMArch {
346 let Inst{31-26} = 0x00;
347 let Inst{25-21} = rt;
348 let Inst{20-16} = rs;
349 let Inst{15-12} = code_;
350 let Inst{11-6} = funct;
351 let Inst{5-0} = 0x3c;
354 class TEQI_FM_MM<bits<5> funct> : MMArch {
360 let Inst{31-26} = 0x10;
361 let Inst{25-21} = funct;
362 let Inst{20-16} = rs;
363 let Inst{15-0} = imm16;
366 class LL_FM_MM<bits<4> funct> {
372 let Inst{31-26} = 0x18;
373 let Inst{25-21} = rt;
374 let Inst{20-16} = addr{20-16};
375 let Inst{15-12} = funct;
376 let Inst{11-0} = addr{11-0};
379 class ADDS_FM_MM<bits<2> fmt, bits<8> funct> : MMArch {
386 let Inst{31-26} = 0x15;
387 let Inst{25-21} = ft;
388 let Inst{20-16} = fs;
389 let Inst{15-11} = fd;
392 let Inst{7-0} = funct;
394 list<dag> Pattern = [];
397 class LWXC1_FM_MM<bits<9> funct> : MMArch {
404 let Inst{31-26} = 0x15;
405 let Inst{25-21} = index;
406 let Inst{20-16} = base;
407 let Inst{15-11} = fd;
408 let Inst{10-9} = 0x0;
409 let Inst{8-0} = funct;
412 class SWXC1_FM_MM<bits<9> funct> : MMArch {
419 let Inst{31-26} = 0x15;
420 let Inst{25-21} = index;
421 let Inst{20-16} = base;
422 let Inst{15-11} = fs;
423 let Inst{10-9} = 0x0;
424 let Inst{8-0} = funct;
427 class CEQS_FM_MM<bits<2> fmt> : MMArch {
434 let Inst{31-26} = 0x15;
435 let Inst{25-21} = ft;
436 let Inst{20-16} = fs;
437 let Inst{15-13} = 0x0; // cc
439 let Inst{11-10} = fmt;
440 let Inst{9-6} = cond;
441 let Inst{5-0} = 0x3c;
444 class BC1F_FM_MM<bits<5> tf> : MMArch {
449 let Inst{31-26} = 0x10;
450 let Inst{25-21} = tf;
451 let Inst{20-18} = 0x0; // cc
452 let Inst{17-16} = 0x0;
453 let Inst{15-0} = offset;
456 class ROUND_W_FM_MM<bits<1> fmt, bits<8> funct> : MMArch {
462 let Inst{31-26} = 0x15;
463 let Inst{25-21} = fd;
464 let Inst{20-16} = fs;
467 let Inst{13-6} = funct;
468 let Inst{5-0} = 0x3b;
471 class ABS_FM_MM<bits<2> fmt, bits<7> funct> : MMArch {
477 let Inst{31-26} = 0x15;
478 let Inst{25-21} = fd;
479 let Inst{20-16} = fs;
481 let Inst{14-13} = fmt;
482 let Inst{12-6} = funct;
483 let Inst{5-0} = 0x3b;
486 class CMov_F_F_FM_MM<bits<9> func, bits<2> fmt> : MMArch {
492 let Inst{31-26} = 0x15;
493 let Inst{25-21} = fd;
494 let Inst{20-16} = fs;
495 let Inst{15-13} = 0x0; //cc
496 let Inst{12-11} = 0x0;
497 let Inst{10-9} = fmt;
498 let Inst{8-0} = func;
501 class CMov_I_F_FM_MM<bits<8> funct, bits<2> fmt> : MMArch {
508 let Inst{31-26} = 0x15;
509 let Inst{25-21} = rt;
510 let Inst{20-16} = fs;
511 let Inst{15-11} = fd;
513 let Inst{7-0} = funct;
516 class MFC1_FM_MM<bits<8> funct> : MMArch {
522 let Inst{31-26} = 0x15;
523 let Inst{25-21} = rt;
524 let Inst{20-16} = fs;
525 let Inst{15-14} = 0x0;
526 let Inst{13-6} = funct;
527 let Inst{5-0} = 0x3b;
530 class MADDS_FM_MM<bits<6> funct>: MMArch {
538 let Inst{31-26} = 0x15;
539 let Inst{25-21} = ft;
540 let Inst{20-16} = fs;
541 let Inst{15-11} = fd;
543 let Inst{5-0} = funct;