[mips][microMIPS] Implement PAUSE, RDHWR, RDPGPR, SDBBP, SSNOP, SYNC, SYNCI and WAIT...
[oota-llvm.git] / lib / Target / Mips / MicroMips32r6InstrFormats.td
1 //=- MicroMips32r6InstrFormats.td - Mips32r6 Instruction Formats -*- 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 microMIPS32r6 instruction formats.
11 //
12 //===----------------------------------------------------------------------===//
13
14 class MMR6Arch<string opstr> {
15   string Arch = "micromipsr6";
16   string BaseOpcode = opstr;
17 }
18
19 // Class used for microMIPS32r6 and microMIPS64r6 instructions.
20 class MicroMipsR6Inst16 : PredicateControl {
21   string DecoderNamespace = "MicroMipsR6";
22   let InsnPredicates = [HasMicroMips32r6];
23 }
24
25 class BC16_FM_MM16R6 {
26   bits<10> offset;
27
28   bits<16> Inst;
29
30   let Inst{15-10} = 0x33;
31   let Inst{9-0}   = offset;
32 }
33
34 class BEQZC_BNEZC_FM_MM16R6<bits<6> op> : MicroMipsR6Inst16 {
35   bits<3> rs;
36   bits<7> offset;
37
38   bits<16> Inst;
39
40   let Inst{15-10} = op;
41   let Inst{9-7}   = rs;
42   let Inst{6-0}   = offset;
43 }
44
45 class POOL16C_JALRC_FM_MM16R6<bits<5> op> {
46   bits<5> rs;
47
48   bits<16> Inst;
49
50   let Inst{15-10} = 0x11;
51   let Inst{9-5}   = rs;
52   let Inst{4-0}   = op;
53 }
54
55 class POOL16C_JRCADDIUSP_FM_MM16R6<bits<5> op> {
56   bits<5> imm;
57
58   bits<16> Inst;
59
60   let Inst{15-10} = 0x11;
61   let Inst{9-5}   = imm;
62   let Inst{4-0}   = op;
63 }
64
65 class POOL32A_BITSWAP_FM_MMR6<bits<6> funct> : MipsR6Inst {
66   bits<5> rd;
67   bits<5> rt;
68
69   bits<32> Inst;
70
71   let Inst{31-26} = 0b000000;
72   let Inst{25-21} = rt;
73   let Inst{20-16} = rd;
74   let Inst{15-12} = 0b0000;
75   let Inst{11-6} = funct;
76   let Inst{5-0} = 0b111100;
77 }
78
79 class CACHE_PREF_FM_MMR6<bits<6> opgroup, bits<4> funct> : MipsR6Inst {
80   bits<21> addr;
81   bits<5> hint;
82
83   bits<32> Inst;
84
85   let Inst{31-26} = opgroup;
86   let Inst{25-21} = hint;
87   let Inst{20-16} = addr{20-16};
88   let Inst{15-12} = funct;
89   let Inst{11-0}  = addr{11-0};
90 }
91
92 class ARITH_FM_MMR6<string instr_asm, bits<10> funct> : MMR6Arch<instr_asm> {
93   bits<5> rd;
94   bits<5> rt;
95   bits<5> rs;
96
97   bits<32> Inst;
98
99   let Inst{31-26} = 0;
100   let Inst{25-21} = rt;
101   let Inst{20-16} = rs;
102   let Inst{15-11} = rd;
103   let Inst{10}    = 0;
104   let Inst{9-0}   = funct;
105 }
106
107 class ADDI_FM_MMR6<string instr_asm, bits<6> op> : MMR6Arch<instr_asm> {
108   bits<5>  rt;
109   bits<5>  rs;
110   bits<16> imm16;
111
112   bits<32> Inst;
113
114   let Inst{31-26} = op;
115   let Inst{25-21} = rt;
116   let Inst{20-16} = rs;
117   let Inst{15-0}  = imm16;
118 }
119
120 class POOL32C_ST_EVA_FM_MMR6<bits<6> op, bits<3> funct> : MipsR6Inst {
121   bits<21> addr;
122   bits<5> hint;
123   bits<5> base = addr{20-16};
124   bits<9> offset = addr{8-0};
125
126   bits<32> Inst;
127
128   let Inst{31-26} = op;
129   let Inst{25-21} = hint;
130   let Inst{20-16} = base;
131   let Inst{15-12} = 0b1010;
132   let Inst{11-9} = funct;
133   let Inst{8-0}  = offset;
134 }
135
136 class LB32_FM_MMR6 : MipsR6Inst {
137   bits<21> addr;
138   bits<5> rt;
139   bits<5> base = addr{20-16};
140   bits<16> offset = addr{15-0};
141
142   bits<32> Inst;
143
144   let Inst{31-26} = 0b000111;
145   let Inst{25-21} = rt;
146   let Inst{20-16} = base;
147   let Inst{15-0}  = offset;
148 }
149
150 class LBU32_FM_MMR6 : MipsR6Inst {
151   bits<21> addr;
152   bits<5> rt;
153   bits<5> base = addr{20-16};
154   bits<16> offset = addr{15-0};
155
156   bits<32> Inst;
157
158   let Inst{31-26} = 0b000101;
159   let Inst{25-21} = rt;
160   let Inst{20-16} = base;
161   let Inst{15-0}  = offset;
162 }
163
164 class POOL32C_LB_LBU_FM_MMR6<bits<3> funct> : MipsR6Inst {
165   bits<21> addr;
166   bits<5> rt;
167
168   bits<32> Inst;
169
170   let Inst{31-26} = 0b011000;
171   let Inst{25-21} = rt;
172   let Inst{20-16} = addr{20-16};
173   let Inst{15-12} = 0b0110;
174   let Inst{11-9} = funct;
175   let Inst{8-0}  = addr{8-0};
176 }
177
178 class SIGN_EXTEND_FM_MMR6<string instr_asm, bits<10> funct>
179     : MMR6Arch<instr_asm> {
180   bits<5> rd;
181   bits<5> rt;
182
183   bits<32> Inst;
184
185   let Inst{31-26} = 0b000000;
186   let Inst{25-21} = rd;
187   let Inst{20-16} = rt;
188   let Inst{15-6}  = funct;
189   let Inst{5-0}   = 0b111100;
190 }
191
192 class PCREL19_FM_MMR6<bits<2> funct> : MipsR6Inst {
193   bits<5> rt;
194   bits<19> imm;
195
196   bits<32> Inst;
197
198   let Inst{31-26} = 0b011110;
199   let Inst{25-21} = rt;
200   let Inst{20-19} = funct;
201   let Inst{18-0}  = imm;
202 }
203
204 class PCREL16_FM_MMR6<bits<5> funct> : MipsR6Inst {
205   bits<5> rt;
206   bits<16> imm;
207
208   bits<32> Inst;
209
210   let Inst{31-26} = 0b011110;
211   let Inst{25-21} = rt;
212   let Inst{20-16} = funct;
213   let Inst{15-0}  = imm;
214 }
215
216 class POOL32A_FM_MMR6<bits<10> funct> : MipsR6Inst {
217   bits<5> rd;
218   bits<5> rs;
219   bits<5> rt;
220
221   bits<32> Inst;
222
223   let Inst{31-26} = 0b000000;
224   let Inst{25-21} = rt;
225   let Inst{20-16} = rs;
226   let Inst{15-11} = rd;
227   let Inst{10}    = 0;
228   let Inst{9-0}   = funct;
229 }
230
231 class POOL32A_PAUSE_FM_MMR6<string instr_asm, bits<5> op> : MMR6Arch<instr_asm> {
232   bits<32> Inst;
233
234   let Inst{31-26} = 0;
235   let Inst{25-21} = 0;
236   let Inst{20-16} = 0;
237   let Inst{15-11} = op;
238   let Inst{10-6} = 0;
239   let Inst{5-0} = 0;
240 }
241
242 class POOL32A_RDPGPR_FM_MMR6<bits<10> funct> {
243   bits<5> rt;
244   bits<5> rd;
245   bits<32> Inst;
246
247   let Inst{31-26} = 0;
248   let Inst{25-21} = rt;
249   let Inst{20-16} = rd;
250   let Inst{15-6} = funct;
251   let Inst{5-0} = 0b111100;
252 }
253
254 class POOL32A_RDHWR_FM_MMR6 {
255   bits<5> rt;
256   bits<5> rs;
257   bits<3> sel;
258   bits<32> Inst;
259
260   let Inst{31-26} = 0;
261   let Inst{25-21} = rt;
262   let Inst{20-16} = rs;
263   let Inst{15-14} = 0;
264   let Inst{13-11} = sel;
265   let Inst{10} = 0;
266   let Inst{9-0} = 0b0111000000;
267 }
268
269 class POOL32A_SYNC_FM_MMR6 {
270   bits<5> stype;
271
272   bits<32> Inst;
273
274   let Inst{31-26} = 0;
275   let Inst{25-21} = 0;
276   let Inst{20-16} = stype;
277   let Inst{15-6}  = 0b0110101101;
278   let Inst{5-0}   = 0b111100;
279 }
280
281 class POOL32I_SYNCI_FM_MMR6 {
282   bits<21> addr;
283   bits<5> base = addr{20-16};
284   bits<16> immediate = addr{15-0};
285
286   bits<32> Inst;
287
288   let Inst{31-26} = 0b010000;
289   let Inst{25-21} = 0b01100;
290   let Inst{20-16} = base;
291   let Inst{15-0}  = immediate;
292 }
293
294 class POOL32A_2R_FM_MMR6<bits<10> funct> : MipsR6Inst {
295   bits<5> rs;
296   bits<5> rt;
297
298   bits<32> Inst;
299
300   let Inst{31-26} = 0b000000;
301   let Inst{25-21} = rt;
302   let Inst{20-16} = rs;
303   let Inst{15-6}  = funct;
304   let Inst{5-0}   = 0b111100;
305 }
306
307 class SPECIAL_2R_FM_MMR6<bits<6> funct> : MipsR6Inst {
308   bits<5> rs;
309   bits<5> rt;
310
311   bits<32> Inst;
312
313   let Inst{31-26} = 0b000000;
314   let Inst{25-21} = rs;
315   let Inst{20-16} = 0b00000;
316   let Inst{15-11} = rt;
317   let Inst{10-6}  = 0b00001;
318   let Inst{5-0}   = funct;
319 }
320
321 class POOL32A_ALIGN_FM_MMR6<bits<6> funct> : MipsR6Inst {
322   bits<5> rd;
323   bits<5> rs;
324   bits<5> rt;
325   bits<2> bp;
326
327   bits<32> Inst;
328
329   let Inst{31-26} = 0b000000;
330   let Inst{25-21} = rs;
331   let Inst{20-16} = rt;
332   let Inst{15-11} = rd;
333   let Inst{10-9}  = bp;
334   let Inst{8-6}   = 0b000;
335   let Inst{5-0}   = funct;
336 }
337
338 class AUI_FM_MMR6 : MipsR6Inst {
339   bits<5> rs;
340   bits<5> rt;
341   bits<16> imm;
342
343   bits<32> Inst;
344
345   let Inst{31-26} = 0b000100;
346   let Inst{25-21} = rt;
347   let Inst{20-16} = rs;
348   let Inst{15-0} = imm;
349 }
350
351 class POOL32A_LSA_FM<bits<6> funct> : MipsR6Inst {
352   bits<5> rd;
353   bits<5> rs;
354   bits<5> rt;
355   bits<2> imm2;
356
357   bits<32> Inst;
358
359   let Inst{31-26} = 0b000000;
360   let Inst{25-21} = rt;
361   let Inst{20-16} = rs;
362   let Inst{15-11} = rd;
363   let Inst{10-9}  = imm2;
364   let Inst{8-6}   = 0b000;
365   let Inst{5-0}   = funct;
366 }
367
368 class SB32_SH32_STORE_FM_MMR6<bits<6> op> {
369   bits<5> rt;
370   bits<21> addr;
371   bits<5> base = addr{20-16};
372   bits<16> offset = addr{15-0};
373
374   bits<32> Inst;
375
376   let Inst{31-26} = op;
377   let Inst{25-21} = rt;
378   let Inst{20-16} = base;
379   let Inst{15-0}  = offset;
380 }
381
382 class POOL32C_STORE_EVA_FM_MMR6<bits<3> funct> {
383   bits<5> rt;
384   bits<21> addr;
385   bits<5> base = addr{20-16};
386   bits<9> offset = addr{8-0};
387
388   bits<32> Inst;
389
390   let Inst{31-26} = 0b011000;
391   let Inst{25-21} = rt;
392   let Inst{20-16} = base;
393   let Inst{15-12} = 0b1010;
394   let Inst{11-9}  = funct;
395   let Inst{8-0}   = offset;
396 }
397
398 class LOAD_WORD_EVA_FM_MMR6<bits<3> funct> {
399   bits<5> rt;
400   bits<21> addr;
401   bits<5> base = addr{20-16};
402   bits<9> offset = addr{8-0};
403
404   bits<32> Inst;
405
406   let Inst{31-26} = 0b011000;
407   let Inst{25-21} = rt;
408   let Inst{20-16} = base;
409   let Inst{15-12} = 0b0110;
410   let Inst{11-9}  = funct;
411   let Inst{8-0}   = offset;
412 }
413
414 class LOAD_WORD_FM_MMR6 {
415   bits<5> rt;
416   bits<21> addr;
417   bits<5> base = addr{20-16};
418   bits<16> offset = addr{15-0};
419
420   bits<32> Inst;
421
422   let Inst{31-26} = 0b111111;
423   let Inst{25-21} = rt;
424   let Inst{20-16} = base;
425   let Inst{15-0}  = offset;
426 }
427
428 class LOAD_UPPER_IMM_FM_MMR6 {
429   bits<5> rt;
430   bits<16> imm16;
431
432   bits<32> Inst;
433
434   let Inst{31-26} = 0b000100;
435   let Inst{25-21} = rt;
436   let Inst{20-16} = 0;
437   let Inst{15-0}  = imm16;
438 }
439
440 class CMP_BRANCH_1R_RT_OFF16_FM_MMR6<bits<6> funct> : MipsR6Inst {
441   bits<5> rt;
442   bits<16> offset;
443
444   bits<32> Inst;
445
446   let Inst{31-26} = funct;
447   let Inst{25-21} = rt;
448   let Inst{20-16} = 0b00000;
449   let Inst{15-0}  = offset;
450 }
451
452 class CMP_BRANCH_1R_BOTH_OFF16_FM_MMR6<bits<6> funct> : MipsR6Inst {
453   bits<5> rt;
454   bits<16> offset;
455
456   bits<32> Inst;
457
458   let Inst{31-26} = funct;
459   let Inst{25-21} = rt;
460   let Inst{20-16} = rt;
461   let Inst{15-0}  = offset;
462 }
463
464 class ERET_FM_MMR6<string instr_asm> : MMR6Arch<instr_asm> {
465   bits<32> Inst;
466
467   let Inst{31-26} = 0x00;
468   let Inst{25-16} = 0x00;
469   let Inst{15-6}  = 0x3cd;
470   let Inst{5-0}   = 0x3c;
471 }
472
473 class ERETNC_FM_MMR6<string instr_asm> : MMR6Arch<instr_asm> {
474   bits<32> Inst;
475
476   let Inst{31-26} = 0x00;
477   let Inst{25-17} = 0x00;
478   let Inst{16-16} = 0x01;
479   let Inst{15-6}  = 0x3cd;
480   let Inst{5-0}   = 0x3c;
481 }
482
483 class BREAK_MMR6_ENC<string instr_asm> : MMR6Arch<instr_asm> {
484   bits<10> code_1;
485   bits<10> code_2;
486   bits<32> Inst;
487   let Inst{31-26} = 0x0;
488   let Inst{25-16} = code_1;
489   let Inst{15-6}  = code_2;
490   let Inst{5-0}   = 0x07;
491 }
492
493 class BARRIER_MMR6_ENC<string instr_asm, bits<5> op> : MMR6Arch<instr_asm> {
494   bits<32> Inst;
495
496   let Inst{31-26} = 0x0;
497   let Inst{25-21} = 0x0;
498   let Inst{20-16} = 0x0;
499   let Inst{15-11} = op;
500   let Inst{10-6}  = 0x0;
501   let Inst{5-0}   = 0x0;
502 }
503
504 class EIDI_MMR6_ENC<string instr_asm, bits<10> funct> : MMR6Arch<instr_asm> {
505   bits<32> Inst;
506   bits<5> rt; // Actually rs but we're sharing code with the standard encodings which call it rt
507
508   let Inst{31-26} = 0x00;
509   let Inst{25-21} = 0x00;
510   let Inst{20-16} = rt;
511   let Inst{15-6}  = funct;
512   let Inst{5-0}   = 0x3c;
513 }
514
515 class SHIFT_MMR6_ENC<string instr_asm, bits<10> funct, bit rotate> : MMR6Arch<instr_asm> {
516   bits<5> rd;
517   bits<5> rt;
518   bits<5> shamt;
519
520   bits<32> Inst;
521
522   let Inst{31-26} = 0;
523   let Inst{25-21} = rd;
524   let Inst{20-16} = rt;
525   let Inst{15-11} = shamt;
526   let Inst{10}    = rotate;
527   let Inst{9-0}   = funct;
528 }
529
530 class SW32_FM_MMR6<string instr_asm, bits<6> op> : MMR6Arch<instr_asm> {
531   bits<5> rt;
532   bits<21> addr;
533
534   bits<32> Inst;
535
536   let Inst{31-26} = op;
537   let Inst{25-21} = rt;
538   let Inst{20-16} = addr{20-16};
539   let Inst{15-0}  = addr{15-0};
540 }
541
542 class POOL32C_SWE_FM_MMR6<string instr_asm, bits<6> op, bits<4> fmt,
543     bits<3> funct> : MMR6Arch<instr_asm> {
544   bits<5> rt;
545   bits<21> addr;
546   bits<5> base = addr{20-16};
547   bits<9> offset = addr{8-0};
548
549   bits<32> Inst;
550
551   let Inst{31-26} = op;
552   let Inst{25-21} = rt;
553   let Inst{20-16} = base;
554   let Inst{15-12} = fmt;
555   let Inst{11-9} = funct;
556   let Inst{8-0}  = offset;
557 }
558
559 class POOL32F_ARITH_FM_MMR6<string instr_asm, bits<2> fmt, bits<8> funct>
560     : MMR6Arch<instr_asm>, MipsR6Inst {
561   bits<5> ft;
562   bits<5> fs;
563   bits<5> fd;
564
565   bits<32> Inst;
566
567   let Inst{31-26} = 0b010101;
568   let Inst{25-21} = ft;
569   let Inst{20-16} = fs;
570   let Inst{15-11} = fd;
571   let Inst{10}    = 0;
572   let Inst{9-8}   = fmt;
573   let Inst{7-0}   = funct;
574 }
575
576 class POOL32F_ARITHF_FM_MMR6<string instr_asm, bits<2> fmt, bits<9> funct>
577     : MMR6Arch<instr_asm>, MipsR6Inst {
578   bits<5> ft;
579   bits<5> fs;
580   bits<5> fd;
581
582   bits<32> Inst;
583
584   let Inst{31-26} = 0b010101;
585   let Inst{25-21} = ft;
586   let Inst{20-16} = fs;
587   let Inst{15-11} = fd;
588   let Inst{10-9}  = fmt;
589   let Inst{8-0}   = funct;
590 }
591
592 class POOL32F_MOV_NEG_FM_MMR6<string instr_asm, bits<2> fmt, bits<7> funct>
593     : MMR6Arch<instr_asm>, MipsR6Inst {
594   bits<5> ft;
595   bits<5> fs;
596
597   bits<32> Inst;
598
599   let Inst{31-26} = 0b010101;
600   let Inst{25-21} = ft;
601   let Inst{20-16} = fs;
602   let Inst{15}    = 0;
603   let Inst{14-13} = fmt;
604   let Inst{12-6}  = funct;
605   let Inst{5-0}   = 0b111011;
606 }
607
608 class POOL32F_MINMAX_FM<string instr_asm, bits<2> fmt, bits<9> funct>
609     : MMR6Arch<instr_asm>, MipsR6Inst {
610   bits<5> ft;
611   bits<5> fs;
612   bits<5> fd;
613
614   bits<32> Inst;
615
616   let Inst{31-26} = 0b010101;
617   let Inst{25-21} = ft;
618   let Inst{20-16} = fs;
619   let Inst{15-11} = fd;
620   let Inst{10-9} = fmt;
621   let Inst{8-0} = funct;
622 }
623
624 class POOL32F_CMP_FM<string instr_asm, bits<6> format, FIELD_CMP_COND Cond>
625     : MMR6Arch<instr_asm>, MipsR6Inst {
626   bits<5> ft;
627   bits<5> fs;
628   bits<5> fd;
629
630   bits<32> Inst;
631
632   let Inst{31-26} = 0b010101;
633   let Inst{25-21} = ft;
634   let Inst{20-16} = fs;
635   let Inst{15-11} = fd;
636   let Inst{10-6} = Cond.Value;
637   let Inst{5-0} = format;
638 }
639
640 class POOL32F_CVT_LW_FM<string instr_asm, bit fmt, bits<8> funct>
641     : MMR6Arch<instr_asm>, MipsR6Inst {
642   bits<5> ft;
643   bits<5> fs;
644
645   bits<32> Inst;
646   let Inst{31-26} = 0b010101;
647   let Inst{25-21} = ft;
648   let Inst{20-16} = fs;
649   let Inst{15} = 0;
650   let Inst{14} = fmt;
651   let Inst{13-6} = funct;
652   let Inst{5-0} = 0b111011;
653 }
654
655 class POOL32F_CVT_DS_FM<string instr_asm, bits<2> fmt, bits<7> funct>
656     : MMR6Arch<instr_asm>, MipsR6Inst {
657   bits<5> ft;
658   bits<5> fs;
659
660   bits<32> Inst;
661   let Inst{31-26} = 0b010101;
662   let Inst{25-21} = ft;
663   let Inst{20-16} = fs;
664   let Inst{15} = 0;
665   let Inst{14-13} = fmt;
666   let Inst{12-6} = funct;
667   let Inst{5-0} = 0b111011;
668 }
669
670 class POOL32F_ABS_FM_MMR6<string instr_asm, bits<2> fmt, bits<7> funct>
671     : MMR6Arch<instr_asm>, MipsR6Inst {
672   bits<5> ft;
673   bits<5> fs;
674
675   bits<32> Inst;
676
677   let Inst{31-26} = 0b010101;
678   let Inst{25-21} = ft;
679   let Inst{20-16} = fs;
680   let Inst{15}    = 0;
681   let Inst{14-13} = fmt;
682   let Inst{12-6}  = funct;
683   let Inst{5-0}   = 0b111011;
684 }
685
686 class POOL32F_MATH_FM_MMR6<string instr_asm, bits<1> fmt, bits<8> funct>
687     : MMR6Arch<instr_asm>, MipsR6Inst {
688   bits<5> ft;
689   bits<5> fs;
690
691   bits<32> Inst;
692
693   let Inst{31-26} = 0b010101;
694   let Inst{25-21} = ft;
695   let Inst{20-16} = fs;
696   let Inst{15}    = 0;
697   let Inst{14}    = fmt;
698   let Inst{13-6}  = funct;
699   let Inst{5-0}   = 0b111011;
700 }
701
702 class POOL16A_ADDU16_FM_MMR6 : MicroMipsR6Inst16 {
703   bits<3> rs;
704   bits<3> rt;
705   bits<3> rd;
706
707   bits<16> Inst;
708
709   let Inst{15-10} = 0b000001;
710   let Inst{9-7}   = rs;
711   let Inst{6-4}   = rt;
712   let Inst{3-1}   = rd;
713   let Inst{0}     = 0;
714 }
715
716 class POOL16C_AND16_FM_MMR6 : MicroMipsR6Inst16 {
717   bits<3> rt;
718   bits<3> rs;
719
720   bits<16> Inst;
721
722   let Inst{15-10} = 0b010001;
723   let Inst{9-7}   = rt;
724   let Inst{6-4}   = rs;
725   let Inst{3-0}   = 0b0001;
726 }
727
728 class POOL16C_NOT16_FM_MMR6 : MicroMipsR6Inst16 {
729   bits<3> rt;
730   bits<3> rs;
731
732   bits<16> Inst;
733
734   let Inst{15-10} = 0x11;
735   let Inst{9-7}   = rt;
736   let Inst{6-4}   = rs;
737   let Inst{3-0}   = 0b0000;
738 }
739
740 class POOL16C_OR16_XOR16_FM_MMR6<bits<4> op> {
741   bits<3> rt;
742   bits<3> rs;
743
744   bits<16> Inst;
745
746   let Inst{15-10} = 0b010001;
747   let Inst{9-7}   = rt;
748   let Inst{6-4}   = rs;
749   let Inst{3-0}   = op;
750 }
751
752 class POOL16C_BREAKPOINT_FM_MMR6<bits<6> op> {
753   bits<4> code_;
754   bits<16> Inst;
755
756   let Inst{15-10} = 0b010001;
757   let Inst{9-6}   = code_;
758   let Inst{5-0}   = op;
759 }
760
761 class POOL16A_SUBU16_FM_MMR6 {
762   bits<3> rs;
763   bits<3> rt;
764   bits<3> rd;
765
766   bits<16> Inst;
767
768   let Inst{15-10} = 0b000001;
769   let Inst{9-7}   = rs;
770   let Inst{6-4}   = rt;
771   let Inst{3-1}   = rd;
772   let Inst{0}     = 0b1;
773 }
774
775 class POOL32A_WRPGPR_WSBH_FM_MMR6<bits<10> funct> : MipsR6Inst {
776   bits<5> rt;
777   bits<5> rs;
778
779   bits<32> Inst;
780
781   let Inst{31-26} = 0x00;
782   let Inst{25-21} = rt;
783   let Inst{20-16} = rs;
784   let Inst{15-6}  = funct;
785   let Inst{5-0}   = 0x3c;
786 }