1 //=- MicroMips32r6InstrFormats.td - Mips32r6 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 // This file describes microMIPS32r6 instruction formats.
12 //===----------------------------------------------------------------------===//
14 class MMR6Arch<string opstr> {
15 string Arch = "micromipsr6";
16 string BaseOpcode = opstr;
19 class POOL32A_BITSWAP_FM_MMR6<bits<6> funct> : MipsR6Inst {
25 let Inst{31-26} = 0b000000;
28 let Inst{15-12} = 0b0000;
29 let Inst{11-6} = funct;
30 let Inst{5-0} = 0b111100;
33 class CACHE_PREF_FM_MMR6<bits<6> opgroup, bits<4> funct> : MipsR6Inst {
39 let Inst{31-26} = opgroup;
40 let Inst{25-21} = hint;
41 let Inst{20-16} = addr{20-16};
42 let Inst{15-12} = funct;
43 let Inst{11-0} = addr{11-0};
46 class ARITH_FM_MMR6<string instr_asm, bits<10> funct> : MMR6Arch<instr_asm> {
58 let Inst{9-0} = funct;
61 class ADDI_FM_MMR6<string instr_asm, bits<6> op> : MMR6Arch<instr_asm> {
71 let Inst{15-0} = imm16;
74 class PCREL19_FM_MMR6<bits<2> funct> : MipsR6Inst {
80 let Inst{31-26} = 0b011110;
82 let Inst{20-19} = funct;
86 class PCREL16_FM_MMR6<bits<5> funct> : MipsR6Inst {
92 let Inst{31-26} = 0b011110;
94 let Inst{20-16} = funct;
98 class POOL32A_FM_MMR6<bits<10> funct> : MipsR6Inst {
105 let Inst{31-26} = 0b000000;
106 let Inst{25-21} = rt;
107 let Inst{20-16} = rs;
108 let Inst{15-11} = rd;
110 let Inst{9-0} = funct;
113 class POOL32A_2R_FM_MMR6<bits<10> funct> : MipsR6Inst {
119 let Inst{31-26} = 0b000000;
120 let Inst{25-21} = rt;
121 let Inst{20-16} = rs;
122 let Inst{15-6} = funct;
123 let Inst{5-0} = 0b111100;
126 class SPECIAL_2R_FM_MMR6<bits<6> funct> : MipsR6Inst {
132 let Inst{31-26} = 0b000000;
133 let Inst{25-21} = rs;
134 let Inst{20-16} = 0b00000;
135 let Inst{15-11} = rt;
136 let Inst{10-6} = 0b00001;
137 let Inst{5-0} = funct;
140 class POOL32A_ALIGN_FM_MMR6<bits<6> funct> : MipsR6Inst {
148 let Inst{31-26} = 0b000000;
149 let Inst{25-21} = rs;
150 let Inst{20-16} = rt;
151 let Inst{15-11} = rd;
153 let Inst{8-6} = 0b000;
154 let Inst{5-0} = funct;
157 class AUI_FM_MMR6 : MipsR6Inst {
164 let Inst{31-26} = 0b000100;
165 let Inst{25-21} = rt;
166 let Inst{20-16} = rs;
167 let Inst{15-0} = imm;
170 class POOL32A_LSA_FM<bits<6> funct> : MipsR6Inst {
178 let Inst{31-26} = 0b000000;
179 let Inst{25-21} = rt;
180 let Inst{20-16} = rs;
181 let Inst{15-11} = rd;
182 let Inst{10-9} = imm2;
183 let Inst{8-6} = 0b000;
184 let Inst{5-0} = funct;