eba201a0ea99cda2667efdef399f2d537f97bde4
[oota-llvm.git] / lib / Target / Mips / Mips16InstrInfo.td
1 //===- Mips16InstrInfo.td - Target Description for Mips16  -*- 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 Mips16 instructions.
11 //
12 //===----------------------------------------------------------------------===//
13 //
14
15 //
16 // Address operand
17 def mem16 : Operand<i32> {
18   let PrintMethod = "printMemOperand";
19   let MIOperandInfo = (ops CPU16Regs, simm16);
20   let EncoderMethod = "getMemEncoding";
21 }
22
23 //
24 // Assembler formats in alphabetical order.
25 // Natural and pseudos are mixed together.
26 //
27 //
28 // EXT-RI instruction format
29 //
30
31 class FEXT_RI16_ins_base<bits<5> _op, string asmstr, string asmstr2,
32                          InstrItinClass itin>:
33   FEXT_RI16<_op, (outs CPU16Regs:$rx), (ins simm16:$imm),
34                   !strconcat(asmstr, asmstr2), [], itin>;
35
36 class FEXT_RI16_ins<bits<5> _op, string asmstr,
37                     InstrItinClass itin>:
38   FEXT_RI16_ins_base<_op, asmstr, "\t$rx, $imm", itin>;
39
40 class FEXT_RI16_PC_ins<bits<5> _op, string asmstr, InstrItinClass itin>:
41   FEXT_RI16_ins_base<_op, asmstr, "\t$rx, $$pc, $imm", itin>;
42
43 class FEXT_2RI16_ins<bits<5> _op, string asmstr,
44                      InstrItinClass itin>:
45   FEXT_RI16<_op, (outs CPU16Regs:$rx), (ins CPU16Regs:$rx_, simm16:$imm),
46             !strconcat(asmstr, "\t$rx, $imm"), [], itin> {
47   let Constraints = "$rx_ = $rx";
48 }
49
50 // this has an explicit sp argument that we ignore to work around a problem
51 // in the compiler
52 class FEXT_RI16_SP_explicit_ins<bits<5> _op, string asmstr,
53                                 InstrItinClass itin>:
54   FEXT_RI16<_op, (outs CPU16Regs:$rx), (ins CPUSPReg:$ry, simm16:$imm),
55             !strconcat(asmstr, "\t$rx, $imm ( $ry ); "), [], itin>;
56
57 //
58 // EXT-RRI instruction format
59 //
60
61 class FEXT_RRI16_mem_ins<bits<5> op, string asmstr, Operand MemOpnd,
62                          InstrItinClass itin>:
63   FEXT_RRI16<op, (outs CPU16Regs:$ry), (ins  MemOpnd:$addr),
64              !strconcat(asmstr, "\t$ry, $addr"), [], itin>;
65
66 class FEXT_RRI16_mem2_ins<bits<5> op, string asmstr, Operand MemOpnd,
67                           InstrItinClass itin>:
68   FEXT_RRI16<op, (outs ), (ins  CPU16Regs:$ry, MemOpnd:$addr),
69              !strconcat(asmstr, "\t$ry, $addr"), [], itin>;
70
71 //
72 // EXT-SHIFT instruction format
73 //
74 class FEXT_SHIFT16_ins<bits<2> _f, string asmstr, InstrItinClass itin>:
75   FEXT_SHIFT16<_f, (outs CPU16Regs:$rx), (ins CPU16Regs:$ry, shamt:$sa),
76                !strconcat(asmstr, "\t$rx, $ry, $sa"), [], itin>;
77
78
79 //
80 // I8_MOVR32 instruction format (used only by the MOVR32 instructio
81 //
82 class FI8_MOVR3216_ins<string asmstr, InstrItinClass itin>:
83        FI8_MOVR3216<(outs CPU16Regs:$rz), (ins CPURegs:$r32),
84        !strconcat(asmstr,  "\t$rz, $r32"), [], itin>;
85
86 //
87 // I8_MOV32R instruction format (used only by MOV32R instruction)
88 //
89
90 class FI8_MOV32R16_ins<string asmstr, InstrItinClass itin>:
91   FI8_MOV32R16<(outs CPURegs:$r32), (ins CPU16Regs:$rz),
92                !strconcat(asmstr,  "\t$r32, $rz"), [], itin>;
93
94 //
95 // This are pseudo formats for multiply
96 // This first one can be changed to non pseudo now.
97 //
98 // MULT
99 //
100 class FMULT16_ins<string asmstr, InstrItinClass itin> :
101   MipsPseudo16<(outs), (ins CPU16Regs:$rx, CPU16Regs:$ry),
102                !strconcat(asmstr, "\t$rx, $ry"), []>;
103
104 //
105 // MULT-LO
106 //
107 class FMULT16_LO_ins<string asmstr, InstrItinClass itin> :
108   MipsPseudo16<(outs CPU16Regs:$rz), (ins CPU16Regs:$rx, CPU16Regs:$ry),
109                !strconcat(asmstr, "\t$rx, $ry\n\tmflo\t$rz"), []> {
110   let isCodeGenOnly=1;
111 }
112
113 //
114 // RR-type instruction format
115 //
116
117 class FRR16_ins<bits<5> f, string asmstr, InstrItinClass itin> :
118   FRR16<f, (outs CPU16Regs:$rx), (ins CPU16Regs:$ry),
119         !strconcat(asmstr, "\t$rx, $ry"), [], itin> {
120 }
121
122 //
123 // maybe refactor but need a $zero as a dummy first parameter
124 //
125 class FRR16_div_ins<bits<5> f, string asmstr, InstrItinClass itin> :
126   FRR16<f, (outs ), (ins CPU16Regs:$rx, CPU16Regs:$ry),
127         !strconcat(asmstr, "\t$$zero, $rx, $ry"), [], itin> ;
128
129 class FRR16_M_ins<bits<5> f, string asmstr,
130                   InstrItinClass itin> :
131   FRR16<f, (outs CPU16Regs:$rx), (ins),
132         !strconcat(asmstr, "\t$rx"), [], itin>;
133
134 class FRxRxRy16_ins<bits<5> f, string asmstr,
135                     InstrItinClass itin> :
136   FRR16<f, (outs CPU16Regs:$rz), (ins CPU16Regs:$rx, CPU16Regs:$ry),
137             !strconcat(asmstr, "\t$rz, $ry"),
138             [], itin> {
139   let Constraints = "$rx = $rz";
140 }
141
142 let rx=0 in
143 class FRR16_JALRC_RA_only_ins<bits<1> nd_, bits<1> l_,
144                               string asmstr, InstrItinClass itin>:
145   FRR16_JALRC<nd_, l_, 1, (outs), (ins), !strconcat(asmstr, "\t $$ra"),
146               [], itin> ;
147
148 //
149 // RRR-type instruction format
150 //
151
152 class FRRR16_ins<bits<2> _f, string asmstr,  InstrItinClass itin> :
153   FRRR16<_f, (outs CPU16Regs:$rz), (ins CPU16Regs:$rx, CPU16Regs:$ry),
154          !strconcat(asmstr, "\t$rz, $rx, $ry"), [], itin>;
155
156 //
157 // Some general instruction class info
158 //
159 //
160
161 class ArithLogic16Defs<bit isCom=0> {
162   bits<5> shamt = 0;
163   bit isCommutable = isCom;
164   bit isReMaterializable = 1;
165   bit neverHasSideEffects = 1;
166 }
167
168 class MayLoad {
169   bit mayLoad = 1;
170 }
171
172 class MayStore {
173   bit mayStore = 1;
174 }
175 //
176
177 // Format: ADDIU rx, immediate MIPS16e
178 // Purpose: Add Immediate Unsigned Word (2-Operand, Extended)
179 // To add a constant to a 32-bit integer.
180 //
181 def AddiuRxImmX16: FEXT_RI16_ins<0b01001, "addiu", IIAlu>;
182
183 def AddiuRxRxImmX16: FEXT_2RI16_ins<0b01001, "addiu", IIAlu>,
184   ArithLogic16Defs<0>;
185
186 //
187
188 // Format: ADDIU rx, pc, immediate MIPS16e
189 // Purpose: Add Immediate Unsigned Word (3-Operand, PC-Relative, Extended)
190 // To add a constant to the program counter.
191 //
192 def AddiuRxPcImmX16: FEXT_RI16_PC_ins<0b00001, "addiu", IIAlu>;
193 //
194 // Format: ADDU rz, rx, ry MIPS16e
195 // Purpose: Add Unsigned Word (3-Operand)
196 // To add 32-bit integers.
197 //
198
199 def AdduRxRyRz16: FRRR16_ins<01, "addu", IIAlu>, ArithLogic16Defs<1>;
200
201 //
202 // Format: AND rx, ry MIPS16e
203 // Purpose: AND
204 // To do a bitwise logical AND.
205
206 def AndRxRxRy16: FRxRxRy16_ins<0b01100, "and", IIAlu>, ArithLogic16Defs<1>;
207 //
208 // Format: DIV rx, ry MIPS16e
209 // Purpose: Divide Word
210 // To divide 32-bit signed integers.
211 //
212 def DivRxRy16: FRR16_div_ins<0b11010, "div", IIAlu> {
213   let Defs = [HI, LO];
214 }
215
216 //
217 // Format: DIVU rx, ry MIPS16e
218 // Purpose: Divide Unsigned Word
219 // To divide 32-bit unsigned integers.
220 //
221 def DivuRxRy16: FRR16_div_ins<0b11011, "divu", IIAlu> {
222   let Defs = [HI, LO];
223 }
224
225
226 //
227 // Format: JR ra MIPS16e
228 // Purpose: Jump Register Through Register ra
229 // To execute a branch to the instruction address in the return
230 // address register.
231 //
232
233 def JrRa16: FRR16_JALRC_RA_only_ins<0, 0, "jr", IIAlu>;
234
235 //
236 // Format: LB ry, offset(rx) MIPS16e
237 // Purpose: Load Byte (Extended)
238 // To load a byte from memory as a signed value.
239 //
240 def LbRxRyOffMemX16: FEXT_RRI16_mem_ins<0b10011, "lb", mem16, IILoad>, MayLoad;
241
242 //
243 // Format: LBU ry, offset(rx) MIPS16e
244 // Purpose: Load Byte Unsigned (Extended)
245 // To load a byte from memory as a unsigned value.
246 //
247 def LbuRxRyOffMemX16:
248   FEXT_RRI16_mem_ins<0b10100, "lbu", mem16, IILoad>, MayLoad;
249
250 //
251 // Format: LH ry, offset(rx) MIPS16e
252 // Purpose: Load Halfword signed (Extended)
253 // To load a halfword from memory as a signed value.
254 //
255 def LhRxRyOffMemX16: FEXT_RRI16_mem_ins<0b10100, "lh", mem16, IILoad>, MayLoad;
256
257 //
258 // Format: LHU ry, offset(rx) MIPS16e
259 // Purpose: Load Halfword unsigned (Extended)
260 // To load a halfword from memory as an unsigned value.
261 //
262 def LhuRxRyOffMemX16:
263   FEXT_RRI16_mem_ins<0b10100, "lhu", mem16, IILoad>, MayLoad;
264
265 //
266 // Format: LI rx, immediate MIPS16e
267 // Purpose: Load Immediate (Extended)
268 // To load a constant into a GPR.
269 //
270 def LiRxImmX16: FEXT_RI16_ins<0b01101, "li", IIAlu>;
271
272 //
273 // Format: LW ry, offset(rx) MIPS16e
274 // Purpose: Load Word (Extended)
275 // To load a word from memory as a signed value.
276 //
277 def LwRxRyOffMemX16: FEXT_RRI16_mem_ins<0b10011, "lw", mem16, IILoad>, MayLoad;
278
279 // Format: LW rx, offset(sp) MIPS16e
280 // Purpose: Load Word (SP-Relative, Extended)
281 // To load an SP-relative word from memory as a signed value.
282 //
283 def LwRxSpImmX16: FEXT_RI16_SP_explicit_ins<0b10110, "lw", IILoad>, MayLoad;
284
285 //
286 // Format: MOVE r32, rz MIPS16e
287 // Purpose: Move
288 // To move the contents of a GPR to a GPR.
289 //
290 def Move32R16: FI8_MOV32R16_ins<"move", IIAlu>;
291
292 //
293 // Format: MOVE ry, r32 MIPS16e
294 //Purpose: Move
295 // To move the contents of a GPR to a GPR.
296 //
297 def MoveR3216: FI8_MOVR3216_ins<"move", IIAlu>;
298
299 //
300 // Format: MFHI rx MIPS16e
301 // Purpose: Move From HI Register
302 // To copy the special purpose HI register to a GPR.
303 //
304 def Mfhi16: FRR16_M_ins<0b10000, "mfhi", IIAlu> {
305   let Uses = [HI];
306   let neverHasSideEffects = 1;
307 }
308
309 //
310 // Format: MFLO rx MIPS16e
311 // Purpose: Move From LO Register
312 // To copy the special purpose LO register to a GPR.
313 //
314 def Mflo16: FRR16_M_ins<0b10010, "mflo", IIAlu> {
315   let Uses = [LO];
316   let neverHasSideEffects = 1;
317 }
318
319 //
320 // Pseudo Instruction for mult
321 //
322 def MultRxRy16:  FMULT16_ins<"mult",  IIAlu> {
323   let isCommutable = 1;
324   let neverHasSideEffects = 1;
325   let Defs = [HI, LO];
326 }
327
328 def MultuRxRy16: FMULT16_ins<"multu", IIAlu> {
329   let isCommutable = 1;
330   let neverHasSideEffects = 1;
331   let Defs = [HI, LO];
332 }
333
334 //
335 // Format: MULT rx, ry MIPS16e
336 // Purpose: Multiply Word
337 // To multiply 32-bit signed integers.
338 //
339 def MultRxRyRz16: FMULT16_LO_ins<"mult", IIAlu> {
340   let isCommutable = 1;
341   let neverHasSideEffects = 1;
342   let Defs = [HI, LO];
343 }
344
345 //
346 // Format: MULTU rx, ry MIPS16e
347 // Purpose: Multiply Unsigned Word
348 // To multiply 32-bit unsigned integers.
349 //
350 def MultuRxRyRz16: FMULT16_LO_ins<"multu", IIAlu> {
351   let isCommutable = 1;
352   let neverHasSideEffects = 1;
353   let Defs = [HI, LO];
354 }
355
356 //
357 // Format: NEG rx, ry MIPS16e
358 // Purpose: Negate
359 // To negate an integer value.
360 //
361 def NegRxRy16: FRR16_ins<0b11101, "neg", IIAlu>;
362
363 //
364 // Format: NOT rx, ry MIPS16e
365 // Purpose: Not
366 // To complement an integer value
367 //
368 def NotRxRy16: FRR16_ins<0b01111, "not", IIAlu>;
369
370 //
371 // Format: OR rx, ry MIPS16e
372 // Purpose: Or
373 // To do a bitwise logical OR.
374 //
375 def OrRxRxRy16: FRxRxRy16_ins<0b01101, "or", IIAlu>, ArithLogic16Defs<1>;
376
377 //
378 // Format: RESTORE {ra,}{s0/s1/s0-1,}{framesize}
379 // (All args are optional) MIPS16e
380 // Purpose: Restore Registers and Deallocate Stack Frame
381 // To deallocate a stack frame before exit from a subroutine,
382 // restoring return address and static registers, and adjusting
383 // stack
384 //
385
386 // fixed form for restoring RA and the frame
387 // for direct object emitter, encoding needs to be adjusted for the
388 // frame size
389 //
390 let ra=1, s=0,s0=1,s1=1 in
391 def RestoreRaF16:
392   FI8_SVRS16<0b1, (outs), (ins uimm16:$frame_size),
393              "restore \t$$ra,  $$s0, $$s1, $frame_size", [], IILoad >, MayLoad {
394   let isCodeGenOnly = 1;
395 }
396
397 //
398 // Format: SAVE {ra,}{s0/s1/s0-1,}{framesize} (All arguments are optional)
399 // MIPS16e
400 // Purpose: Save Registers and Set Up Stack Frame
401 // To set up a stack frame on entry to a subroutine,
402 // saving return address and static registers, and adjusting stack
403 //
404 let ra=1, s=1,s0=1,s1=1 in
405 def SaveRaF16:
406   FI8_SVRS16<0b1, (outs), (ins uimm16:$frame_size),
407              "save \t$$ra, $$s0, $$s1, $frame_size", [], IIStore >, MayStore {
408   let isCodeGenOnly = 1;
409 }
410 //
411 // Format: SB ry, offset(rx) MIPS16e
412 // Purpose: Store Byte (Extended)
413 // To store a byte to memory.
414 //
415 def SbRxRyOffMemX16:
416   FEXT_RRI16_mem2_ins<0b11000, "sb", mem16, IIStore>, MayStore;
417
418 //
419 // Format: SH ry, offset(rx) MIPS16e
420 // Purpose: Store Halfword (Extended)
421 // To store a halfword to memory.
422 //
423 def ShRxRyOffMemX16:
424   FEXT_RRI16_mem2_ins<0b11001, "sh", mem16, IIStore>, MayStore;
425
426 //
427 // Format: SLL rx, ry, sa MIPS16e
428 // Purpose: Shift Word Left Logical (Extended)
429 // To execute a left-shift of a word by a fixed number of bits—0 to 31 bits.
430 //
431 def SllX16: FEXT_SHIFT16_ins<0b00, "sll", IIAlu>;
432
433 //
434 // Format: SLLV ry, rx MIPS16e
435 // Purpose: Shift Word Left Logical Variable
436 // To execute a left-shift of a word by a variable number of bits.
437 //
438 def SllvRxRy16 : FRxRxRy16_ins<0b00100, "sllv", IIAlu>;
439
440
441 //
442 // Format: SRAV ry, rx MIPS16e
443 // Purpose: Shift Word Right Arithmetic Variable
444 // To execute an arithmetic right-shift of a word by a variable
445 // number of bits.
446 //
447 def SravRxRy16: FRxRxRy16_ins<0b00111, "srav", IIAlu>;
448
449
450 //
451 // Format: SRA rx, ry, sa MIPS16e
452 // Purpose: Shift Word Right Arithmetic (Extended)
453 // To execute an arithmetic right-shift of a word by a fixed
454 // number of bits—1 to 8 bits.
455 //
456 def SraX16: FEXT_SHIFT16_ins<0b11, "sra", IIAlu>;
457
458
459 //
460 // Format: SRLV ry, rx MIPS16e
461 // Purpose: Shift Word Right Logical Variable
462 // To execute a logical right-shift of a word by a variable
463 // number of bits.
464 //
465 def SrlvRxRy16: FRxRxRy16_ins<0b00110, "srlv", IIAlu>;
466
467
468 //
469 // Format: SRL rx, ry, sa MIPS16e
470 // Purpose: Shift Word Right Logical (Extended)
471 // To execute a logical right-shift of a word by a fixed
472 // number of bits—1 to 31 bits.
473 //
474 def SrlX16: FEXT_SHIFT16_ins<0b10, "srl", IIAlu>;
475
476 //
477 // Format: SUBU rz, rx, ry MIPS16e
478 // Purpose: Subtract Unsigned Word
479 // To subtract 32-bit integers
480 //
481 def SubuRxRyRz16: FRRR16_ins<0b11, "subu", IIAlu>, ArithLogic16Defs<0>;
482
483 //
484 // Format: SW ry, offset(rx) MIPS16e
485 // Purpose: Store Word (Extended)
486 // To store a word to memory.
487 //
488 def SwRxRyOffMemX16:
489   FEXT_RRI16_mem2_ins<0b11011, "sw", mem16, IIStore>, MayStore;
490
491 //
492 // Format: SW rx, offset(sp) MIPS16e
493 // Purpose: Store Word rx (SP-Relative)
494 // To store an SP-relative word to memory.
495 //
496 def SwRxSpImmX16: FEXT_RI16_SP_explicit_ins<0b11010, "sw", IIStore>, MayStore;
497
498 //
499 //
500 // Format: XOR rx, ry MIPS16e
501 // Purpose: Xor
502 // To do a bitwise logical XOR.
503 //
504 def XorRxRxRy16: FRxRxRy16_ins<0b01110, "xor", IIAlu>, ArithLogic16Defs<1>;
505
506 class Mips16Pat<dag pattern, dag result> : Pat<pattern, result> {
507   let Predicates = [InMips16Mode];
508 }
509
510 // Unary Arith/Logic
511 //
512 class ArithLogicU_pat<PatFrag OpNode, Instruction I> :
513   Mips16Pat<(OpNode CPU16Regs:$r),
514             (I CPU16Regs:$r)>;
515
516 def: ArithLogicU_pat<not, NotRxRy16>;
517 def: ArithLogicU_pat<ineg, NegRxRy16>;
518
519 class ArithLogic16_pat<SDNode OpNode, Instruction I> :
520   Mips16Pat<(OpNode CPU16Regs:$l, CPU16Regs:$r),
521             (I CPU16Regs:$l, CPU16Regs:$r)>;
522
523 def: ArithLogic16_pat<add, AdduRxRyRz16>;
524 def: ArithLogic16_pat<and, AndRxRxRy16>;
525 def: ArithLogic16_pat<mul, MultRxRyRz16>;
526 def: ArithLogic16_pat<or, OrRxRxRy16>;
527 def: ArithLogic16_pat<sub, SubuRxRyRz16>;
528 def: ArithLogic16_pat<xor, XorRxRxRy16>;
529
530 // Arithmetic and logical instructions with 2 register operands.
531
532 class ArithLogicI16_pat<SDNode OpNode, PatFrag imm_type, Instruction I> :
533   Mips16Pat<(OpNode CPU16Regs:$in, imm_type:$imm),
534             (I CPU16Regs:$in, imm_type:$imm)>;
535
536 def: ArithLogicI16_pat<add, immSExt16, AddiuRxRxImmX16>;
537 def: ArithLogicI16_pat<shl, immZExt5, SllX16>;
538 def: ArithLogicI16_pat<srl, immZExt5, SrlX16>;
539 def: ArithLogicI16_pat<sra, immZExt5, SraX16>;
540
541 class shift_rotate_reg16_pat<SDNode OpNode, Instruction I> :
542   Mips16Pat<(OpNode CPU16Regs:$r, CPU16Regs:$ra),
543             (I CPU16Regs:$r, CPU16Regs:$ra)>;
544
545 def: shift_rotate_reg16_pat<shl, SllvRxRy16>;
546 def: shift_rotate_reg16_pat<sra, SravRxRy16>;
547 def: shift_rotate_reg16_pat<srl, SrlvRxRy16>;
548
549 class LoadM16_pat<PatFrag OpNode, Instruction I> :
550   Mips16Pat<(OpNode addr:$addr), (I addr:$addr)>;
551
552 def: LoadM16_pat<sextloadi8, LbRxRyOffMemX16>;
553 def: LoadM16_pat<zextloadi8, LbuRxRyOffMemX16>;
554 def: LoadM16_pat<sextloadi16, LhRxRyOffMemX16>;
555 def: LoadM16_pat<zextloadi16, LhuRxRyOffMemX16>;
556 def: LoadM16_pat<load, LwRxRyOffMemX16>;
557
558 class StoreM16_pat<PatFrag OpNode, Instruction I> :
559   Mips16Pat<(OpNode CPU16Regs:$r, addr:$addr), (I CPU16Regs:$r, addr:$addr)>;
560
561 def: StoreM16_pat<truncstorei8, SbRxRyOffMemX16>;
562 def: StoreM16_pat<truncstorei16, ShRxRyOffMemX16>;
563 def: StoreM16_pat<store, SwRxRyOffMemX16>;
564
565
566 // Jump and Link (Call)
567 let isCall=1, hasDelaySlot=1 in
568 def JumpLinkReg16:
569   FRR16_JALRC<0, 0, 0, (outs), (ins CPU16Regs:$rs),
570               "jalr \t$rs", [(MipsJmpLink CPU16Regs:$rs)], IIBranch>;
571
572 // Mips16 pseudos
573 let isReturn=1, isTerminator=1, hasDelaySlot=1, isBarrier=1, hasCtrlDep=1,
574   hasExtraSrcRegAllocReq = 1 in
575 def RetRA16 : MipsPseudo16<(outs), (ins), "", [(MipsRet)]>;
576
577 // Small immediates
578 def: Mips16Pat<(i32 immZExt16:$in), (LiRxImmX16 immZExt16:$in)>;
579
580 //
581 // MipsDivRem
582 //
583 def: Mips16Pat
584   <(MipsDivRem CPU16Regs:$rx, CPU16Regs:$ry),
585    (DivRxRy16 CPU16Regs:$rx, CPU16Regs:$ry)>;
586
587 //
588 // MipsDivRemU
589 //
590 def: Mips16Pat
591   <(MipsDivRemU CPU16Regs:$rx, CPU16Regs:$ry),
592    (DivuRxRy16 CPU16Regs:$rx, CPU16Regs:$ry)>;
593
594
595 def: Mips16Pat<(add CPU16Regs:$hi, (MipsLo tglobaladdr:$lo)),
596                (AddiuRxRxImmX16 CPU16Regs:$hi, tglobaladdr:$lo)>;