]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/lib/Target/Mips/MipsScheduleGeneric.td
Merge compiler-rt trunk r321414 to contrib/compiler-rt.
[FreeBSD/FreeBSD.git] / contrib / llvm / lib / Target / Mips / MipsScheduleGeneric.td
1 //=- MipsScheduleGeneric.td - Generic Scheduling Definitions -*- 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 the interAptiv processor in a manner of speaking. It
11 // describes a hypothetical version of the in-order MIPS32R2 interAptiv with all
12 // branches of the MIPS ISAs, ASEs and ISA variants. The itinerary lists are
13 // broken down into per ISA lists, so that this file can be used to rapidly
14 // develop new schedule models.
15 //
16 //===----------------------------------------------------------------------===//
17 def MipsGenericModel : SchedMachineModel {
18   int IssueWidth = 1;
19   int MicroOpBufferSize = 0;
20
21   // These figures assume an L1 hit.
22   int LoadLatency = 2;
23   int MispredictPenalty = 4;
24
25   int HighLatency = 37;
26   list<Predicate> UnsupportedFeatures = [];
27
28   let CompleteModel = 1;
29   let PostRAScheduler = 1;
30 }
31
32 let SchedModel = MipsGenericModel in {
33
34 // ALU Pipeline
35 // ============
36
37 def GenericALU : ProcResource<1> { let BufferSize = 1; }
38 def GenericIssueALU : ProcResource<1> { let Super = GenericALU; }
39
40 def GenericWriteALU : SchedWriteRes<[GenericIssueALU]>;
41
42 // and, lui, nor, or, slti, sltiu, sub, subu, xor
43 // add, addi, addiu, addu, andi, ori, rotr, se[bh], sllv?, sr[al]v?, slt, sltu,
44 // xori
45 def : ItinRW<[GenericWriteALU], [II_ADD, II_ADDU, II_ADDI, II_ADDIU, II_ANDI,
46                                  II_AND, II_ANDI, II_CLO, II_CLZ, II_EXT,
47                                  II_INS, II_LUI, II_MULT, II_MULTU, II_NOR,
48                                  II_ORI, II_OR, II_ROTR, II_ROTRV, II_SEB,
49                                  II_SEH, II_SLTI_SLTIU, II_SLT_SLTU, II_SLL,
50                                  II_SRA, II_SRL, II_SLLV, II_SRAV, II_SRLV,
51                                  II_SSNOP, II_SUB, II_SUBU, II_WSBH, II_XOR,
52                                  II_XORI]>;
53
54 def : InstRW<[GenericWriteALU], (instrs COPY)>;
55
56 def GenericMDU : ProcResource<1> { let BufferSize = 1; }
57 def GenericIssueMDU : ProcResource<1> { let Super = GenericALU; }
58 def GenericIssueDIV : ProcResource<1> { let Super = GenericMDU; }
59 def GenericWriteHILO : SchedWriteRes<[GenericIssueMDU]>;
60 def GenericWriteALULong : SchedWriteRes<[GenericIssueALU]> { let Latency = 5; }
61 def GenericWriteMove : SchedWriteRes<[GenericIssueALU]> { let Latency = 2; }
62
63 def : ItinRW<[GenericWriteHILO], [II_MADD, II_MADDU, II_MSUB, II_MSUBU]>;
64
65 def GenericWriteMDUtoGPR : SchedWriteRes<[GenericIssueMDU]> {
66   let Latency = 5;
67 }
68
69 def : ItinRW<[GenericWriteMDUtoGPR], [II_MUL]>;
70
71 def GenericWriteDIV : SchedWriteRes<[GenericIssueDIV]> {
72   // Estimated worst case
73   let Latency = 33;
74   let ResourceCycles = [1, 33];
75 }
76 def GenericWriteDIVU : SchedWriteRes<[GenericIssueDIV]> {
77   // Estimated worst case
78   let Latency = 31;
79   let ResourceCycles = [1, 31];
80 }
81
82 def : ItinRW<[GenericWriteDIV], [II_DIV]>;
83
84 def : ItinRW<[GenericWriteDIVU], [II_DIVU]>;
85
86 // MIPS64
87 // ======
88
89 def : ItinRW<[GenericWriteALU], [II_DADDIU, II_DADDU, II_DADDI, II_DADD,
90                                  II_DCLO, II_DCLZ, II_DROTR, II_DROTR32,
91                                  II_DROTRV, II_DSBH, II_DSHD, II_DSLL,
92                                  II_DSLL32, II_DSLLV, II_DSRA, II_DSRA32,
93                                  II_DSRAV, II_DSRL, II_DSRL32, II_DSRLV,
94                                  II_DSUBU, II_DSUB]>;
95
96 def : ItinRW<[GenericWriteDIV], [II_DDIV]>;
97
98 def : ItinRW<[GenericWriteDIVU], [II_DDIVU]>;
99
100 def : ItinRW<[GenericWriteMDUtoGPR], [II_DMUL]>;
101
102 def : ItinRW<[GenericWriteHILO], [II_DMULU, II_DMULT, II_DMULTU]>;
103
104 // MIPS16e
105 // =======
106
107 def : ItinRW<[GenericWriteALU], [IIM16Alu, IIPseudo]>;
108
109 // microMIPS
110 // =========
111
112 def : ItinRW<[GenericWriteALU], [II_MOVE, II_LI, II_NOT]>;
113
114 // MIPSR6
115 // ======
116
117 def GenericWriteMul : SchedWriteRes<[GenericIssueMDU]> { let Latency = 4; }
118 def : ItinRW<[GenericWriteMul], [II_MUH, II_MUHU, II_MULU]>;
119
120 def : ItinRW<[GenericWriteDIV], [II_MOD, II_MODU]>;
121
122 def : ItinRW<[GenericWriteALU], [II_ADDIUPC, II_ALIGN, II_ALUIPC, II_AUI,
123                                  II_AUIPC, II_BITSWAP, II_LSA, II_SELCCZ]>;
124
125 // MIPS64R6
126 // ========
127
128 def : ItinRW<[GenericWriteALU], [II_DALIGN, II_DAHI, II_DATI, II_DAUI,
129                                II_DBITSWAP, II_DLSA]>;
130
131 def : ItinRW<[GenericWriteMDUtoGPR], [II_DMUH, II_DMUHU]>;
132 def : ItinRW<[GenericWriteDIV], [II_DMOD, II_DMODU]>;
133
134 // clo, clz, di, mfhi, mflo
135 def : ItinRW<[GenericWriteALULong], [II_MFHI_MFLO]>;
136 def : ItinRW<[GenericWriteALU], [II_MOVN, II_MOVZ]>;
137 def : ItinRW<[GenericWriteMove], [II_MTHI_MTLO, II_RDHWR]>;
138
139
140 // CTISTD Pipeline
141 // ---------------
142
143 def GenericIssueCTISTD : ProcResource<1> { let Super = GenericALU; }
144
145 def GenericLDST : ProcResource<1> { let BufferSize = 1; }
146 def GenericIssueLDST : ProcResource<1> { let Super = GenericLDST; }
147
148 def GenericWriteJump : SchedWriteRes<[GenericIssueCTISTD]>;
149 def GenericWriteJumpAndLink : SchedWriteRes<[GenericIssueCTISTD]> {
150   let Latency = 2;
151 }
152
153 // b, beq, beql, bg[et]z, bl[et]z, bne, bnel, j, syscall, jal, bltzal, jalx,
154 // jalr, jr.hb, jr, jalr.hb, jarlc, jialc
155 def : ItinRW<[GenericWriteJump], [II_B, II_BCC, II_BCCZ, II_BCCZAL, II_J,
156                                   II_JR, II_JR_HB, II_ERET, II_ERETNC,
157                                   II_DERET]>;
158
159 def : ItinRW<[GenericWriteJumpAndLink], [II_JAL, II_JALR, II_JALR_HB,
160                                          II_BC2CCZ]>;
161
162 def : ItinRW<[GenericWriteJump], [II_JRC, II_JRADDIUSP]>;
163
164 def : ItinRW<[GenericWriteJumpAndLink], [II_BCCZALS, II_JALS, II_JALRS]>;
165
166 // MIPSR6
167 // ======
168
169 def : ItinRW<[GenericWriteJumpAndLink], [II_BALC, II_JALRC, II_JIALC]>;
170
171 def : ItinRW<[GenericWriteJump], [II_JIC, II_BC, II_BCCC, II_BCCZC]>;
172
173
174 def GenericWriteTrap : SchedWriteRes<[GenericIssueCTISTD]>;
175
176 def : ItinRW<[GenericWriteTrap], [II_BREAK, II_SYSCALL, II_TEQ, II_TEQI,
177                                   II_TGE, II_TGEI, II_TGEIU, II_TGEU, II_TNE,
178                                   II_TNEI, II_TLT, II_TLTI, II_TLTU, II_TTLTIU,
179                                   II_TRAP, II_SDBBP]>;
180
181 // COP0 Pipeline
182 // =============
183
184 def GenericCOP0 : ProcResource<1> { let BufferSize = 1; }
185
186 def GenericIssueCOP0 : ProcResource<1> { let Super = GenericCOP0; }
187 def GenericWriteCOP0TLB : SchedWriteRes<[GenericIssueCOP0]> { let Latency = 4; }
188 def GenericWriteCOP0 : SchedWriteRes<[GenericIssueCOP0]> { let Latency = 3; }
189 def GenericReadCOP0 : SchedWriteRes<[GenericIssueCOP0]> { let Latency = 2; }
190 def GenericReadWritePGPR : SchedWriteRes<[GenericIssueCOP0]>;
191 def GenericReadWriteCOP0Long : SchedWriteRes<[GenericIssueCOP0]> {
192   let Latency = 5;
193 }
194 def GenericWriteCOP0Short : SchedWriteRes<[GenericIssueCOP0]>;
195
196 def : ItinRW<[GenericWriteCOP0TLB], [II_TLBP, II_TLBR, II_TLBWI, II_TLBWR]>;
197 def : ItinRW<[GenericWriteCOP0TLB], [II_TLBINV, II_TLBINVF]>;
198
199 def : ItinRW<[GenericReadCOP0], [II_MFC0]>;
200 def : ItinRW<[GenericWriteCOP0], [II_MTC0]>;
201
202 def : ItinRW<[GenericWriteCOP0], [II_EVP, II_DVP]>;
203
204 // MIPSR5
205 // ======
206 def : ItinRW<[GenericReadCOP0], [II_MFHC0]>;
207 def : ItinRW<[GenericWriteCOP0], [II_MTHC0]>;
208
209 // MIPS64
210 // ======
211
212 def : ItinRW<[GenericReadCOP0], [II_DMFC0]>;
213 def : ItinRW<[GenericWriteCOP0], [II_DMTC0]>;
214
215 def : ItinRW<[GenericWriteCOP0], [II_RDPGPR, II_WRPGPR]>;
216
217 def : ItinRW<[GenericWriteCOP0], [II_DI, II_EI]>;
218
219 def : ItinRW<[GenericWriteCOP0], [II_EHB, II_PAUSE, II_WAIT]>;
220
221 def GenericCOP2 : ProcResource<1> { let BufferSize = 1; }
222 def GenericWriteCOPOther : SchedWriteRes<[GenericCOP2]>;
223
224 def : ItinRW<[GenericWriteCOPOther], [II_MFC2, II_MTC2, II_DMFC2, II_DMTC2]>;
225
226 // LDST Pipeline
227 // -------------
228
229 def GenericWriteLoad : SchedWriteRes<[GenericIssueLDST]> {
230   let Latency = 2;
231 }
232
233 def GenericWritePref : SchedWriteRes<[GenericIssueLDST]>;
234 def GenericWriteSync : SchedWriteRes<[GenericIssueLDST]>;
235 def GenericWriteCache : SchedWriteRes<[GenericIssueLDST]> { let Latency = 5; }
236
237 def GenericWriteStore : SchedWriteRes<[GenericIssueLDST]>;
238 def GenericWriteStoreSC : SchedWriteRes<[GenericIssueLDST]> { let Latency = 2; }
239
240 def GenericWriteGPRFromBypass : SchedWriteRes<[GenericIssueLDST]> {
241   let Latency = 2;
242 }
243
244 def GenericWriteStoreFromOtherUnits : SchedWriteRes<[GenericIssueLDST]>;
245 def GenericWriteLoadToOtherUnits : SchedWriteRes<[GenericIssueLDST]> {
246   let Latency = 0;
247 }
248
249 // l[bhw], l[bh]u, ll
250 def : ItinRW<[GenericWriteLoad], [II_LB, II_LBU, II_LH, II_LHU, II_LW, II_LL,
251                                   II_LWC2, II_LWC3, II_LDC2, II_LDC3]>;
252
253 // lw[lr]
254 def : ItinRW<[GenericWriteLoad], [II_LWL, II_LWR]>;
255
256 // MIPS64 loads
257 def : ItinRW<[GenericWriteLoad], [II_LD, II_LLD, II_LWU]>;
258
259 // ld[lr]
260 def : ItinRW<[GenericWriteLoad], [II_LDL, II_LDR]>;
261
262 // MIPS32 EVA
263 def : ItinRW<[GenericWriteLoad], [II_LBE, II_LBUE, II_LHE, II_LHUE, II_LWE,
264                                   II_LLE]>;
265
266 def : ItinRW<[GenericWriteLoad], [II_LWLE, II_LWRE]>;
267
268 // MIPS MT instructions
269 // ====================
270
271 def : ItinRW<[GenericWriteMove], [II_DMT, II_DVPE, II_EMT, II_EVPE, II_MFTR,
272                                   II_MTTR]>;
273
274 def : ItinRW<[GenericReadWriteCOP0Long], [II_YIELD]>;
275
276 def : ItinRW<[GenericWriteCOP0Short], [II_FORK]>;
277
278 // MIPS32R6 and MIPS16e
279 // ====================
280
281 def : ItinRW<[GenericWriteLoad], [II_LWPC]>;
282
283 // MIPS64R6
284 // ====================
285
286 def : ItinRW<[GenericWriteLoad], [II_LWUPC, II_LDPC]>;
287
288
289 // s[bhw], sc, s[dw]c[23]
290 def : ItinRW<[GenericWriteStore], [II_SB, II_SH, II_SW, II_SWC2, II_SWC3,
291                                    II_SDC2, II_SDC3]>;
292
293 def : ItinRW<[GenericWriteStoreSC], [II_SC]>;
294
295 // PreMIPSR6 sw[lr]
296 def : ItinRW<[GenericWriteStore], [II_SWL, II_SWR]>;
297
298 // EVA ASE stores
299 def : ItinRW<[GenericWriteStore], [II_SBE, II_SHE, II_SWE, II_SCE]>;
300
301 def : ItinRW<[GenericWriteStore], [II_SWLE, II_SWRE]>;
302
303 // MIPS64
304 // ======
305
306 def : ItinRW<[GenericWriteStore], [II_SD, II_SCD]>;
307
308 // PreMIPSR6 stores
309 // ================
310
311 def : ItinRW<[GenericWriteStore], [II_SDL, II_SDR]>;
312
313 // MIPS16e
314 // =======
315
316 def : ItinRW<[GenericWriteLoad], [II_RESTORE]>;
317
318 def : ItinRW<[GenericWriteStore], [II_SAVE]>;
319
320 // microMIPS
321 // =========
322
323 def : ItinRW<[GenericWriteLoad], [II_LWM, II_LWP, II_LWXS]>;
324
325 def : ItinRW<[GenericWriteStore], [II_SWM, II_SWP]>;
326
327 // pref
328 def : ItinRW<[GenericWritePref], [II_PREF]>;
329
330 def : ItinRW<[GenericWritePref], [II_PREFE]>;
331
332 // cache
333 def : ItinRW<[GenericWriteCache], [II_CACHE]>;
334
335 def : ItinRW<[GenericWriteCache], [II_CACHEE]>;
336
337 // sync
338 def : ItinRW<[GenericWriteSync], [II_SYNC]>;
339
340 def : ItinRW<[GenericWriteSync], [II_SYNCI]>;
341
342 // FPU Pipelines
343 // =============
344
345 def GenericFPQ : ProcResource<1> { let BufferSize = 1; }
346 def GenericIssueFPUS : ProcResource<1> { let Super = GenericFPQ; }
347 def GenericIssueFPUL : ProcResource<1> { let Super = GenericFPQ; }
348 def GenericIssueFPULoad : ProcResource<1> { let Super = GenericFPQ; }
349 def GenericIssueFPUStore : ProcResource<1> { let Super = GenericFPQ; }
350 def GenericIssueFPUMove : ProcResource<1> { let Super = GenericFPQ; }
351 def GenericFPUDivSqrt : ProcResource<1> { let Super = GenericFPQ; }
352
353 // The floating point compare of the 24k series including interAptiv has a
354 // listed latency of 1-2. Using the higher latency here.
355
356 def GenericWriteFPUCmp : SchedWriteRes<[GenericIssueFPUS]> { let Latency = 2; }
357 def GenericWriteFPUS : SchedWriteRes<[GenericIssueFPUS]> { let Latency = 4; }
358 def GenericWriteFPUL : SchedWriteRes<[GenericIssueFPUL]> { let Latency = 5; }
359 def GenericWriteFPUStore : SchedWriteRes<[GenericIssueFPUStore]> { let
360   Latency = 1;
361 }
362 def GenericWriteFPULoad : SchedWriteRes<[GenericIssueFPULoad]> {
363   let Latency = 2;
364 }
365 def GenericWriteFPUMoveFP : SchedWriteRes<[GenericIssueFPUMove]> {
366   let Latency = 4;
367 }
368 def GenericWriteFPUMoveGPRFPU : SchedWriteRes<[GenericIssueFPUMove]> {
369   let Latency = 2;
370 }
371 def GenericWriteFPUDivS : SchedWriteRes<[GenericFPUDivSqrt]> {
372   let Latency = 17;
373   let ResourceCycles = [ 14 ];
374 }
375 def GenericWriteFPUDivD : SchedWriteRes<[GenericFPUDivSqrt]> {
376   let Latency = 32;
377   let ResourceCycles = [ 29 ];
378 }
379 def GenericWriteFPURcpS : SchedWriteRes<[GenericFPUDivSqrt]> {
380   let Latency = 13;
381   let ResourceCycles = [ 10 ];
382 }
383 def GenericWriteFPURcpD : SchedWriteRes<[GenericFPUDivSqrt]> {
384   let Latency = 25;
385   let ResourceCycles = [ 21 ];
386 }
387 def GenericWriteFPURsqrtS : SchedWriteRes<[GenericFPUDivSqrt]> {
388   let Latency = 17;
389   let ResourceCycles = [ 14 ];
390 }
391 def GenericWriteFPURsqrtD : SchedWriteRes<[GenericFPUDivSqrt]> {
392   let Latency = 32;
393   let ResourceCycles = [ 29 ];
394 }
395 def GenericWriteFPUSqrtS : SchedWriteRes<[GenericFPUDivSqrt]> {
396   let Latency = 17;
397   let ResourceCycles = [ 14 ];
398 }
399 def GenericWriteFPUSqrtD : SchedWriteRes<[GenericFPUDivSqrt]> {
400   let Latency = 29;
401   let ResourceCycles = [ 29 ];
402 }
403
404 // Floating point compare and branch
405 // ---------------------------------
406 //
407 // c.<cc>.[ds], bc1[tf], bc1[tf]l
408 def : ItinRW<[GenericWriteFPUCmp], [II_C_CC_D, II_C_CC_S, II_BC1F, II_BC1T,
409                                     II_BC1FL, II_BC1TL]>;
410
411 def : ItinRW<[GenericWriteFPUCmp], [II_CMP_CC_D, II_CMP_CC_S]>;
412
413 // Short Pipe
414 // ----------
415 //
416 // abs.[ds], abs.ps, add.[ds], neg.[ds], neg.ps, madd.s, msub.s, nmadd,s
417 // nmsub.s, sub.[ds], mul.s
418
419 def : ItinRW<[GenericWriteFPUS], [II_ABS, II_ADD_D, II_ADD_S, II_MADD_S,
420                                   II_MSUB_S, II_MUL_S, II_NEG, II_NMADD_S,
421                                   II_NMSUB_S, II_SUB_S, II_SUB_D]>;
422 // mov[tf].[ds]
423
424 def : ItinRW<[GenericWriteFPUS], [II_MOVF_S, II_MOVF_D, II_MOVT_S, II_MOVT_D]>;
425
426 // MIPSR6
427 // ------
428 //
429 // sel(eq|ne).[ds], max.[ds], maxa.[ds], min.[ds], mina.[ds], class.[ds]
430 def : ItinRW<[GenericWriteFPUS], [II_SELCCZ_S, II_SELCCZ_D, II_MAX_S,
431                                   II_MAX_D, II_MAXA_S, II_MAXA_D, II_MIN_S,
432                                   II_MIN_D, II_MINA_S, II_MINA_D, II_CLASS_S,
433                                   II_CLASS_D]>;
434
435 // Long Pipe
436 // ----------
437 //
438 // nmadd.d, nmsub.d, mul.[ds], mul.ps, ceil.[wl].[sd], cvt.d.[sw], cvt.s.[dw],
439 // cvt.w.[sd], cvt.[sw].ps, trunc.w.[ds], trunc.w.ps, floor.[ds],
440 // round.[lw].[ds], floor.[lw].ds
441
442 // madd.d, msub.dm mul.d, mul.ps, nmadd.d, nmsub.d, ceil.[wl].[sd], cvt.d.[sw],
443 // cvt.s.[dw], cvt.w.[sd], cvt.[sw].ps, round.[lw].[ds], floor.[lw].ds,
444 // trunc.w.[ds], trunc.w.ps,
445 def : ItinRW<[GenericWriteFPUL], [II_MADD_D, II_MSUB_D, II_MUL_D, II_NMADD_D,
446                                   II_NMSUB_D, II_CEIL, II_CVT,
447                                   II_FLOOR, II_ROUND, II_TRUNC]>;
448
449 // div.[ds], div.ps
450 def : ItinRW<[GenericWriteFPUDivS], [II_DIV_S]>;
451 def : ItinRW<[GenericWriteFPUDivD], [II_DIV_D]>;
452
453 // sqrt.[ds], sqrt.ps
454 def : ItinRW<[GenericWriteFPUSqrtS], [II_SQRT_S]>;
455 def : ItinRW<[GenericWriteFPUSqrtD], [II_SQRT_D]>;
456
457 // rsqrt.[ds], recip.[ds]
458 def : ItinRW<[GenericWriteFPURcpS], [II_RECIP_S, II_RSQRT_S]>;
459 def : ItinRW<[GenericWriteFPURcpD], [II_RECIP_D, II_RSQRT_D]>;
460
461 // MIPSR6
462 // ======
463 //
464 // rint.[ds]
465 def : ItinRW<[GenericWriteFPUL], [II_RINT_S, II_RINT_D]>;
466
467 // Load Pipe
468 // ---------
469
470 // ctc1, mtc1, mthc1, cfc1, mfc1, mfhc1
471 def : ItinRW<[GenericWriteFPUMoveGPRFPU], [II_CFC1, II_CTC1, II_MFC1, II_MFHC1,
472                                            II_MTC1, II_MTHC1]>;
473
474 // swc1, swxc1
475 def : ItinRW<[GenericWriteFPUStore], [II_SDC1, II_SDXC1, II_SUXC1, II_SWC1,
476                                       II_SWXC1]>;
477
478 // movn.[ds], movz.[ds]
479 def : ItinRW<[GenericWriteFPUMoveFP], [II_MOV_D, II_MOV_S, II_MOVF, II_MOVT,
480                                        II_MOVN_D, II_MOVN_S, II_MOVZ_D,
481                                        II_MOVZ_S]>;
482
483 // l[dw]x?c1
484 def : ItinRW<[GenericWriteFPULoad], [II_LDC1, II_LDXC1, II_LUXC1, II_LWC1,
485                                      II_LWXC1]>;
486
487 // MIPS64
488 // ======
489
490 def : ItinRW<[GenericWriteFPUMoveGPRFPU], [II_DMFC1, II_DMTC1]>;
491
492 // MIPSR6
493 // ======
494
495 def : ItinRW<[GenericWriteFPUS], [II_MADDF_S, II_MSUBF_S]>;
496
497 def : ItinRW<[GenericWriteFPUS], [II_MADDF_D, II_MSUBF_D]>;
498
499 def : ItinRW<[GenericWriteFPUCmp], [II_BC1CCZ, II_SEL_D, II_SEL_S]>;
500
501 // Cavium Networks MIPS (cnMIPS) - Octeon, HasCnMips
502 // =================================================
503
504 def : ItinRW<[GenericWriteALU], [II_SEQ_SNE, II_SEQI_SNEI, II_POP, II_BADDU,
505                                  II_BBIT]>;
506
507 // MIPS DSP ASE, HasDSP
508 // ====================
509
510 def GenericDSP : ProcResource<1> { let BufferSize = 1; }
511 def GenericDSPShort : SchedWriteRes<[GenericDSP]> { let Latency = 2; }
512 def GenericDSPLong : SchedWriteRes<[GenericDSP]> { let Latency = 6; }
513 def GenericDSPBypass : SchedWriteRes<[GenericDSP]> { let Latency = 1; }
514 def GenericDSPMTHILO : SchedWriteRes<[GenericDSP]> { let Latency = 5; }
515 def GenericDSPLoad : SchedWriteRes<[GenericDSP]> { let Latency = 4; }
516 def GenericDSPMTHLIP : SchedWriteRes<[GenericDSP]> { let Latency = 5; }
517
518 def : InstRW<[GenericDSPLong], (instregex "^EXTRV_RS_W$")>;
519 def : InstRW<[GenericDSPLong], (instregex "^EXTRV_R_W$")>;
520 def : InstRW<[GenericDSPLong], (instregex "^EXTRV_S_H$")>;
521 def : InstRW<[GenericDSPLong], (instregex "^EXTRV_W$")>;
522 def : InstRW<[GenericDSPLong], (instregex "^EXTR_RS_W$")>;
523 def : InstRW<[GenericDSPLong], (instregex "^EXTR_R_W$")>;
524 def : InstRW<[GenericDSPLong], (instregex "^EXTR_S_H$")>;
525 def : InstRW<[GenericDSPLong], (instregex "^EXTR_W$")>;
526 def : InstRW<[GenericDSPLong], (instregex "^INSV$")>;
527
528 def : InstRW<[GenericDSPMTHLIP], (instregex "^MTHLIP$")>;
529 def : InstRW<[GenericDSPMTHILO], (instregex "^MTHI_DSP$")>;
530 def : InstRW<[GenericDSPMTHILO], (instregex "^MTLO_DSP$")>;
531
532 def : InstRW<[GenericDSPShort], (instregex "^ABSQ_S_PH$")>;
533 def : InstRW<[GenericDSPShort], (instregex "^ABSQ_S_W$")>;
534 def : InstRW<[GenericDSPShort], (instregex "^ADDQ_PH$")>;
535 def : InstRW<[GenericDSPShort], (instregex "^ADDQ_S_PH$")>;
536 def : InstRW<[GenericDSPShort], (instregex "^ADDQ_S_W$")>;
537 def : InstRW<[GenericDSPShort], (instregex "^ADDSC$")>;
538 def : InstRW<[GenericDSPShort], (instregex "^ADDU_QB$")>;
539 def : InstRW<[GenericDSPShort], (instregex "^ADDU_S_QB$")>;
540 def : InstRW<[GenericDSPShort], (instregex "^ADDWC$")>;
541 def : InstRW<[GenericDSPShort], (instregex "^BITREV$")>;
542 def : InstRW<[GenericDSPShort], (instregex "^BPOSGE32$")>;
543 def : InstRW<[GenericDSPShort], (instregex "^CMPGU_EQ_QB$")>;
544 def : InstRW<[GenericDSPShort], (instregex "^CMPGU_LE_QB$")>;
545 def : InstRW<[GenericDSPShort], (instregex "^CMPGU_LT_QB$")>;
546 def : InstRW<[GenericDSPShort], (instregex "^CMPU_EQ_QB$")>;
547 def : InstRW<[GenericDSPShort], (instregex "^CMPU_LE_QB$")>;
548 def : InstRW<[GenericDSPShort], (instregex "^CMPU_LT_QB$")>;
549 def : InstRW<[GenericDSPShort], (instregex "^CMP_EQ_PH$")>;
550 def : InstRW<[GenericDSPShort], (instregex "^CMP_LE_PH$")>;
551 def : InstRW<[GenericDSPShort], (instregex "^CMP_LT_PH$")>;
552 def : InstRW<[GenericDSPShort], (instregex "^DPAQ_SA_L_W$")>;
553 def : InstRW<[GenericDSPShort], (instregex "^DPAQ_S_W_PH$")>;
554 def : InstRW<[GenericDSPShort], (instregex "^DPAU_H_QBL$")>;
555 def : InstRW<[GenericDSPShort], (instregex "^DPAU_H_QBR$")>;
556 def : InstRW<[GenericDSPShort], (instregex "^DPSQ_SA_L_W$")>;
557 def : InstRW<[GenericDSPShort], (instregex "^DPSQ_S_W_PH$")>;
558 def : InstRW<[GenericDSPShort], (instregex "^DPSU_H_QBL$")>;
559 def : InstRW<[GenericDSPShort], (instregex "^DPSU_H_QBR$")>;
560 def : InstRW<[GenericDSPShort], (instregex "^EXTPDPV$")>;
561 def : InstRW<[GenericDSPShort], (instregex "^EXTPDP$")>;
562 def : InstRW<[GenericDSPShort], (instregex "^EXTPV$")>;
563 def : InstRW<[GenericDSPShort], (instregex "^EXTP$")>;
564 def : InstRW<[GenericDSPShort], (instregex "^LBUX$")>;
565 def : InstRW<[GenericDSPShort], (instregex "^LHX$")>;
566 def : InstRW<[GenericDSPShort], (instregex "^LWX$")>;
567 def : InstRW<[GenericDSPShort], (instregex "^MADDU_DSP$")>;
568 def : InstRW<[GenericDSPShort], (instregex "^MADD_DSP$")>;
569 def : InstRW<[GenericDSPShort], (instregex "^MAQ_SA_W_PHL$")>;
570 def : InstRW<[GenericDSPShort], (instregex "^MAQ_SA_W_PHR$")>;
571 def : InstRW<[GenericDSPShort], (instregex "^MAQ_S_W_PHL$")>;
572 def : InstRW<[GenericDSPShort], (instregex "^MAQ_S_W_PHR$")>;
573 def : InstRW<[GenericDSPShort], (instregex "^MFHI_DSP$")>;
574 def : InstRW<[GenericDSPShort], (instregex "^MFLO_DSP$")>;
575 def : InstRW<[GenericDSPShort], (instregex "^MODSUB$")>;
576 def : InstRW<[GenericDSPShort], (instregex "^MSUBU_DSP$")>;
577 def : InstRW<[GenericDSPShort], (instregex "^MSUB_DSP$")>;
578 def : InstRW<[GenericDSPShort], (instregex "^MULEQ_S_W_PHL$")>;
579 def : InstRW<[GenericDSPShort], (instregex "^MULEQ_S_W_PHR$")>;
580 def : InstRW<[GenericDSPShort], (instregex "^MULEU_S_PH_QBL$")>;
581 def : InstRW<[GenericDSPShort], (instregex "^MULEU_S_PH_QBR$")>;
582 def : InstRW<[GenericDSPShort], (instregex "^MULQ_RS_PH$")>;
583 def : InstRW<[GenericDSPShort], (instregex "^MULSAQ_S_W_PH$")>;
584 def : InstRW<[GenericDSPShort], (instregex "^MULTU_DSP$")>;
585 def : InstRW<[GenericDSPShort], (instregex "^MULT_DSP$")>;
586 def : InstRW<[GenericDSPShort], (instregex "^PACKRL_PH$")>;
587 def : InstRW<[GenericDSPShort], (instregex "^PICK_PH$")>;
588 def : InstRW<[GenericDSPShort], (instregex "^PICK_QB$")>;
589 def : InstRW<[GenericDSPShort], (instregex "^PRECEQU_PH_QBLA$")>;
590 def : InstRW<[GenericDSPShort], (instregex "^PRECEQU_PH_QBL$")>;
591 def : InstRW<[GenericDSPShort], (instregex "^PRECEQU_PH_QBRA$")>;
592 def : InstRW<[GenericDSPShort], (instregex "^PRECEQU_PH_QBR$")>;
593 def : InstRW<[GenericDSPShort], (instregex "^PRECEQ_W_PHL$")>;
594 def : InstRW<[GenericDSPShort], (instregex "^PRECEQ_W_PHR$")>;
595 def : InstRW<[GenericDSPShort], (instregex "^PRECEU_PH_QBLA$")>;
596 def : InstRW<[GenericDSPShort], (instregex "^PRECEU_PH_QBL$")>;
597 def : InstRW<[GenericDSPShort], (instregex "^PRECEU_PH_QBRA$")>;
598 def : InstRW<[GenericDSPShort], (instregex "^PRECEU_PH_QBR$")>;
599 def : InstRW<[GenericDSPShort], (instregex "^PRECRQU_S_QB_PH$")>;
600 def : InstRW<[GenericDSPShort], (instregex "^PRECRQ_PH_W$")>;
601 def : InstRW<[GenericDSPShort], (instregex "^PRECRQ_QB_PH$")>;
602 def : InstRW<[GenericDSPShort], (instregex "^PRECRQ_RS_PH_W$")>;
603 def : InstRW<[GenericDSPShort], (instregex "^RADDU_W_QB$")>;
604 def : InstRW<[GenericDSPShort], (instregex "^RDDSP$")>;
605 def : InstRW<[GenericDSPShort], (instregex "^REPLV_PH$")>;
606 def : InstRW<[GenericDSPShort], (instregex "^REPLV_QB$")>;
607 def : InstRW<[GenericDSPShort], (instregex "^REPL_PH$")>;
608 def : InstRW<[GenericDSPShort], (instregex "^REPL_QB$")>;
609 def : InstRW<[GenericDSPShort], (instregex "^SHILOV$")>;
610 def : InstRW<[GenericDSPShort], (instregex "^SHILO$")>;
611 def : InstRW<[GenericDSPShort], (instregex "^SHLLV_PH$")>;
612 def : InstRW<[GenericDSPShort], (instregex "^SHLLV_QB$")>;
613 def : InstRW<[GenericDSPShort], (instregex "^SHLLV_S_PH$")>;
614 def : InstRW<[GenericDSPShort], (instregex "^SHLLV_S_W$")>;
615 def : InstRW<[GenericDSPShort], (instregex "^SHLL_PH$")>;
616 def : InstRW<[GenericDSPShort], (instregex "^SHLL_QB$")>;
617 def : InstRW<[GenericDSPShort], (instregex "^SHLL_S_PH$")>;
618 def : InstRW<[GenericDSPShort], (instregex "^SHLL_S_W$")>;
619 def : InstRW<[GenericDSPShort], (instregex "^SHRAV_PH$")>;
620 def : InstRW<[GenericDSPShort], (instregex "^SHRAV_R_PH$")>;
621 def : InstRW<[GenericDSPShort], (instregex "^SHRAV_R_W$")>;
622 def : InstRW<[GenericDSPShort], (instregex "^SHRA_PH$")>;
623 def : InstRW<[GenericDSPShort], (instregex "^SHRA_R_PH$")>;
624 def : InstRW<[GenericDSPShort], (instregex "^SHRA_R_W$")>;
625 def : InstRW<[GenericDSPShort], (instregex "^SHRLV_QB$")>;
626 def : InstRW<[GenericDSPShort], (instregex "^SHRL_QB$")>;
627 def : InstRW<[GenericDSPShort], (instregex "^SUBQ_PH$")>;
628 def : InstRW<[GenericDSPShort], (instregex "^SUBQ_S_PH$")>;
629 def : InstRW<[GenericDSPShort], (instregex "^SUBQ_S_W$")>;
630 def : InstRW<[GenericDSPShort], (instregex "^SUBU_QB$")>;
631 def : InstRW<[GenericDSPShort], (instregex "^SUBU_S_QB$")>;
632 def : InstRW<[GenericDSPShort], (instregex "^WRDSP$")>;
633
634 // MIPS DSP R2 - hasDSP, HasDSPR2, InMicroMips
635 // ===========================================
636
637 def : InstRW<[GenericDSPShort], (instregex "^ABSQ_S_QB$")>;
638 def : InstRW<[GenericDSPShort], (instregex "^ADDQH_PH$")>;
639 def : InstRW<[GenericDSPShort], (instregex "^ADDQH_R_PH$")>;
640 def : InstRW<[GenericDSPShort], (instregex "^ADDQH_R_W$")>;
641 def : InstRW<[GenericDSPShort], (instregex "^ADDQH_W$")>;
642 def : InstRW<[GenericDSPShort], (instregex "^ADDUH_QB$")>;
643 def : InstRW<[GenericDSPShort], (instregex "^ADDUH_R_QB$")>;
644 def : InstRW<[GenericDSPShort], (instregex "^ADDU_PH$")>;
645 def : InstRW<[GenericDSPShort], (instregex "^ADDU_S_PH$")>;
646 def : InstRW<[GenericDSPShort], (instregex "^APPEND$")>;
647 def : InstRW<[GenericDSPShort], (instregex "^BALIGN$")>;
648 def : InstRW<[GenericDSPShort], (instregex "^CMPGDU_EQ_QB$")>;
649 def : InstRW<[GenericDSPShort], (instregex "^CMPGDU_LE_QB$")>;
650 def : InstRW<[GenericDSPShort], (instregex "^CMPGDU_LT_QB$")>;
651 def : InstRW<[GenericDSPShort], (instregex "^DPA_W_PH$")>;
652 def : InstRW<[GenericDSPShort], (instregex "^DPAQX_SA_W_PH$")>;
653 def : InstRW<[GenericDSPShort], (instregex "^DPAQX_S_W_PH$")>;
654 def : InstRW<[GenericDSPShort], (instregex "^DPAX_W_PH$")>;
655 def : InstRW<[GenericDSPShort], (instregex "^DPS_W_PH$")>;
656 def : InstRW<[GenericDSPShort], (instregex "^DPSQX_S_W_PH$")>;
657 def : InstRW<[GenericDSPShort], (instregex "^DPSQX_SA_W_PH$")>;
658 def : InstRW<[GenericDSPShort], (instregex "^DPSX_W_PH$")>;
659 def : InstRW<[GenericDSPShort], (instregex "^MUL_PH$")>;
660 def : InstRW<[GenericDSPShort], (instregex "^MUL_S_PH$")>;
661 def : InstRW<[GenericDSPShort], (instregex "^MULQ_RS_W$")>;
662 def : InstRW<[GenericDSPShort], (instregex "^MULQ_S_PH$")>;
663 def : InstRW<[GenericDSPShort], (instregex "^MULQ_S_W$")>;
664 def : InstRW<[GenericDSPShort], (instregex "^MULSA_W_PH$")>;
665 def : InstRW<[GenericDSPShort], (instregex "^PRECR_QB_PH$")>;
666 def : InstRW<[GenericDSPShort], (instregex "^PRECR_SRA_PH_W$")>;
667 def : InstRW<[GenericDSPShort], (instregex "^PRECR_SRA_R_PH_W$")>;
668 def : InstRW<[GenericDSPShort], (instregex "^PREPEND$")>;
669 def : InstRW<[GenericDSPShort], (instregex "^SHRA_QB$")>;
670 def : InstRW<[GenericDSPShort], (instregex "^SHRA_R_QB$")>;
671 def : InstRW<[GenericDSPShort], (instregex "^SHRAV_QB$")>;
672 def : InstRW<[GenericDSPShort], (instregex "^SHRAV_R_QB$")>;
673 def : InstRW<[GenericDSPShort], (instregex "^SHRL_PH$")>;
674 def : InstRW<[GenericDSPShort], (instregex "^SHRLV_PH$")>;
675 def : InstRW<[GenericDSPShort], (instregex "^SUBQH_PH$")>;
676 def : InstRW<[GenericDSPShort], (instregex "^SUBQH_R_PH$")>;
677 def : InstRW<[GenericDSPShort], (instregex "^SUBQH_W$")>;
678 def : InstRW<[GenericDSPShort], (instregex "^SUBQH_R_W$")>;
679 def : InstRW<[GenericDSPShort], (instregex "^SUBU_PH$")>;
680 def : InstRW<[GenericDSPShort], (instregex "^SUBU_S_PH$")>;
681 def : InstRW<[GenericDSPShort], (instregex "^SUBUH_QB$")>;
682 def : InstRW<[GenericDSPShort], (instregex "^SUBUH_R_QB$")>;
683
684 // microMIPS DSP R1 - HasDSP, InMicroMips
685 // ======================================
686
687 def : InstRW<[GenericDSPShort], (instregex "^ABSQ_S_PH_MM$")>;
688 def : InstRW<[GenericDSPShort], (instregex "^ABSQ_S_W_MM$")>;
689 def : InstRW<[GenericDSPShort], (instregex "^ADDQ_PH_MM$")>;
690 def : InstRW<[GenericDSPShort], (instregex "^ADDQ_S_PH_MM$")>;
691 def : InstRW<[GenericDSPShort], (instregex "^ADDQ_S_W_MM$")>;
692 def : InstRW<[GenericDSPShort], (instregex "^ADDSC_MM$")>;
693 def : InstRW<[GenericDSPShort], (instregex "^ADDU_QB_MM$")>;
694 def : InstRW<[GenericDSPShort], (instregex "^ADDU_S_QB_MM$")>;
695 def : InstRW<[GenericDSPShort], (instregex "^ADDWC_MM$")>;
696 def : InstRW<[GenericDSPShort], (instregex "^BITREV_MM$")>;
697 def : InstRW<[GenericDSPShort], (instregex "^BPOSGE32_MM$")>;
698 def : InstRW<[GenericDSPShort], (instregex "^CMPGU_EQ_QB_MM$")>;
699 def : InstRW<[GenericDSPShort], (instregex "^CMPGU_LE_QB_MM$")>;
700 def : InstRW<[GenericDSPShort], (instregex "^CMPGU_LT_QB_MM$")>;
701 def : InstRW<[GenericDSPShort], (instregex "^CMPU_EQ_QB_MM$")>;
702 def : InstRW<[GenericDSPShort], (instregex "^CMPU_LE_QB_MM$")>;
703 def : InstRW<[GenericDSPShort], (instregex "^CMPU_LT_QB_MM$")>;
704 def : InstRW<[GenericDSPShort], (instregex "^CMP_EQ_PH_MM$")>;
705 def : InstRW<[GenericDSPShort], (instregex "^CMP_LE_PH_MM$")>;
706 def : InstRW<[GenericDSPShort], (instregex "^CMP_LT_PH_MM$")>;
707 def : InstRW<[GenericDSPShort], (instregex "^DPAQ_SA_L_W_MM$")>;
708 def : InstRW<[GenericDSPShort], (instregex "^DPAQ_S_W_PH_MM$")>;
709 def : InstRW<[GenericDSPShort], (instregex "^DPAU_H_QBL_MM$")>;
710 def : InstRW<[GenericDSPShort], (instregex "^DPAU_H_QBR_MM$")>;
711 def : InstRW<[GenericDSPShort], (instregex "^DPSQ_SA_L_W_MM$")>;
712 def : InstRW<[GenericDSPShort], (instregex "^DPSQ_S_W_PH_MM$")>;
713 def : InstRW<[GenericDSPShort], (instregex "^DPSU_H_QBL_MM$")>;
714 def : InstRW<[GenericDSPShort], (instregex "^DPSU_H_QBR_MM$")>;
715 def : InstRW<[GenericDSPShort], (instregex "^EXTPDPV_MM$")>;
716 def : InstRW<[GenericDSPShort], (instregex "^EXTPDP_MM$")>;
717 def : InstRW<[GenericDSPShort], (instregex "^EXTPV_MM$")>;
718 def : InstRW<[GenericDSPShort], (instregex "^EXTP_MM$")>;
719 def : InstRW<[GenericDSPShort], (instregex "^EXTRV_RS_W_MM$")>;
720 def : InstRW<[GenericDSPShort], (instregex "^EXTRV_R_W_MM$")>;
721 def : InstRW<[GenericDSPShort], (instregex "^EXTRV_S_H_MM$")>;
722 def : InstRW<[GenericDSPShort], (instregex "^EXTRV_W_MM$")>;
723 def : InstRW<[GenericDSPShort], (instregex "^EXTR_RS_W_MM$")>;
724 def : InstRW<[GenericDSPShort], (instregex "^EXTR_R_W_MM$")>;
725 def : InstRW<[GenericDSPShort], (instregex "^EXTR_S_H_MM$")>;
726 def : InstRW<[GenericDSPShort], (instregex "^EXTR_W_MM$")>;
727 def : InstRW<[GenericDSPShort], (instregex "^INSV_MM$")>;
728 def : InstRW<[GenericDSPShort], (instregex "^LBUX_MM$")>;
729 def : InstRW<[GenericDSPShort], (instregex "^LHX_MM$")>;
730 def : InstRW<[GenericDSPShort], (instregex "^LWX_MM$")>;
731 def : InstRW<[GenericDSPShort], (instregex "^MADDU_DSP_MM$")>;
732 def : InstRW<[GenericDSPShort], (instregex "^MADD_DSP_MM$")>;
733 def : InstRW<[GenericDSPShort], (instregex "^MAQ_SA_W_PHL_MM$")>;
734 def : InstRW<[GenericDSPShort], (instregex "^MAQ_SA_W_PHR_MM$")>;
735 def : InstRW<[GenericDSPShort], (instregex "^MAQ_S_W_PHL_MM$")>;
736 def : InstRW<[GenericDSPShort], (instregex "^MAQ_S_W_PHR_MM$")>;
737 def : InstRW<[GenericDSPShort], (instregex "^MFHI_DSP_MM$")>;
738 def : InstRW<[GenericDSPShort], (instregex "^MFLO_DSP_MM$")>;
739 def : InstRW<[GenericDSPShort], (instregex "^MODSUB_MM$")>;
740 def : InstRW<[GenericDSPShort], (instregex "^MOVEP_MM$")>;
741 def : InstRW<[GenericDSPShort], (instregex "^MOVEP_MMR6$")>;
742 def : InstRW<[GenericDSPShort], (instregex "^MOVN_I_MM$")>;
743 def : InstRW<[GenericDSPShort], (instregex "^MOVZ_I_MM$")>;
744 def : InstRW<[GenericDSPShort], (instregex "^MSUBU_DSP_MM$")>;
745 def : InstRW<[GenericDSPShort], (instregex "^MSUB_DSP_MM$")>;
746 def : InstRW<[GenericDSPShort], (instregex "^MTHI_DSP_MM$")>;
747 def : InstRW<[GenericDSPShort], (instregex "^MTHLIP_MM$")>;
748 def : InstRW<[GenericDSPShort], (instregex "^MTLO_DSP_MM$")>;
749 def : InstRW<[GenericDSPShort], (instregex "^MULEQ_S_W_PHL_MM$")>;
750 def : InstRW<[GenericDSPShort], (instregex "^MULEQ_S_W_PHR_MM$")>;
751 def : InstRW<[GenericDSPShort], (instregex "^MULEU_S_PH_QBL_MM$")>;
752 def : InstRW<[GenericDSPShort], (instregex "^MULEU_S_PH_QBR_MM$")>;
753 def : InstRW<[GenericDSPShort], (instregex "^MULQ_RS_PH_MM$")>;
754 def : InstRW<[GenericDSPShort], (instregex "^MULSAQ_S_W_PH_MM$")>;
755 def : InstRW<[GenericDSPShort], (instregex "^MULTU_DSP_MM$")>;
756 def : InstRW<[GenericDSPShort], (instregex "^MULT_DSP_MM$")>;
757 def : InstRW<[GenericDSPShort], (instregex "^PACKRL_PH_MM$")>;
758 def : InstRW<[GenericDSPShort], (instregex "^PICK_PH_MM$")>;
759 def : InstRW<[GenericDSPShort], (instregex "^PICK_QB_MM$")>;
760 def : InstRW<[GenericDSPShort], (instregex "^PRECEQU_PH_QBLA_MM$")>;
761 def : InstRW<[GenericDSPShort], (instregex "^PRECEQU_PH_QBL_MM$")>;
762 def : InstRW<[GenericDSPShort], (instregex "^PRECEQU_PH_QBRA_MM$")>;
763 def : InstRW<[GenericDSPShort], (instregex "^PRECEQU_PH_QBR_MM$")>;
764 def : InstRW<[GenericDSPShort], (instregex "^PRECEQ_W_PHL_MM$")>;
765 def : InstRW<[GenericDSPShort], (instregex "^PRECEQ_W_PHR_MM$")>;
766 def : InstRW<[GenericDSPShort], (instregex "^PRECEU_PH_QBLA_MM$")>;
767 def : InstRW<[GenericDSPShort], (instregex "^PRECEU_PH_QBL_MM$")>;
768 def : InstRW<[GenericDSPShort], (instregex "^PRECEU_PH_QBRA_MM$")>;
769 def : InstRW<[GenericDSPShort], (instregex "^PRECEU_PH_QBR_MM$")>;
770 def : InstRW<[GenericDSPShort], (instregex "^PRECRQU_S_QB_PH_MM$")>;
771 def : InstRW<[GenericDSPShort], (instregex "^PRECRQ_PH_W_MM$")>;
772 def : InstRW<[GenericDSPShort], (instregex "^PRECRQ_QB_PH_MM$")>;
773 def : InstRW<[GenericDSPShort], (instregex "^PRECRQ_RS_PH_W_MM$")>;
774 def : InstRW<[GenericDSPShort], (instregex "^RADDU_W_QB_MM$")>;
775 def : InstRW<[GenericDSPShort], (instregex "^RDDSP_MM$")>;
776 def : InstRW<[GenericDSPShort], (instregex "^REPLV_PH_MM$")>;
777 def : InstRW<[GenericDSPShort], (instregex "^REPLV_QB_MM$")>;
778 def : InstRW<[GenericDSPShort], (instregex "^REPL_PH_MM$")>;
779 def : InstRW<[GenericDSPShort], (instregex "^REPL_QB_MM$")>;
780 def : InstRW<[GenericDSPShort], (instregex "^SHILOV_MM$")>;
781 def : InstRW<[GenericDSPShort], (instregex "^SHILO_MM$")>;
782 def : InstRW<[GenericDSPShort], (instregex "^SHLLV_PH_MM$")>;
783 def : InstRW<[GenericDSPShort], (instregex "^SHLLV_QB_MM$")>;
784 def : InstRW<[GenericDSPShort], (instregex "^SHLLV_S_PH_MM$")>;
785 def : InstRW<[GenericDSPShort], (instregex "^SHLLV_S_W_MM$")>;
786 def : InstRW<[GenericDSPShort], (instregex "^SHLL_PH_MM$")>;
787 def : InstRW<[GenericDSPShort], (instregex "^SHLL_QB_MM$")>;
788 def : InstRW<[GenericDSPShort], (instregex "^SHLL_S_PH_MM$")>;
789 def : InstRW<[GenericDSPShort], (instregex "^SHLL_S_W_MM$")>;
790 def : InstRW<[GenericDSPShort], (instregex "^SHRAV_PH_MM$")>;
791 def : InstRW<[GenericDSPShort], (instregex "^SHRAV_R_PH_MM$")>;
792 def : InstRW<[GenericDSPShort], (instregex "^SHRAV_R_W_MM$")>;
793 def : InstRW<[GenericDSPShort], (instregex "^SHRA_PH_MM$")>;
794 def : InstRW<[GenericDSPShort], (instregex "^SHRA_R_PH_MM$")>;
795 def : InstRW<[GenericDSPShort], (instregex "^SHRA_R_W_MM$")>;
796 def : InstRW<[GenericDSPShort], (instregex "^SHRLV_QB_MM$")>;
797 def : InstRW<[GenericDSPShort], (instregex "^SHRL_QB_MM$")>;
798 def : InstRW<[GenericDSPShort], (instregex "^SUBQ_PH_MM$")>;
799 def : InstRW<[GenericDSPShort], (instregex "^SUBQ_S_PH_MM$")>;
800 def : InstRW<[GenericDSPShort], (instregex "^SUBQ_S_W_MM$")>;
801 def : InstRW<[GenericDSPShort], (instregex "^SUBU_QB_MM$")>;
802 def : InstRW<[GenericDSPShort], (instregex "^SUBU_S_QB_MM$")>;
803 def : InstRW<[GenericDSPShort], (instregex "^WRDSP_MM$")>;
804
805
806 // microMIPS DSP R2 - hasDSP, HasDSPR2, InMicroMips
807 // ================================================
808
809 def : InstRW<[GenericDSPShort], (instregex "^ABSQ_S_QB_MMR2$")>;
810 def : InstRW<[GenericDSPShort], (instregex "^ADDQH_PH_MMR2$")>;
811 def : InstRW<[GenericDSPShort], (instregex "^ADDQH_R_PH_MMR2$")>;
812 def : InstRW<[GenericDSPShort], (instregex "^ADDQH_R_W_MMR2$")>;
813 def : InstRW<[GenericDSPShort], (instregex "^ADDQH_W_MMR2$")>;
814 def : InstRW<[GenericDSPShort], (instregex "^ADDUH_QB_MMR2$")>;
815 def : InstRW<[GenericDSPShort], (instregex "^ADDUH_R_QB_MMR2$")>;
816 def : InstRW<[GenericDSPShort], (instregex "^ADDU_PH_MMR2$")>;
817 def : InstRW<[GenericDSPShort], (instregex "^ADDU_S_PH_MMR2$")>;
818 def : InstRW<[GenericDSPShort], (instregex "^APPEND_MMR2$")>;
819 def : InstRW<[GenericDSPShort], (instregex "^BALIGN_MMR2$")>;
820 def : InstRW<[GenericDSPShort], (instregex "^CMPGDU_EQ_QB_MMR2$")>;
821 def : InstRW<[GenericDSPShort], (instregex "^CMPGDU_LE_QB_MMR2$")>;
822 def : InstRW<[GenericDSPShort], (instregex "^CMPGDU_LT_QB_MMR2$")>;
823 def : InstRW<[GenericDSPShort], (instregex "^DPA_W_PH_MMR2$")>;
824 def : InstRW<[GenericDSPShort], (instregex "^DPAQX_SA_W_PH_MMR2$")>;
825 def : InstRW<[GenericDSPShort], (instregex "^DPAQX_S_W_PH_MMR2$")>;
826 def : InstRW<[GenericDSPShort], (instregex "^DPAX_W_PH_MMR2$")>;
827 def : InstRW<[GenericDSPShort], (instregex "^DPS_W_PH_MMR2$")>;
828 def : InstRW<[GenericDSPShort], (instregex "^DPSQX_S_W_PH_MMR2$")>;
829 def : InstRW<[GenericDSPShort], (instregex "^DPSQX_SA_W_PH_MMR2$")>;
830 def : InstRW<[GenericDSPShort], (instregex "^DPSX_W_PH_MMR2$")>;
831 def : InstRW<[GenericDSPShort], (instregex "^MUL_PH_MMR2$")>;
832 def : InstRW<[GenericDSPShort], (instregex "^MUL_S_PH_MMR2$")>;
833 def : InstRW<[GenericDSPShort], (instregex "^MULQ_RS_W_MMR2$")>;
834 def : InstRW<[GenericDSPShort], (instregex "^MULQ_S_PH_MMR2$")>;
835 def : InstRW<[GenericDSPShort], (instregex "^MULQ_S_W_MMR2$")>;
836 def : InstRW<[GenericDSPShort], (instregex "^MULSA_W_PH_MMR2$")>;
837 def : InstRW<[GenericDSPShort], (instregex "^PRECR_QB_PH_MMR2$")>;
838 def : InstRW<[GenericDSPShort], (instregex "^PRECR_SRA_PH_W_MMR2$")>;
839 def : InstRW<[GenericDSPShort], (instregex "^PRECR_SRA_R_PH_W_MMR2$")>;
840 def : InstRW<[GenericDSPShort], (instregex "^PREPEND_MMR2$")>;
841 def : InstRW<[GenericDSPShort], (instregex "^SHRA_QB_MMR2$")>;
842 def : InstRW<[GenericDSPShort], (instregex "^SHRA_R_QB_MMR2$")>;
843 def : InstRW<[GenericDSPShort], (instregex "^SHRAV_QB_MMR2$")>;
844 def : InstRW<[GenericDSPShort], (instregex "^SHRAV_R_QB_MMR2$")>;
845 def : InstRW<[GenericDSPShort], (instregex "^SHRL_PH_MMR2$")>;
846 def : InstRW<[GenericDSPShort], (instregex "^SHRLV_PH_MMR2$")>;
847 def : InstRW<[GenericDSPShort], (instregex "^SUBQH_PH_MMR2$")>;
848 def : InstRW<[GenericDSPShort], (instregex "^SUBQH_R_PH_MMR2$")>;
849 def : InstRW<[GenericDSPShort], (instregex "^SUBQH_W_MMR2$")>;
850 def : InstRW<[GenericDSPShort], (instregex "^SUBQH_R_W_MMR2$")>;
851 def : InstRW<[GenericDSPShort], (instregex "^SUBU_PH_MMR2$")>;
852 def : InstRW<[GenericDSPShort], (instregex "^SUBU_S_PH_MMR2$")>;
853 def : InstRW<[GenericDSPShort], (instregex "^SUBUH_QB_MMR2$")>;
854 def : InstRW<[GenericDSPShort], (instregex "^SUBUH_R_QB_MMR2$")>;
855
856 // microMIPS DSP R3 - hasDSP, hasDSPR2, hasDSPR3, InMicroMips
857 // ==========================================================
858
859 def : InstRW<[GenericDSPShort], (instregex "^BPOSGE32C_MMR3$")>;
860
861 // MIPS MSA ASE - hasMSA
862 // =====================
863
864 def GenericWriteMSAShortLogic : SchedWriteRes<[GenericIssueFPUS]>;
865 def GenericWriteMSAShortInt : SchedWriteRes<[GenericIssueFPUS]> {
866 let Latency = 2;
867 }
868 def GenericWriteMoveOtherUnitsToFPU : SchedWriteRes<[GenericIssueFPUS]>;
869 def GenericWriteMSAOther3 : SchedWriteRes<[GenericIssueFPUS]> {
870 let Latency = 3;
871 }
872 def GenericWriteMSALongInt : SchedWriteRes<[GenericIssueFPUS]> {
873 let Latency = 5;
874 }
875 def GenericWriteFPUDivI : SchedWriteRes<[GenericFPQ]> {
876   let Latency = 33;
877   let ResourceCycles = [ 33 ];
878 }
879
880 // FPUS is also used in moves from floating point and MSA registers to general
881 // purpose registers.
882 def GenericWriteMoveFPUSToOtherUnits : SchedWriteRes<[GenericIssueFPUS]> {
883   let Latency = 0;
884 }
885
886 // FPUL is also used in moves from floating point and MSA registers to general
887 // purpose registers.
888 def GenericWriteMoveFPULToOtherUnits : SchedWriteRes<[GenericIssueFPUL]>;
889
890
891 // adds_a.[bhwd], adds_[asu].[bhwd], addvi?.[bhwd], asub_[us].[bhwd],
892 // aver?_[us].[bhwd]
893 def : InstRW<[GenericWriteMSAShortInt], (instregex "^ADD_A_[BHWD]$")>;
894 def : InstRW<[GenericWriteMSAShortInt], (instregex "^ADDS_[ASU]_[BHWD]$")>;
895
896 // TODO: ADDVI_[BHW] might be 1 cycle latency rather than 2. Need to confirm it.
897 // add.[bhwd], addvi.[bhwd], asub_[us].[bhwd], ave.[bhwd], aver.[bhwd]
898 def : InstRW<[GenericWriteMSAShortInt], (instregex "^ADDVI?_[BHWD]$")>;
899 def : InstRW<[GenericWriteMSAShortInt], (instregex "^ASUB_[US].[BHWD]$")>;
900 def : InstRW<[GenericWriteMSAShortInt], (instregex "^AVER?_[US].[BHWD]$")>;
901
902 // and.v, andi.b, move.v, ldi.[bhwd], xor.v, nor.v, xori.b, nori.b
903 def : InstRW<[GenericWriteMSAShortLogic], (instregex "^MOVE_V$")>;
904 def : InstRW<[GenericWriteMSAShortLogic], (instregex "^LDI_[BHWD]$")>;
905 def : InstRW<[GenericWriteMSAShortLogic], (instregex "^(AND|OR|[XN]OR)_V$")>;
906 def : InstRW<[GenericWriteMSAShortLogic], (instregex "^(AND|OR|[XN]OR)I_B$")>;
907 def : InstRW<[GenericWriteMSAShortLogic], (instregex "^(AND|OR|[XN]OR)I_B$")>;
908
909 // vshf.[bhwd], binsl.[bhwd], binsr.[bhwd], insert.[bhwd], sld?.[bhwd],
910 // bset.[bhwd], bclr.[bhwd], bneg.[bhwd], bsel_v, bseli_b
911 def : InstRW<[GenericWriteMSAShortInt], (instregex "^VSHF_[BHWD]$")>;
912 def : InstRW<[GenericWriteMSAShortInt], (instregex "^(BINSL|BINSLI)_[BHWD]$")>;
913 def : InstRW<[GenericWriteMSAShortInt], (instregex "^(BINSR|BINSRI)_[BHWD]$")>;
914 def : InstRW<[GenericWriteMSAShortInt], (instregex "^INSERT_[BHWD]$")>;
915 def : InstRW<[GenericWriteMSAShortInt], (instregex "^(SLD|SLDI)_[BHWD]$")>;
916 def : InstRW<[GenericWriteMSAShortInt], (instregex "^(BSET|BSETI)_[BHWD]$")>;
917 def : InstRW<[GenericWriteMSAShortInt], (instregex "^(BCLR|BCLRI)_[BHWD]$")>;
918 def : InstRW<[GenericWriteMSAShortInt], (instregex "^(BNEG|BNEGI)_[BHWD]$")>;
919 def : InstRW<[GenericWriteMSAShortInt], (instregex "^(BSEL_V|BSELI_B)$")>;
920 def : InstRW<[GenericWriteMSAShortInt], (instregex "^BMN*Z.*$")>;
921
922 // pcnt.[bhwd], sat_s.[bhwd], sat_u.bhwd]
923 def : InstRW<[GenericWriteMSAOther3], (instregex "^PCNT_[BHWD]$")>;
924 def : InstRW<[GenericWriteMSAOther3], (instregex "^SAT_(S|U)_[BHWD]$")>;
925
926 // bnz.[bhwdv], cfcmsa, ctcmsa
927 def : InstRW<[GenericWriteMSAShortLogic], (instregex "^(BNZ|BZ)_[BHWDV]$")>;
928 def : InstRW<[GenericWriteMSAShortLogic], (instregex "^C(F|T)CMSA$")>;
929
930 // shf.[bhw], fill[bhwd], splat?.[bhwd]
931 def : InstRW<[GenericWriteMSAShortInt], (instregex "^SHF_[BHW]$")>;
932 def : InstRW<[GenericWriteMSAShortInt], (instregex "^FILL_[BHWD]$")>;
933 def : InstRW<[GenericWriteMSAShortInt], (instregex "^(SPLAT|SPLATI)_[BHWD]$")>;
934
935 // pcnt.[bhwd], sat_s.[bhwd], sat_u.bhwd]
936 def : InstRW<[GenericWriteMSAOther3], (instregex "^PCNT_[BHWD]$")>;
937 def : InstRW<[GenericWriteMSAOther3], (instregex "^SAT_(S|U)_[BHWD]$")>;
938
939 // fexp2_w, fexp2_d
940 def : InstRW<[GenericWriteFPUS], (instregex "^FEXP2_(W|D)$")>;
941
942 // compare, converts, round to int, floating point truncate.
943 def : InstRW<[GenericWriteFPUS], (instregex "^(CLT|CLTI)_(S|U)_[BHWD]$")>;
944 def : InstRW<[GenericWriteFPUS], (instregex "^(CLE|CLEI)_(S|U)_[BHWD]$")>;
945 def : InstRW<[GenericWriteFPUS], (instregex "^(CEQ|CEQI)_[BHWD]$")>;
946 def : InstRW<[GenericWriteFPUS], (instregex "^CMP_UN_(S|D)$")>;
947 def : InstRW<[GenericWriteFPUS], (instregex "^CMP_UEQ_(S|D)$")>;
948 def : InstRW<[GenericWriteFPUS], (instregex "^CMP_EQ_(S|D)$")>;
949 def : InstRW<[GenericWriteFPUS], (instregex "^CMP_LT_(S|D)$")>;
950 def : InstRW<[GenericWriteFPUS], (instregex "^CMP_ULT_(S|D)$")>;
951 def : InstRW<[GenericWriteFPUS], (instregex "^CMP_LE_(S|D)$")>;
952 def : InstRW<[GenericWriteFPUS], (instregex "^CMP_ULE_(S|D)$")>;
953 def : InstRW<[GenericWriteFPUS], (instregex "^FS(AF|EQ|LT|LE|NE|OR)_(W|D)$")>;
954 def : InstRW<[GenericWriteFPUS], (instregex "^FSUEQ_(W|D)$")>;
955 def : InstRW<[GenericWriteFPUS], (instregex "^FSULE_(W|D)$")>;
956 def : InstRW<[GenericWriteFPUS], (instregex "^FSULT_(W|D)$")>;
957 def : InstRW<[GenericWriteFPUS], (instregex "^FSUNE_(W|D)$")>;
958 def : InstRW<[GenericWriteFPUS], (instregex "^FSUN_(W|D)$")>;
959 def : InstRW<[GenericWriteFPUS], (instregex "^FCAF_(W|D)$")>;
960 def : InstRW<[GenericWriteFPUS], (instregex "^FCEQ_(W|D)$")>;
961 def : InstRW<[GenericWriteFPUS], (instregex "^FCLE_(W|D)$")>;
962 def : InstRW<[GenericWriteFPUS], (instregex "^FCLT_(W|D)$")>;
963 def : InstRW<[GenericWriteFPUS], (instregex "^FCNE_(W|D)$")>;
964 def : InstRW<[GenericWriteFPUS], (instregex "^FCOR_(W|D)$")>;
965 def : InstRW<[GenericWriteFPUS], (instregex "^FCUEQ_(W|D)$")>;
966 def : InstRW<[GenericWriteFPUS], (instregex "^FCULE_(W|D)$")>;
967 def : InstRW<[GenericWriteFPUS], (instregex "^FCULT_(W|D)$")>;
968 def : InstRW<[GenericWriteFPUS], (instregex "^FCUNE_(W|D)$")>;
969 def : InstRW<[GenericWriteFPUS], (instregex "^FCUN_(W|D)$")>;
970 def : InstRW<[GenericWriteFPUS], (instregex "^FABS_(W|D)$")>;
971 def : InstRW<[GenericWriteFPUS], (instregex "^FFINT_(U|S)_(W|D)$")>;
972 def : InstRW<[GenericWriteFPUS], (instregex "^FFQL_(W|D)$")>;
973 def : InstRW<[GenericWriteFPUS], (instregex "^FFQR_(W|D)$")>;
974 def : InstRW<[GenericWriteFPUS], (instregex "^FTINT_(U|S)_(W|D)$")>;
975 def : InstRW<[GenericWriteFPUS], (instregex "^FRINT_(W|D)$")>;
976 def : InstRW<[GenericWriteFPUS], (instregex "^FTQ_(H|W)$")>;
977 def : InstRW<[GenericWriteFPUS], (instregex "^FTRUNC_(U|S)_(W|D)$")>;
978
979 // fexdo.[hw], fexupl.[wd], fexupr.[wd]
980 def : InstRW<[GenericWriteFPUS], (instregex "^FEXDO_(H|W)$")>;
981 def : InstRW<[GenericWriteFPUS], (instregex "^FEXUPL_(W|D)$")>;
982 def : InstRW<[GenericWriteFPUS], (instregex "^FEXUPR_(W|D)$")>;
983
984 // fclass.[wd], fmax.[wd], fmax_a.[wd], fmin.[wd], fmin_a.[wd], flog2.[wd]
985 def : InstRW<[GenericWriteFPUS], (instregex "^FCLASS_(W|D)$")>;
986 def : InstRW<[GenericWriteFPUS], (instregex "^FMAX_A_(W|D)$")>;
987 def : InstRW<[GenericWriteFPUS], (instregex "^FMAX_(W|D)$")>;
988 def : InstRW<[GenericWriteFPUS], (instregex "^FMIN_A_(W|D)$")>;
989 def : InstRW<[GenericWriteFPUS], (instregex "^FMIN_(W|D)$")>;
990 def : InstRW<[GenericWriteFPUS], (instregex "^FLOG2_(W|D)$")>;
991
992 // interleave right/left, interleave even/odd, insert
993 def : InstRW<[GenericWriteMSAShortLogic], (instregex "^(ILVR|ILVL)_[BHWD]$")>;
994 def : InstRW<[GenericWriteMSAShortLogic], (instregex "^(ILVEV|ILVOD)_[BHWD]$")>;
995 def : InstRW<[GenericWriteMSAShortLogic], (instregex "^INSVE_[BHWD]$")>;
996
997 // subs_?.[bhwd], subsus_?.[bhwd], subsuu_?.[bhwd], subvi.[bhwd], subv.[bhwd],
998 def : InstRW<[GenericWriteMSAShortInt], (instregex "^SUBS_(S|U)_[BHWD]$")>;
999 def : InstRW<[GenericWriteMSAShortInt], (instregex "^SUBSUS_(S|U)_[BHWD]$")>;
1000 def : InstRW<[GenericWriteMSAShortInt], (instregex "^SUBSUU_(S|U)_[BHWD]$")>;
1001 def : InstRW<[GenericWriteMSAShortInt], (instregex "^SUBVI_[BHWD]$")>;
1002 def : InstRW<[GenericWriteMSAShortInt], (instregex "^SUBV_[BHWD]$")>;
1003
1004 // mod_[su].[bhwd], div_[su].[bhwd]
1005 def : InstRW<[GenericWriteFPUDivI], (instregex "^MOD_(S|U)_[BHWD]$")>;
1006 def : InstRW<[GenericWriteFPUDivI], (instregex "^DIV_(S|U)_[BHWD]$")>;
1007
1008 // hadd_[su].[bhwd], hsub_[su].[bhwd], max_[sua].[bhwd], min_[sua].[bhwd],
1009 // maxi_[su].[bhwd], mini_[su].[bhwd], sra?.[bhwd], srar?.[bhwd], srlr.[bhwd],
1010 // sll?.[bhwd], pckev.[bhwd], pckod.[bhwd], nloc.[bhwd], nlzc.[bhwd],
1011 // insve.[bhwd]
1012 def : InstRW<[GenericWriteMSAShortLogic], (instregex "^HADD_(S|U)_[BHWD]$")>;
1013 def : InstRW<[GenericWriteMSAShortLogic], (instregex "^HSUB_(S|U)_[BHWD]$")>;
1014 def : InstRW<[GenericWriteMSAShortLogic], (instregex "^(MAX|MIN)_S_[BHWD]$")>;
1015 def : InstRW<[GenericWriteMSAShortLogic], (instregex "^(MAX|MIN)_U_[BHWD]$")>;
1016 def : InstRW<[GenericWriteMSAShortLogic], (instregex "^(MAX|MIN)_A_[BHWD]$")>;
1017 def : InstRW<[GenericWriteMSAShortLogic],
1018              (instregex "^(MAXI|MINI)_(S|U)_[BHWD]$")>;
1019 def : InstRW<[GenericWriteMSAShortLogic], (instregex "^(SRA|SRAI)_[BHWD]$")>;
1020 def : InstRW<[GenericWriteMSAShortLogic], (instregex "^(SRL|SRLI)_[BHWD]$")>;
1021 def : InstRW<[GenericWriteMSAShortLogic], (instregex "^(SRAR|SRARI)_[BHWD]$")>;
1022 def : InstRW<[GenericWriteMSAShortLogic], (instregex "^(SRLR|SRLRI)_[BHWD]$")>;
1023 def : InstRW<[GenericWriteMSAShortLogic], (instregex "^(SLL|SLLI)_[BHWD]$")>;
1024 def : InstRW<[GenericWriteMSAShortLogic], (instregex "^(PCKEV|PCKOD)_[BHWD]$")>;
1025 def : InstRW<[GenericWriteMSAShortLogic], (instregex "^(NLOC|NLZC)_[BHWD]$")>;
1026 def : InstRW<[GenericWriteMSAShortLogic], (instregex "^INSVE_[BHWD]$")>;
1027
1028 // dpadd_?.[bhwd], dpsub_?.[bhwd], dotp_?.[bhwd], msubv.[bhwd], maddv.[bhwd]
1029 // mulv.[bhwd].
1030 def : InstRW<[GenericWriteMSALongInt], (instregex "^DPADD_(S|U)_[HWD]$")>;
1031 def : InstRW<[GenericWriteMSALongInt], (instregex "^DPSUB_(S|U)_[HWD]$")>;
1032 def : InstRW<[GenericWriteMSALongInt], (instregex "^DOTP_(S|U)_[HWD]$")>;
1033 def : InstRW<[GenericWriteMSALongInt], (instregex "^MSUBV_[BHWD]$")>;
1034 def : InstRW<[GenericWriteMSALongInt], (instregex "^MADDV_[BHWD]$")>;
1035 def : InstRW<[GenericWriteMSALongInt], (instregex "^MULV_[BHWD]$")>;
1036
1037 // madd?.q.[hw], msub?.q.[hw], mul?.q.[hw]
1038 def : InstRW<[GenericWriteMSALongInt], (instregex "^MADDR_Q_[HW]$")>;
1039 def : InstRW<[GenericWriteMSALongInt], (instregex "^MADD_Q_[HW]$")>;
1040 def : InstRW<[GenericWriteMSALongInt], (instregex "^MSUBR_Q_[HW]$")>;
1041 def : InstRW<[GenericWriteMSALongInt], (instregex "^MSUB_Q_[HW]$")>;
1042 def : InstRW<[GenericWriteMSALongInt], (instregex "^MULR_Q_[HW]$")>;
1043 def : InstRW<[GenericWriteMSALongInt], (instregex "^MUL_Q_[HW]$")>;
1044
1045 // fadd.[dw], fmadd.[dw], fmul.[dw], frcp.[dw], frsqrt.[dw], fsqrt.[dw]
1046 // fsub.[dw], fdiv.[dw]
1047 def : InstRW<[GenericWriteFPUL], (instregex "^FADD_[DW]$")>;
1048 def : InstRW<[GenericWriteFPUL], (instregex "^FMADD_[DW]$")>;
1049 def : InstRW<[GenericWriteFPUL], (instregex "^FMSUB_[DW]$")>;
1050 def : InstRW<[GenericWriteFPUL], (instregex "^FMUL_[DW]$")>;
1051 def : InstRW<[GenericWriteFPUL], (instregex "^FRCP_[DW]$")>;
1052 def : InstRW<[GenericWriteFPUL], (instregex "^FRSQRT_[DW]$")>;
1053 def : InstRW<[GenericWriteFPUL], (instregex "^FSQRT_[DW]$")>;
1054 def : InstRW<[GenericWriteFPUL], (instregex "^FSUB_[DW]$")>;
1055 def : InstRW<[GenericWriteFPUL], (instregex "^FDIV_[DW]$")>;
1056
1057 // copy.[su]_[bhwd]
1058 def : InstRW<[GenericWriteFPUMoveGPRFPU], (instregex "^COPY_U_[BHW]$")>;
1059 def : InstRW<[GenericWriteFPUMoveGPRFPU], (instregex "^COPY_S_[BHWD]$")>;
1060
1061 def : InstRW<[GenericWriteFPUStore], (instregex "^ST_[BHWD]$")>;
1062 def : InstRW<[GenericWriteFPULoad], (instregex "^LD_[BHWD]$")>;
1063 }