1/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
2|* *|
3|* Pseudo-instruction MC lowering Source Fragment *|
4|* *|
5|* Automatically generated file, do not edit! *|
6|* *|
7\*===----------------------------------------------------------------------===*/
8
9bool MipsAsmPrinter::
10lowerPseudoInstExpansion(const MachineInstr *MI, MCInst &Inst) {
11 Inst.clear();
12 switch (MI->getOpcode()) {
13 default: return false;
14 case Mips::AND_V_D_PSEUDO: {
15 MCOperand MCOp;
16 Inst.setOpcode(Mips::AND_V);
17 // Operand: wd
18 lowerOperand(MO: MI->getOperand(i: 0), MCOp);
19 Inst.addOperand(Op: MCOp);
20 // Operand: ws
21 lowerOperand(MO: MI->getOperand(i: 1), MCOp);
22 Inst.addOperand(Op: MCOp);
23 // Operand: wt
24 lowerOperand(MO: MI->getOperand(i: 2), MCOp);
25 Inst.addOperand(Op: MCOp);
26 break;
27 }
28 case Mips::AND_V_H_PSEUDO: {
29 MCOperand MCOp;
30 Inst.setOpcode(Mips::AND_V);
31 // Operand: wd
32 lowerOperand(MO: MI->getOperand(i: 0), MCOp);
33 Inst.addOperand(Op: MCOp);
34 // Operand: ws
35 lowerOperand(MO: MI->getOperand(i: 1), MCOp);
36 Inst.addOperand(Op: MCOp);
37 // Operand: wt
38 lowerOperand(MO: MI->getOperand(i: 2), MCOp);
39 Inst.addOperand(Op: MCOp);
40 break;
41 }
42 case Mips::AND_V_W_PSEUDO: {
43 MCOperand MCOp;
44 Inst.setOpcode(Mips::AND_V);
45 // Operand: wd
46 lowerOperand(MO: MI->getOperand(i: 0), MCOp);
47 Inst.addOperand(Op: MCOp);
48 // Operand: ws
49 lowerOperand(MO: MI->getOperand(i: 1), MCOp);
50 Inst.addOperand(Op: MCOp);
51 // Operand: wt
52 lowerOperand(MO: MI->getOperand(i: 2), MCOp);
53 Inst.addOperand(Op: MCOp);
54 break;
55 }
56 case Mips::B: {
57 MCOperand MCOp;
58 Inst.setOpcode(Mips::BEQ);
59 // Operand: rs
60 Inst.addOperand(Op: MCOperand::createReg(Reg: Mips::R0));
61 // Operand: rt
62 Inst.addOperand(Op: MCOperand::createReg(Reg: Mips::R0));
63 // Operand: offset
64 lowerOperand(MO: MI->getOperand(i: 0), MCOp);
65 Inst.addOperand(Op: MCOp);
66 break;
67 }
68 case Mips::BAL_BR: {
69 MCOperand MCOp;
70 Inst.setOpcode(Mips::BGEZAL);
71 // Operand: rs
72 Inst.addOperand(Op: MCOperand::createReg(Reg: Mips::R0));
73 // Operand: offset
74 lowerOperand(MO: MI->getOperand(i: 0), MCOp);
75 Inst.addOperand(Op: MCOp);
76 break;
77 }
78 case Mips::BAL_BR_MM: {
79 MCOperand MCOp;
80 Inst.setOpcode(Mips::BGEZAL_MM);
81 // Operand: rs
82 Inst.addOperand(Op: MCOperand::createReg(Reg: Mips::R0));
83 // Operand: offset
84 lowerOperand(MO: MI->getOperand(i: 0), MCOp);
85 Inst.addOperand(Op: MCOp);
86 break;
87 }
88 case Mips::BSEL_D_PSEUDO: {
89 MCOperand MCOp;
90 Inst.setOpcode(Mips::BSEL_V);
91 // Operand: wd
92 lowerOperand(MO: MI->getOperand(i: 0), MCOp);
93 Inst.addOperand(Op: MCOp);
94 // Operand: wd_in
95 lowerOperand(MO: MI->getOperand(i: 1), MCOp);
96 Inst.addOperand(Op: MCOp);
97 // Operand: ws
98 lowerOperand(MO: MI->getOperand(i: 2), MCOp);
99 Inst.addOperand(Op: MCOp);
100 // Operand: wt
101 lowerOperand(MO: MI->getOperand(i: 3), MCOp);
102 Inst.addOperand(Op: MCOp);
103 break;
104 }
105 case Mips::BSEL_FD_PSEUDO: {
106 MCOperand MCOp;
107 Inst.setOpcode(Mips::BSEL_V);
108 // Operand: wd
109 lowerOperand(MO: MI->getOperand(i: 0), MCOp);
110 Inst.addOperand(Op: MCOp);
111 // Operand: wd_in
112 lowerOperand(MO: MI->getOperand(i: 1), MCOp);
113 Inst.addOperand(Op: MCOp);
114 // Operand: ws
115 lowerOperand(MO: MI->getOperand(i: 2), MCOp);
116 Inst.addOperand(Op: MCOp);
117 // Operand: wt
118 lowerOperand(MO: MI->getOperand(i: 3), MCOp);
119 Inst.addOperand(Op: MCOp);
120 break;
121 }
122 case Mips::BSEL_FW_PSEUDO: {
123 MCOperand MCOp;
124 Inst.setOpcode(Mips::BSEL_V);
125 // Operand: wd
126 lowerOperand(MO: MI->getOperand(i: 0), MCOp);
127 Inst.addOperand(Op: MCOp);
128 // Operand: wd_in
129 lowerOperand(MO: MI->getOperand(i: 1), MCOp);
130 Inst.addOperand(Op: MCOp);
131 // Operand: ws
132 lowerOperand(MO: MI->getOperand(i: 2), MCOp);
133 Inst.addOperand(Op: MCOp);
134 // Operand: wt
135 lowerOperand(MO: MI->getOperand(i: 3), MCOp);
136 Inst.addOperand(Op: MCOp);
137 break;
138 }
139 case Mips::BSEL_H_PSEUDO: {
140 MCOperand MCOp;
141 Inst.setOpcode(Mips::BSEL_V);
142 // Operand: wd
143 lowerOperand(MO: MI->getOperand(i: 0), MCOp);
144 Inst.addOperand(Op: MCOp);
145 // Operand: wd_in
146 lowerOperand(MO: MI->getOperand(i: 1), MCOp);
147 Inst.addOperand(Op: MCOp);
148 // Operand: ws
149 lowerOperand(MO: MI->getOperand(i: 2), MCOp);
150 Inst.addOperand(Op: MCOp);
151 // Operand: wt
152 lowerOperand(MO: MI->getOperand(i: 3), MCOp);
153 Inst.addOperand(Op: MCOp);
154 break;
155 }
156 case Mips::BSEL_W_PSEUDO: {
157 MCOperand MCOp;
158 Inst.setOpcode(Mips::BSEL_V);
159 // Operand: wd
160 lowerOperand(MO: MI->getOperand(i: 0), MCOp);
161 Inst.addOperand(Op: MCOp);
162 // Operand: wd_in
163 lowerOperand(MO: MI->getOperand(i: 1), MCOp);
164 Inst.addOperand(Op: MCOp);
165 // Operand: ws
166 lowerOperand(MO: MI->getOperand(i: 2), MCOp);
167 Inst.addOperand(Op: MCOp);
168 // Operand: wt
169 lowerOperand(MO: MI->getOperand(i: 3), MCOp);
170 Inst.addOperand(Op: MCOp);
171 break;
172 }
173 case Mips::B_MM: {
174 MCOperand MCOp;
175 Inst.setOpcode(Mips::BEQ_MM);
176 // Operand: rs
177 Inst.addOperand(Op: MCOperand::createReg(Reg: Mips::R0));
178 // Operand: rt
179 Inst.addOperand(Op: MCOperand::createReg(Reg: Mips::R0));
180 // Operand: offset
181 lowerOperand(MO: MI->getOperand(i: 0), MCOp);
182 Inst.addOperand(Op: MCOp);
183 break;
184 }
185 case Mips::FABS_D: {
186 MCOperand MCOp;
187 Inst.setOpcode(Mips::BCLRI_D);
188 // Operand: wd
189 lowerOperand(MO: MI->getOperand(i: 0), MCOp);
190 Inst.addOperand(Op: MCOp);
191 // Operand: ws
192 lowerOperand(MO: MI->getOperand(i: 1), MCOp);
193 Inst.addOperand(Op: MCOp);
194 // Operand: m
195 Inst.addOperand(Op: MCOperand::createImm(Val: 63));
196 break;
197 }
198 case Mips::FABS_W: {
199 MCOperand MCOp;
200 Inst.setOpcode(Mips::BCLRI_W);
201 // Operand: wd
202 lowerOperand(MO: MI->getOperand(i: 0), MCOp);
203 Inst.addOperand(Op: MCOp);
204 // Operand: ws
205 lowerOperand(MO: MI->getOperand(i: 1), MCOp);
206 Inst.addOperand(Op: MCOp);
207 // Operand: m
208 Inst.addOperand(Op: MCOperand::createImm(Val: 31));
209 break;
210 }
211 case Mips::JALR64Pseudo: {
212 MCOperand MCOp;
213 Inst.setOpcode(Mips::JALR);
214 // Operand: rd
215 Inst.addOperand(Op: MCOperand::createReg(Reg: Mips::R31));
216 // Operand: rs
217 lowerOperand(MO: MI->getOperand(i: 0), MCOp);
218 Inst.addOperand(Op: MCOp);
219 break;
220 }
221 case Mips::JALRHB64Pseudo: {
222 MCOperand MCOp;
223 Inst.setOpcode(Mips::JALR_HB64);
224 // Operand: rd
225 Inst.addOperand(Op: MCOperand::createReg(Reg: Mips::R31_64));
226 // Operand: rs
227 lowerOperand(MO: MI->getOperand(i: 0), MCOp);
228 Inst.addOperand(Op: MCOp);
229 break;
230 }
231 case Mips::JALRHBPseudo: {
232 MCOperand MCOp;
233 Inst.setOpcode(Mips::JALR_HB);
234 // Operand: rd
235 Inst.addOperand(Op: MCOperand::createReg(Reg: Mips::R31));
236 // Operand: rs
237 lowerOperand(MO: MI->getOperand(i: 0), MCOp);
238 Inst.addOperand(Op: MCOp);
239 break;
240 }
241 case Mips::JALRPseudo: {
242 MCOperand MCOp;
243 Inst.setOpcode(Mips::JALR);
244 // Operand: rd
245 Inst.addOperand(Op: MCOperand::createReg(Reg: Mips::R31));
246 // Operand: rs
247 lowerOperand(MO: MI->getOperand(i: 0), MCOp);
248 Inst.addOperand(Op: MCOp);
249 break;
250 }
251 case Mips::JAL_MMR6: {
252 MCOperand MCOp;
253 Inst.setOpcode(Mips::BALC_MMR6);
254 // Operand: offset
255 lowerOperand(MO: MI->getOperand(i: 0), MCOp);
256 Inst.addOperand(Op: MCOp);
257 break;
258 }
259 case Mips::JAL_R6: {
260 MCOperand MCOp;
261 Inst.setOpcode(Mips::BALC);
262 // Operand: offset
263 lowerOperand(MO: MI->getOperand(i: 0), MCOp);
264 Inst.addOperand(Op: MCOp);
265 break;
266 }
267 case Mips::NOP: {
268 MCOperand MCOp;
269 Inst.setOpcode(Mips::SLL);
270 // Operand: rd
271 Inst.addOperand(Op: MCOperand::createReg(Reg: Mips::R0));
272 // Operand: rt
273 Inst.addOperand(Op: MCOperand::createReg(Reg: Mips::R0));
274 // Operand: shamt
275 Inst.addOperand(Op: MCOperand::createImm(Val: 0));
276 break;
277 }
278 case Mips::NOR_V_D_PSEUDO: {
279 MCOperand MCOp;
280 Inst.setOpcode(Mips::NOR_V);
281 // Operand: wd
282 lowerOperand(MO: MI->getOperand(i: 0), MCOp);
283 Inst.addOperand(Op: MCOp);
284 // Operand: ws
285 lowerOperand(MO: MI->getOperand(i: 1), MCOp);
286 Inst.addOperand(Op: MCOp);
287 // Operand: wt
288 lowerOperand(MO: MI->getOperand(i: 2), MCOp);
289 Inst.addOperand(Op: MCOp);
290 break;
291 }
292 case Mips::NOR_V_H_PSEUDO: {
293 MCOperand MCOp;
294 Inst.setOpcode(Mips::NOR_V);
295 // Operand: wd
296 lowerOperand(MO: MI->getOperand(i: 0), MCOp);
297 Inst.addOperand(Op: MCOp);
298 // Operand: ws
299 lowerOperand(MO: MI->getOperand(i: 1), MCOp);
300 Inst.addOperand(Op: MCOp);
301 // Operand: wt
302 lowerOperand(MO: MI->getOperand(i: 2), MCOp);
303 Inst.addOperand(Op: MCOp);
304 break;
305 }
306 case Mips::NOR_V_W_PSEUDO: {
307 MCOperand MCOp;
308 Inst.setOpcode(Mips::NOR_V);
309 // Operand: wd
310 lowerOperand(MO: MI->getOperand(i: 0), MCOp);
311 Inst.addOperand(Op: MCOp);
312 // Operand: ws
313 lowerOperand(MO: MI->getOperand(i: 1), MCOp);
314 Inst.addOperand(Op: MCOp);
315 // Operand: wt
316 lowerOperand(MO: MI->getOperand(i: 2), MCOp);
317 Inst.addOperand(Op: MCOp);
318 break;
319 }
320 case Mips::OR_V_D_PSEUDO: {
321 MCOperand MCOp;
322 Inst.setOpcode(Mips::OR_V);
323 // Operand: wd
324 lowerOperand(MO: MI->getOperand(i: 0), MCOp);
325 Inst.addOperand(Op: MCOp);
326 // Operand: ws
327 lowerOperand(MO: MI->getOperand(i: 1), MCOp);
328 Inst.addOperand(Op: MCOp);
329 // Operand: wt
330 lowerOperand(MO: MI->getOperand(i: 2), MCOp);
331 Inst.addOperand(Op: MCOp);
332 break;
333 }
334 case Mips::OR_V_H_PSEUDO: {
335 MCOperand MCOp;
336 Inst.setOpcode(Mips::OR_V);
337 // Operand: wd
338 lowerOperand(MO: MI->getOperand(i: 0), MCOp);
339 Inst.addOperand(Op: MCOp);
340 // Operand: ws
341 lowerOperand(MO: MI->getOperand(i: 1), MCOp);
342 Inst.addOperand(Op: MCOp);
343 // Operand: wt
344 lowerOperand(MO: MI->getOperand(i: 2), MCOp);
345 Inst.addOperand(Op: MCOp);
346 break;
347 }
348 case Mips::OR_V_W_PSEUDO: {
349 MCOperand MCOp;
350 Inst.setOpcode(Mips::OR_V);
351 // Operand: wd
352 lowerOperand(MO: MI->getOperand(i: 0), MCOp);
353 Inst.addOperand(Op: MCOp);
354 // Operand: ws
355 lowerOperand(MO: MI->getOperand(i: 1), MCOp);
356 Inst.addOperand(Op: MCOp);
357 // Operand: wt
358 lowerOperand(MO: MI->getOperand(i: 2), MCOp);
359 Inst.addOperand(Op: MCOp);
360 break;
361 }
362 case Mips::PseudoCMPU_EQ_QB: {
363 MCOperand MCOp;
364 Inst.setOpcode(Mips::CMPU_EQ_QB);
365 // Operand: rs
366 lowerOperand(MO: MI->getOperand(i: 1), MCOp);
367 Inst.addOperand(Op: MCOp);
368 // Operand: rt
369 lowerOperand(MO: MI->getOperand(i: 2), MCOp);
370 Inst.addOperand(Op: MCOp);
371 break;
372 }
373 case Mips::PseudoCMPU_LE_QB: {
374 MCOperand MCOp;
375 Inst.setOpcode(Mips::CMPU_LE_QB);
376 // Operand: rs
377 lowerOperand(MO: MI->getOperand(i: 1), MCOp);
378 Inst.addOperand(Op: MCOp);
379 // Operand: rt
380 lowerOperand(MO: MI->getOperand(i: 2), MCOp);
381 Inst.addOperand(Op: MCOp);
382 break;
383 }
384 case Mips::PseudoCMPU_LT_QB: {
385 MCOperand MCOp;
386 Inst.setOpcode(Mips::CMPU_LT_QB);
387 // Operand: rs
388 lowerOperand(MO: MI->getOperand(i: 1), MCOp);
389 Inst.addOperand(Op: MCOp);
390 // Operand: rt
391 lowerOperand(MO: MI->getOperand(i: 2), MCOp);
392 Inst.addOperand(Op: MCOp);
393 break;
394 }
395 case Mips::PseudoCMP_EQ_PH: {
396 MCOperand MCOp;
397 Inst.setOpcode(Mips::CMP_EQ_PH);
398 // Operand: rs
399 lowerOperand(MO: MI->getOperand(i: 1), MCOp);
400 Inst.addOperand(Op: MCOp);
401 // Operand: rt
402 lowerOperand(MO: MI->getOperand(i: 2), MCOp);
403 Inst.addOperand(Op: MCOp);
404 break;
405 }
406 case Mips::PseudoCMP_LE_PH: {
407 MCOperand MCOp;
408 Inst.setOpcode(Mips::CMP_LE_PH);
409 // Operand: rs
410 lowerOperand(MO: MI->getOperand(i: 1), MCOp);
411 Inst.addOperand(Op: MCOp);
412 // Operand: rt
413 lowerOperand(MO: MI->getOperand(i: 2), MCOp);
414 Inst.addOperand(Op: MCOp);
415 break;
416 }
417 case Mips::PseudoCMP_LT_PH: {
418 MCOperand MCOp;
419 Inst.setOpcode(Mips::CMP_LT_PH);
420 // Operand: rs
421 lowerOperand(MO: MI->getOperand(i: 1), MCOp);
422 Inst.addOperand(Op: MCOp);
423 // Operand: rt
424 lowerOperand(MO: MI->getOperand(i: 2), MCOp);
425 Inst.addOperand(Op: MCOp);
426 break;
427 }
428 case Mips::PseudoDMULT: {
429 MCOperand MCOp;
430 Inst.setOpcode(Mips::DMULT);
431 // Operand: rs
432 lowerOperand(MO: MI->getOperand(i: 1), MCOp);
433 Inst.addOperand(Op: MCOp);
434 // Operand: rt
435 lowerOperand(MO: MI->getOperand(i: 2), MCOp);
436 Inst.addOperand(Op: MCOp);
437 break;
438 }
439 case Mips::PseudoDMULTu: {
440 MCOperand MCOp;
441 Inst.setOpcode(Mips::DMULTu);
442 // Operand: rs
443 lowerOperand(MO: MI->getOperand(i: 1), MCOp);
444 Inst.addOperand(Op: MCOp);
445 // Operand: rt
446 lowerOperand(MO: MI->getOperand(i: 2), MCOp);
447 Inst.addOperand(Op: MCOp);
448 break;
449 }
450 case Mips::PseudoDSDIV: {
451 MCOperand MCOp;
452 Inst.setOpcode(Mips::DSDIV);
453 // Operand: rs
454 lowerOperand(MO: MI->getOperand(i: 1), MCOp);
455 Inst.addOperand(Op: MCOp);
456 // Operand: rt
457 lowerOperand(MO: MI->getOperand(i: 2), MCOp);
458 Inst.addOperand(Op: MCOp);
459 break;
460 }
461 case Mips::PseudoDUDIV: {
462 MCOperand MCOp;
463 Inst.setOpcode(Mips::DUDIV);
464 // Operand: rs
465 lowerOperand(MO: MI->getOperand(i: 1), MCOp);
466 Inst.addOperand(Op: MCOp);
467 // Operand: rt
468 lowerOperand(MO: MI->getOperand(i: 2), MCOp);
469 Inst.addOperand(Op: MCOp);
470 break;
471 }
472 case Mips::PseudoIndirectBranch: {
473 MCOperand MCOp;
474 Inst.setOpcode(Mips::JR);
475 // Operand: rs
476 lowerOperand(MO: MI->getOperand(i: 0), MCOp);
477 Inst.addOperand(Op: MCOp);
478 break;
479 }
480 case Mips::PseudoIndirectBranch64: {
481 MCOperand MCOp;
482 Inst.setOpcode(Mips::JR64);
483 // Operand: rs
484 lowerOperand(MO: MI->getOperand(i: 0), MCOp);
485 Inst.addOperand(Op: MCOp);
486 break;
487 }
488 case Mips::PseudoIndirectBranch64R6: {
489 MCOperand MCOp;
490 Inst.setOpcode(Mips::JALR64);
491 // Operand: rd
492 Inst.addOperand(Op: MCOperand::createReg(Reg: Mips::R0_64));
493 // Operand: rs
494 lowerOperand(MO: MI->getOperand(i: 0), MCOp);
495 Inst.addOperand(Op: MCOp);
496 break;
497 }
498 case Mips::PseudoIndirectBranchR6: {
499 MCOperand MCOp;
500 Inst.setOpcode(Mips::JALR);
501 // Operand: rd
502 Inst.addOperand(Op: MCOperand::createReg(Reg: Mips::R0));
503 // Operand: rs
504 lowerOperand(MO: MI->getOperand(i: 0), MCOp);
505 Inst.addOperand(Op: MCOp);
506 break;
507 }
508 case Mips::PseudoIndirectBranch_MM: {
509 MCOperand MCOp;
510 Inst.setOpcode(Mips::JR_MM);
511 // Operand: rs
512 lowerOperand(MO: MI->getOperand(i: 0), MCOp);
513 Inst.addOperand(Op: MCOp);
514 break;
515 }
516 case Mips::PseudoIndirectBranch_MMR6: {
517 MCOperand MCOp;
518 Inst.setOpcode(Mips::JRC16_MMR6);
519 // Operand: rs
520 lowerOperand(MO: MI->getOperand(i: 0), MCOp);
521 Inst.addOperand(Op: MCOp);
522 break;
523 }
524 case Mips::PseudoIndirectHazardBranch: {
525 MCOperand MCOp;
526 Inst.setOpcode(Mips::JR_HB);
527 // Operand: rs
528 lowerOperand(MO: MI->getOperand(i: 0), MCOp);
529 Inst.addOperand(Op: MCOp);
530 break;
531 }
532 case Mips::PseudoIndirectHazardBranch64: {
533 MCOperand MCOp;
534 Inst.setOpcode(Mips::JR_HB64);
535 // Operand: rs
536 lowerOperand(MO: MI->getOperand(i: 0), MCOp);
537 Inst.addOperand(Op: MCOp);
538 break;
539 }
540 case Mips::PseudoIndrectHazardBranch64R6: {
541 MCOperand MCOp;
542 Inst.setOpcode(Mips::JR_HB64_R6);
543 // Operand: rs
544 lowerOperand(MO: MI->getOperand(i: 0), MCOp);
545 Inst.addOperand(Op: MCOp);
546 break;
547 }
548 case Mips::PseudoIndrectHazardBranchR6: {
549 MCOperand MCOp;
550 Inst.setOpcode(Mips::JR_HB_R6);
551 // Operand: rs
552 lowerOperand(MO: MI->getOperand(i: 0), MCOp);
553 Inst.addOperand(Op: MCOp);
554 break;
555 }
556 case Mips::PseudoMADD: {
557 MCOperand MCOp;
558 Inst.setOpcode(Mips::MADD);
559 // Operand: rs
560 lowerOperand(MO: MI->getOperand(i: 1), MCOp);
561 Inst.addOperand(Op: MCOp);
562 // Operand: rt
563 lowerOperand(MO: MI->getOperand(i: 2), MCOp);
564 Inst.addOperand(Op: MCOp);
565 break;
566 }
567 case Mips::PseudoMADDU: {
568 MCOperand MCOp;
569 Inst.setOpcode(Mips::MADDU);
570 // Operand: rs
571 lowerOperand(MO: MI->getOperand(i: 1), MCOp);
572 Inst.addOperand(Op: MCOp);
573 // Operand: rt
574 lowerOperand(MO: MI->getOperand(i: 2), MCOp);
575 Inst.addOperand(Op: MCOp);
576 break;
577 }
578 case Mips::PseudoMADDU_MM: {
579 MCOperand MCOp;
580 Inst.setOpcode(Mips::MADDU);
581 // Operand: rs
582 lowerOperand(MO: MI->getOperand(i: 1), MCOp);
583 Inst.addOperand(Op: MCOp);
584 // Operand: rt
585 lowerOperand(MO: MI->getOperand(i: 2), MCOp);
586 Inst.addOperand(Op: MCOp);
587 break;
588 }
589 case Mips::PseudoMADD_MM: {
590 MCOperand MCOp;
591 Inst.setOpcode(Mips::MADD);
592 // Operand: rs
593 lowerOperand(MO: MI->getOperand(i: 1), MCOp);
594 Inst.addOperand(Op: MCOp);
595 // Operand: rt
596 lowerOperand(MO: MI->getOperand(i: 2), MCOp);
597 Inst.addOperand(Op: MCOp);
598 break;
599 }
600 case Mips::PseudoMSUB: {
601 MCOperand MCOp;
602 Inst.setOpcode(Mips::MSUB);
603 // Operand: rs
604 lowerOperand(MO: MI->getOperand(i: 1), MCOp);
605 Inst.addOperand(Op: MCOp);
606 // Operand: rt
607 lowerOperand(MO: MI->getOperand(i: 2), MCOp);
608 Inst.addOperand(Op: MCOp);
609 break;
610 }
611 case Mips::PseudoMSUBU: {
612 MCOperand MCOp;
613 Inst.setOpcode(Mips::MSUBU);
614 // Operand: rs
615 lowerOperand(MO: MI->getOperand(i: 1), MCOp);
616 Inst.addOperand(Op: MCOp);
617 // Operand: rt
618 lowerOperand(MO: MI->getOperand(i: 2), MCOp);
619 Inst.addOperand(Op: MCOp);
620 break;
621 }
622 case Mips::PseudoMSUBU_MM: {
623 MCOperand MCOp;
624 Inst.setOpcode(Mips::MSUBU);
625 // Operand: rs
626 lowerOperand(MO: MI->getOperand(i: 1), MCOp);
627 Inst.addOperand(Op: MCOp);
628 // Operand: rt
629 lowerOperand(MO: MI->getOperand(i: 2), MCOp);
630 Inst.addOperand(Op: MCOp);
631 break;
632 }
633 case Mips::PseudoMSUB_MM: {
634 MCOperand MCOp;
635 Inst.setOpcode(Mips::MSUB);
636 // Operand: rs
637 lowerOperand(MO: MI->getOperand(i: 1), MCOp);
638 Inst.addOperand(Op: MCOp);
639 // Operand: rt
640 lowerOperand(MO: MI->getOperand(i: 2), MCOp);
641 Inst.addOperand(Op: MCOp);
642 break;
643 }
644 case Mips::PseudoMULT: {
645 MCOperand MCOp;
646 Inst.setOpcode(Mips::MULT);
647 // Operand: rs
648 lowerOperand(MO: MI->getOperand(i: 1), MCOp);
649 Inst.addOperand(Op: MCOp);
650 // Operand: rt
651 lowerOperand(MO: MI->getOperand(i: 2), MCOp);
652 Inst.addOperand(Op: MCOp);
653 break;
654 }
655 case Mips::PseudoMULT_MM: {
656 MCOperand MCOp;
657 Inst.setOpcode(Mips::MULT);
658 // Operand: rs
659 lowerOperand(MO: MI->getOperand(i: 1), MCOp);
660 Inst.addOperand(Op: MCOp);
661 // Operand: rt
662 lowerOperand(MO: MI->getOperand(i: 2), MCOp);
663 Inst.addOperand(Op: MCOp);
664 break;
665 }
666 case Mips::PseudoMULTu: {
667 MCOperand MCOp;
668 Inst.setOpcode(Mips::MULTu);
669 // Operand: rs
670 lowerOperand(MO: MI->getOperand(i: 1), MCOp);
671 Inst.addOperand(Op: MCOp);
672 // Operand: rt
673 lowerOperand(MO: MI->getOperand(i: 2), MCOp);
674 Inst.addOperand(Op: MCOp);
675 break;
676 }
677 case Mips::PseudoMULTu_MM: {
678 MCOperand MCOp;
679 Inst.setOpcode(Mips::MULTu);
680 // Operand: rs
681 lowerOperand(MO: MI->getOperand(i: 1), MCOp);
682 Inst.addOperand(Op: MCOp);
683 // Operand: rt
684 lowerOperand(MO: MI->getOperand(i: 2), MCOp);
685 Inst.addOperand(Op: MCOp);
686 break;
687 }
688 case Mips::PseudoPICK_PH: {
689 MCOperand MCOp;
690 Inst.setOpcode(Mips::PICK_PH);
691 // Operand: rd
692 lowerOperand(MO: MI->getOperand(i: 0), MCOp);
693 Inst.addOperand(Op: MCOp);
694 // Operand: rs
695 lowerOperand(MO: MI->getOperand(i: 2), MCOp);
696 Inst.addOperand(Op: MCOp);
697 // Operand: rt
698 lowerOperand(MO: MI->getOperand(i: 3), MCOp);
699 Inst.addOperand(Op: MCOp);
700 break;
701 }
702 case Mips::PseudoPICK_QB: {
703 MCOperand MCOp;
704 Inst.setOpcode(Mips::PICK_QB);
705 // Operand: rd
706 lowerOperand(MO: MI->getOperand(i: 0), MCOp);
707 Inst.addOperand(Op: MCOp);
708 // Operand: rs
709 lowerOperand(MO: MI->getOperand(i: 2), MCOp);
710 Inst.addOperand(Op: MCOp);
711 // Operand: rt
712 lowerOperand(MO: MI->getOperand(i: 3), MCOp);
713 Inst.addOperand(Op: MCOp);
714 break;
715 }
716 case Mips::PseudoSDIV: {
717 MCOperand MCOp;
718 Inst.setOpcode(Mips::SDIV);
719 // Operand: rs
720 lowerOperand(MO: MI->getOperand(i: 1), MCOp);
721 Inst.addOperand(Op: MCOp);
722 // Operand: rt
723 lowerOperand(MO: MI->getOperand(i: 2), MCOp);
724 Inst.addOperand(Op: MCOp);
725 break;
726 }
727 case Mips::PseudoUDIV: {
728 MCOperand MCOp;
729 Inst.setOpcode(Mips::UDIV);
730 // Operand: rs
731 lowerOperand(MO: MI->getOperand(i: 1), MCOp);
732 Inst.addOperand(Op: MCOp);
733 // Operand: rt
734 lowerOperand(MO: MI->getOperand(i: 2), MCOp);
735 Inst.addOperand(Op: MCOp);
736 break;
737 }
738 case Mips::SDIV_MM_Pseudo: {
739 MCOperand MCOp;
740 Inst.setOpcode(Mips::SDIV_MM);
741 // Operand: rs
742 lowerOperand(MO: MI->getOperand(i: 1), MCOp);
743 Inst.addOperand(Op: MCOp);
744 // Operand: rt
745 lowerOperand(MO: MI->getOperand(i: 2), MCOp);
746 Inst.addOperand(Op: MCOp);
747 break;
748 }
749 case Mips::TAILCALL: {
750 MCOperand MCOp;
751 Inst.setOpcode(Mips::J);
752 // Operand: target
753 lowerOperand(MO: MI->getOperand(i: 0), MCOp);
754 Inst.addOperand(Op: MCOp);
755 break;
756 }
757 case Mips::TAILCALL64R6REG: {
758 MCOperand MCOp;
759 Inst.setOpcode(Mips::JALR64);
760 // Operand: rd
761 Inst.addOperand(Op: MCOperand::createReg(Reg: Mips::R0_64));
762 // Operand: rs
763 lowerOperand(MO: MI->getOperand(i: 0), MCOp);
764 Inst.addOperand(Op: MCOp);
765 break;
766 }
767 case Mips::TAILCALLHB64R6REG: {
768 MCOperand MCOp;
769 Inst.setOpcode(Mips::JR_HB64_R6);
770 // Operand: rs
771 lowerOperand(MO: MI->getOperand(i: 0), MCOp);
772 Inst.addOperand(Op: MCOp);
773 break;
774 }
775 case Mips::TAILCALLHBR6REG: {
776 MCOperand MCOp;
777 Inst.setOpcode(Mips::JR_HB_R6);
778 // Operand: rs
779 lowerOperand(MO: MI->getOperand(i: 0), MCOp);
780 Inst.addOperand(Op: MCOp);
781 break;
782 }
783 case Mips::TAILCALLR6REG: {
784 MCOperand MCOp;
785 Inst.setOpcode(Mips::JALR);
786 // Operand: rd
787 Inst.addOperand(Op: MCOperand::createReg(Reg: Mips::R0));
788 // Operand: rs
789 lowerOperand(MO: MI->getOperand(i: 0), MCOp);
790 Inst.addOperand(Op: MCOp);
791 break;
792 }
793 case Mips::TAILCALLREG: {
794 MCOperand MCOp;
795 Inst.setOpcode(Mips::JR);
796 // Operand: rs
797 lowerOperand(MO: MI->getOperand(i: 0), MCOp);
798 Inst.addOperand(Op: MCOp);
799 break;
800 }
801 case Mips::TAILCALLREG64: {
802 MCOperand MCOp;
803 Inst.setOpcode(Mips::JR64);
804 // Operand: rs
805 lowerOperand(MO: MI->getOperand(i: 0), MCOp);
806 Inst.addOperand(Op: MCOp);
807 break;
808 }
809 case Mips::TAILCALLREGHB: {
810 MCOperand MCOp;
811 Inst.setOpcode(Mips::JR_HB);
812 // Operand: rs
813 lowerOperand(MO: MI->getOperand(i: 0), MCOp);
814 Inst.addOperand(Op: MCOp);
815 break;
816 }
817 case Mips::TAILCALLREGHB64: {
818 MCOperand MCOp;
819 Inst.setOpcode(Mips::JR_HB64);
820 // Operand: rs
821 lowerOperand(MO: MI->getOperand(i: 0), MCOp);
822 Inst.addOperand(Op: MCOp);
823 break;
824 }
825 case Mips::TAILCALLREG_MM: {
826 MCOperand MCOp;
827 Inst.setOpcode(Mips::JRC16_MM);
828 // Operand: rs
829 lowerOperand(MO: MI->getOperand(i: 0), MCOp);
830 Inst.addOperand(Op: MCOp);
831 break;
832 }
833 case Mips::TAILCALLREG_MMR6: {
834 MCOperand MCOp;
835 Inst.setOpcode(Mips::JRC16_MM);
836 // Operand: rs
837 lowerOperand(MO: MI->getOperand(i: 0), MCOp);
838 Inst.addOperand(Op: MCOp);
839 break;
840 }
841 case Mips::TAILCALL_MM: {
842 MCOperand MCOp;
843 Inst.setOpcode(Mips::J_MM);
844 // Operand: target
845 lowerOperand(MO: MI->getOperand(i: 0), MCOp);
846 Inst.addOperand(Op: MCOp);
847 break;
848 }
849 case Mips::TAILCALL_MMR6: {
850 MCOperand MCOp;
851 Inst.setOpcode(Mips::BC_MMR6);
852 // Operand: offset
853 lowerOperand(MO: MI->getOperand(i: 0), MCOp);
854 Inst.addOperand(Op: MCOp);
855 break;
856 }
857 case Mips::TAILCALL_R6: {
858 MCOperand MCOp;
859 Inst.setOpcode(Mips::BC);
860 // Operand: offset
861 lowerOperand(MO: MI->getOperand(i: 0), MCOp);
862 Inst.addOperand(Op: MCOp);
863 break;
864 }
865 case Mips::TRAP: {
866 MCOperand MCOp;
867 Inst.setOpcode(Mips::BREAK);
868 // Operand: code_1
869 Inst.addOperand(Op: MCOperand::createImm(Val: 0));
870 // Operand: code_2
871 Inst.addOperand(Op: MCOperand::createImm(Val: 0));
872 break;
873 }
874 case Mips::TRAP_MM: {
875 MCOperand MCOp;
876 Inst.setOpcode(Mips::BREAK_MM);
877 // Operand: code_1
878 Inst.addOperand(Op: MCOperand::createImm(Val: 0));
879 // Operand: code_2
880 Inst.addOperand(Op: MCOperand::createImm(Val: 0));
881 break;
882 }
883 case Mips::UDIV_MM_Pseudo: {
884 MCOperand MCOp;
885 Inst.setOpcode(Mips::UDIV_MM);
886 // Operand: rs
887 lowerOperand(MO: MI->getOperand(i: 1), MCOp);
888 Inst.addOperand(Op: MCOp);
889 // Operand: rt
890 lowerOperand(MO: MI->getOperand(i: 2), MCOp);
891 Inst.addOperand(Op: MCOp);
892 break;
893 }
894 case Mips::XOR_V_D_PSEUDO: {
895 MCOperand MCOp;
896 Inst.setOpcode(Mips::XOR_V);
897 // Operand: wd
898 lowerOperand(MO: MI->getOperand(i: 0), MCOp);
899 Inst.addOperand(Op: MCOp);
900 // Operand: ws
901 lowerOperand(MO: MI->getOperand(i: 1), MCOp);
902 Inst.addOperand(Op: MCOp);
903 // Operand: wt
904 lowerOperand(MO: MI->getOperand(i: 2), MCOp);
905 Inst.addOperand(Op: MCOp);
906 break;
907 }
908 case Mips::XOR_V_H_PSEUDO: {
909 MCOperand MCOp;
910 Inst.setOpcode(Mips::XOR_V);
911 // Operand: wd
912 lowerOperand(MO: MI->getOperand(i: 0), MCOp);
913 Inst.addOperand(Op: MCOp);
914 // Operand: ws
915 lowerOperand(MO: MI->getOperand(i: 1), MCOp);
916 Inst.addOperand(Op: MCOp);
917 // Operand: wt
918 lowerOperand(MO: MI->getOperand(i: 2), MCOp);
919 Inst.addOperand(Op: MCOp);
920 break;
921 }
922 case Mips::XOR_V_W_PSEUDO: {
923 MCOperand MCOp;
924 Inst.setOpcode(Mips::XOR_V);
925 // Operand: wd
926 lowerOperand(MO: MI->getOperand(i: 0), MCOp);
927 Inst.addOperand(Op: MCOp);
928 // Operand: ws
929 lowerOperand(MO: MI->getOperand(i: 1), MCOp);
930 Inst.addOperand(Op: MCOp);
931 // Operand: wt
932 lowerOperand(MO: MI->getOperand(i: 2), MCOp);
933 Inst.addOperand(Op: MCOp);
934 break;
935 }
936 }
937 return true;
938}
939
940