llvm.org GIT mirror llvm / 29c57c3
Specify instruction encoding using range list to avoid endianess issues. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56276 91177308-0d34-0410-b5e6-96231b3b80d8 Evan Cheng 11 years ago
1 changed file(s) with 28 addition(s) and 27 deletion(s). Raw diff Collapse all Expand all
141141 : I
142142 asm,"",pattern> {
143143 let Inst{24} = 1; // L bit
144 let Inst{25-27} = 5;
144 let Inst{25-27} = {1,0,1};
145145 }
146146 class ABLI opcod, dag oops, dag iops, Format f, string asm,
147147 list pattern>
148148 : XI
149149 "", pattern> {
150150 let Inst{24} = 1; // L bit
151 let Inst{25-27} = 5;
151 let Inst{25-27} = {1,0,1};
152152 }
153153 class ABLXI opcod, dag oops, dag iops, Format f, string asm,
154154 list pattern>
155155 : XI
156156 "", pattern> {
157 let Inst{4-7} = 3;
158 let Inst{20-27} = 0x12;
157 let Inst{4-7} = {1,1,0,0};
158 let Inst{20-27} = {0,1,0,0,1,0,0,0};
159159 }
160160 // FIXME: BX
161161 class AXIx2 opcod, dag oops, dag iops, Format f, string asm,
167167 : XI
168168 "", pattern> {
169169 let Inst{24} = 0; // L bit
170 let Inst{25-27} = 5;
170 let Inst{25-27} = {1,0,1};
171171 }
172172 class ABccI opcod, dag oops, dag iops, Format f, string opc,
173173 string asm, list pattern>
174174 : I
175175 asm,"",pattern> {
176176 let Inst{24} = 0; // L bit
177 let Inst{25-27} = 5;
177 let Inst{25-27} = {1,0,1};
178178 }
179179
180180 // BR_JT instructions
183183 : XI
184184 asm, "", pattern> {
185185 let Inst{20} = 0; // S Bit
186 let Inst{21-24} = 0xd;
187 let Inst{26-27} = 0;
188 }
189 // == ldr pc
186 let Inst{21-24} = {1,0,1,1};
187 let Inst{26-27} = {0,0};
188 }
189 // == add pc
190190 class JTI1 opcod, dag oops, dag iops, string asm, list pattern>
191191 : XI
192192 asm, "", pattern> {
193 let Inst{20} = 1; // L bit
194 let Inst{21} = 0; // W bit
195 let Inst{22} = 0; // B bit
196 let Inst{24} = 1; // P bit
197 }
198 // == add pc
193 let Inst{20} = 0; // S bit
194 let Inst{21-24} = {0,0,1,0};
195 let Inst{26-27} = {0,0};
196 }
197 // == ldr pc
199198 class JTI2 opcod, dag oops, dag iops, string asm, list pattern>
200199 : XI
201200 asm, "", pattern> {
202 let Inst{20} = 0; // S bit
203 let Inst{21-24} = 4;
204 let Inst{26-27} = 0;
201 let Inst{20} = 1; // L bit
202 let Inst{21} = 0; // W bit
203 let Inst{22} = 0; // B bit
204 let Inst{24} = 1; // P bit
205 let Inst{26-27} = {0,0};
205206 }
206207
207208
211212 : I
212213 asm, "", pattern> {
213214 let Inst{21-24} = opcod;
214 let Inst{26-27} = 0;
215 let Inst{26-27} = {0,0};
215216 }
216217 class AsI1 opcod, dag oops, dag iops, Format f, string opc,
217218 string asm, list pattern>
218219 : sI
219220 asm, "", pattern> {
220221 let Inst{21-24} = opcod;
221 let Inst{26-27} = 0;
222 let Inst{26-27} = {0,0};
222223 }
223224 class AXI1 opcod, dag oops, dag iops, Format f, string asm,
224225 list pattern>
225226 : XI
226227 "", pattern> {
227228 let Inst{21-24} = opcod;
228 let Inst{26-27} = 0;
229 let Inst{26-27} = {0,0};
229230 }
230231 class AI1x2 opcod, dag oops, dag iops, Format f, string opc,
231232 string asm, list pattern>
238239 string asm, list pattern>
239240 : I
240241 asm, "", pattern> {
241 let Inst{26-27} = 1;
242 let Inst{26-27} = {1,0};
242243 }
243244 class AXI2 opcod, dag oops, dag iops, Format f, string asm,
244245 list pattern>
641642 string asm, list pattern>
642643 : I
643644 asm, "", pattern> {
644 let Inst{25-27} = 0x4;
645 let Inst{25-27} = {0,0,1};
645646 }
646647 class AXI4ld opcod, dag oops, dag iops, Format f, string asm,
647648 list pattern>
649650 "", pattern> {
650651 let Inst{20} = 1; // L bit
651652 let Inst{22} = 0; // S bit
652 let Inst{25-27} = 0x4;
653 let Inst{25-27} = {0,0,1};
653654 }
654655 class AXI4ldpc opcod, dag oops, dag iops, Format f, string asm,
655656 list pattern>
657658 "", pattern> {
658659 let Inst{20} = 1; // L bit
659660 let Inst{22} = 1; // S bit
660 let Inst{25-27} = 0x4;
661 let Inst{25-27} = {0,0,1};
661662 }
662663 class AXI4st opcod, dag oops, dag iops, Format f, string asm,
663664 list pattern>
665666 "", pattern> {
666667 let Inst{20} = 0; // L bit
667668 let Inst{22} = 0; // S bit
668 let Inst{25-27} = 0x4;
669 let Inst{25-27} = {0,0,1};
669670 }
670671
671672