Simon Dardis | 1fa1fb0 | 2016-09-01 15:03:13 +0000 | [diff] [blame] | 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 GnereicReadWritePGPR : SchedWriteRes<[GenericIssueCOP0]>; |
| 191 | |
| 192 | def : ItinRW<[GenericWriteCOP0TLB], [II_TLBP, II_TLBR, II_TLBWI, II_TLBWR]>; |
| 193 | def : ItinRW<[GenericWriteCOP0TLB], [II_TLBINV, II_TLBINVF]>; |
| 194 | |
| 195 | def : ItinRW<[GenericReadCOP0], [II_MFC0]>; |
| 196 | def : ItinRW<[GenericWriteCOP0], [II_MTC0]>; |
| 197 | |
| 198 | def : ItinRW<[GenericWriteCOP0], [II_EVP, II_DVP]>; |
| 199 | |
| 200 | // MIPSR5 |
| 201 | // ====== |
| 202 | def : ItinRW<[GenericReadCOP0], [II_MFHC0]>; |
| 203 | def : ItinRW<[GenericWriteCOP0], [II_MTHC0]>; |
| 204 | |
| 205 | // MIPS64 |
| 206 | // ====== |
| 207 | |
| 208 | def : ItinRW<[GenericReadCOP0], [II_DMFC0]>; |
| 209 | def : ItinRW<[GenericWriteCOP0], [II_DMTC0]>; |
| 210 | |
| 211 | def : ItinRW<[GenericWriteCOP0], [II_RDPGPR, II_WRPGPR]>; |
| 212 | |
| 213 | def : ItinRW<[GenericWriteCOP0], [II_DI, II_EI]>; |
| 214 | |
| 215 | def : ItinRW<[GenericWriteCOP0], [II_EHB, II_PAUSE, II_WAIT]>; |
| 216 | |
| 217 | def GenericCOP2 : ProcResource<1> { let BufferSize = 1; } |
| 218 | def GenericWriteCOPOther : SchedWriteRes<[GenericCOP2]>; |
| 219 | |
| 220 | def : ItinRW<[GenericWriteCOPOther], [II_MFC2, II_MTC2, II_DMFC2, II_DMTC2]>; |
| 221 | |
| 222 | // LDST Pipeline |
| 223 | // ------------- |
| 224 | |
| 225 | def GenericWriteLoad : SchedWriteRes<[GenericIssueLDST]> { |
| 226 | let Latency = 2; |
| 227 | } |
| 228 | |
| 229 | def GenericWritePref : SchedWriteRes<[GenericIssueLDST]>; |
| 230 | def GenericWriteSync : SchedWriteRes<[GenericIssueLDST]>; |
| 231 | def GenericWriteCache : SchedWriteRes<[GenericIssueLDST]> { let Latency = 5; } |
| 232 | |
| 233 | def GenericWriteStore : SchedWriteRes<[GenericIssueLDST]>; |
| 234 | def GenericWriteStoreSC : SchedWriteRes<[GenericIssueLDST]> { let Latency = 2; } |
| 235 | |
| 236 | def GenericWriteGPRFromBypass : SchedWriteRes<[GenericIssueLDST]> { |
| 237 | let Latency = 2; |
| 238 | } |
| 239 | |
| 240 | def GenericWriteStoreFromOtherUnits : SchedWriteRes<[GenericIssueLDST]>; |
| 241 | def GenericWriteLoadToOtherUnits : SchedWriteRes<[GenericIssueLDST]> { |
| 242 | let Latency = 0; |
| 243 | } |
| 244 | |
| 245 | // l[bhw], l[bh]u, ll |
| 246 | def : ItinRW<[GenericWriteLoad], [II_LB, II_LBU, II_LH, II_LHU, II_LW, II_LL, |
| 247 | II_LWC2, II_LWC3, II_LDC2, II_LDC3]>; |
| 248 | |
| 249 | // lw[lr] |
| 250 | def : ItinRW<[GenericWriteLoad], [II_LWL, II_LWR]>; |
| 251 | |
| 252 | // MIPS64 loads |
| 253 | def : ItinRW<[GenericWriteLoad], [II_LD, II_LLD, II_LWU]>; |
| 254 | |
| 255 | // ld[lr] |
| 256 | def : ItinRW<[GenericWriteLoad], [II_LDL, II_LDR]>; |
| 257 | |
| 258 | // MIPS32 EVA |
| 259 | def : ItinRW<[GenericWriteLoad], [II_LBE, II_LBUE, II_LHE, II_LHUE, II_LWE, |
| 260 | II_LLE]>; |
| 261 | |
| 262 | def : ItinRW<[GenericWriteLoad], [II_LWLE, II_LWRE]>; |
| 263 | |
| 264 | // MIPS32R6 and MIPS16e |
| 265 | // ==================== |
| 266 | |
| 267 | def : ItinRW<[GenericWriteLoad], [II_LWPC]>; |
| 268 | |
| 269 | // MIPS64R6 |
| 270 | // ==================== |
| 271 | |
| 272 | def : ItinRW<[GenericWriteLoad], [II_LWUPC, II_LDPC]>; |
| 273 | |
| 274 | |
| 275 | // s[bhw], sc, s[dw]c[23] |
| 276 | def : ItinRW<[GenericWriteStore], [II_SB, II_SH, II_SW, II_SWC2, II_SWC3, |
| 277 | II_SDC2, II_SDC3]>; |
| 278 | |
| 279 | def : ItinRW<[GenericWriteStoreSC], [II_SC]>; |
| 280 | |
| 281 | // PreMIPSR6 sw[lr] |
| 282 | def : ItinRW<[GenericWriteStore], [II_SWL, II_SWR]>; |
| 283 | |
| 284 | // EVA ASE stores |
| 285 | def : ItinRW<[GenericWriteStore], [II_SBE, II_SHE, II_SWE, II_SCE]>; |
| 286 | |
| 287 | def : ItinRW<[GenericWriteStore], [II_SWLE, II_SWRE]>; |
| 288 | |
| 289 | // MIPS64 |
| 290 | // ====== |
| 291 | |
| 292 | def : ItinRW<[GenericWriteStore], [II_SD, II_SCD]>; |
| 293 | |
| 294 | // PreMIPSR6 stores |
| 295 | // ================ |
| 296 | |
| 297 | def : ItinRW<[GenericWriteStore], [II_SDL, II_SDR]>; |
| 298 | |
| 299 | // MIPS16e |
| 300 | // ======= |
| 301 | |
| 302 | def : ItinRW<[GenericWriteLoad], [II_RESTORE]>; |
| 303 | |
| 304 | def : ItinRW<[GenericWriteStore], [II_SAVE]>; |
| 305 | |
| 306 | // microMIPS |
| 307 | // ========= |
| 308 | |
| 309 | def : ItinRW<[GenericWriteLoad], [II_LWM, II_LWP, II_LWXS]>; |
| 310 | |
| 311 | def : ItinRW<[GenericWriteStore], [II_SWM, II_SWP]>; |
| 312 | |
| 313 | // pref |
| 314 | def : ItinRW<[GenericWritePref], [II_PREF]>; |
| 315 | |
| 316 | def : ItinRW<[GenericWritePref], [II_PREFE]>; |
| 317 | |
| 318 | // cache |
| 319 | def : ItinRW<[GenericWriteCache], [II_CACHE]>; |
| 320 | |
| 321 | def : ItinRW<[GenericWriteCache], [II_CACHEE]>; |
| 322 | |
| 323 | // sync |
| 324 | def : ItinRW<[GenericWriteSync], [II_SYNC]>; |
| 325 | |
| 326 | def : ItinRW<[GenericWriteSync], [II_SYNCI]>; |
| 327 | |
| 328 | // FPU Pipelines |
| 329 | // ============= |
| 330 | |
| 331 | def GenericFPQ : ProcResource<1> { let BufferSize = 1; } |
| 332 | def GenericIssueFPUS : ProcResource<1> { let Super = GenericFPQ; } |
| 333 | def GenericIssueFPUL : ProcResource<1> { let Super = GenericFPQ; } |
| 334 | def GenericIssueFPULoad : ProcResource<1> { let Super = GenericFPQ; } |
| 335 | def GenericIssueFPUStore : ProcResource<1> { let Super = GenericFPQ; } |
| 336 | def GenericIssueFPUMove : ProcResource<1> { let Super = GenericFPQ; } |
| 337 | def GenericFPUDivSqrt : ProcResource<1> { let Super = GenericFPQ; } |
| 338 | |
| 339 | // The floating point compare of the 24k series including interAptiv has a |
| 340 | // listed latency of 1-2. Using the higher latency here. |
| 341 | |
| 342 | def GenericWriteFPUCmp : SchedWriteRes<[GenericIssueFPUS]> { let Latency = 2; } |
| 343 | def GenericWriteFPUS : SchedWriteRes<[GenericIssueFPUS]> { let Latency = 4; } |
| 344 | def GenericWriteFPUL : SchedWriteRes<[GenericIssueFPUL]> { let Latency = 5; } |
| 345 | def GenericWriteFPUStore : SchedWriteRes<[GenericIssueFPUStore]> { let |
| 346 | Latency = 1; |
| 347 | } |
| 348 | def GenericWriteFPULoad : SchedWriteRes<[GenericIssueFPULoad]> { |
| 349 | let Latency = 2; |
| 350 | } |
| 351 | def GenericWriteFPUMoveFP : SchedWriteRes<[GenericIssueFPUMove]> { |
| 352 | let Latency = 4; |
| 353 | } |
| 354 | def GenericWriteFPUMoveGPRFPU : SchedWriteRes<[GenericIssueFPUMove]> { |
| 355 | let Latency = 2; |
| 356 | } |
| 357 | def GenericWriteFPUDivS : SchedWriteRes<[GenericFPUDivSqrt]> { |
| 358 | let Latency = 17; |
| 359 | let ResourceCycles = [ 14 ]; |
| 360 | } |
| 361 | def GenericWriteFPUDivD : SchedWriteRes<[GenericFPUDivSqrt]> { |
| 362 | let Latency = 32; |
| 363 | let ResourceCycles = [ 29 ]; |
| 364 | } |
| 365 | def GenericWriteFPURcpS : SchedWriteRes<[GenericFPUDivSqrt]> { |
| 366 | let Latency = 13; |
| 367 | let ResourceCycles = [ 10 ]; |
| 368 | } |
| 369 | def GenericWriteFPURcpD : SchedWriteRes<[GenericFPUDivSqrt]> { |
| 370 | let Latency = 25; |
| 371 | let ResourceCycles = [ 21 ]; |
| 372 | } |
| 373 | def GenericWriteFPURsqrtS : SchedWriteRes<[GenericFPUDivSqrt]> { |
| 374 | let Latency = 17; |
| 375 | let ResourceCycles = [ 14 ]; |
| 376 | } |
| 377 | def GenericWriteFPURsqrtD : SchedWriteRes<[GenericFPUDivSqrt]> { |
| 378 | let Latency = 32; |
| 379 | let ResourceCycles = [ 29 ]; |
| 380 | } |
| 381 | def GenericWriteFPUSqrtS : SchedWriteRes<[GenericFPUDivSqrt]> { |
| 382 | let Latency = 17; |
| 383 | let ResourceCycles = [ 14 ]; |
| 384 | } |
| 385 | def GenericWriteFPUSqrtD : SchedWriteRes<[GenericFPUDivSqrt]> { |
| 386 | let Latency = 29; |
| 387 | let ResourceCycles = [ 29 ]; |
| 388 | } |
| 389 | |
| 390 | // Floating point compare and branch |
| 391 | // --------------------------------- |
| 392 | // |
| 393 | // c.<cc>.[ds], bc1[tf], bc1[tf]l |
| 394 | def : ItinRW<[GenericWriteFPUCmp], [II_C_CC_D, II_C_CC_S, II_BC1F, II_BC1T, |
| 395 | II_BC1FL, II_BC1TL]>; |
| 396 | |
| 397 | def : ItinRW<[GenericWriteFPUCmp], [II_CMP_CC_D, II_CMP_CC_S]>; |
| 398 | |
| 399 | // Short Pipe |
| 400 | // ---------- |
| 401 | // |
| 402 | // abs.[ds], abs.ps, add.[ds], neg.[ds], neg.ps, madd.s, msub.s, nmadd,s |
| 403 | // nmsub.s, sub.[ds], mul.s |
| 404 | |
| 405 | def : ItinRW<[GenericWriteFPUS], [II_ABS, II_ADD_D, II_ADD_S, II_MADD_S, |
| 406 | II_MSUB_S, II_MUL_S, II_NEG, II_NMADD_S, |
| 407 | II_NMSUB_S, II_SUB_S, II_SUB_D]>; |
| 408 | // mov[tf].[ds] |
| 409 | |
| 410 | def : ItinRW<[GenericWriteFPUS], [II_MOVF_S, II_MOVF_D, II_MOVT_S, II_MOVT_D]>; |
| 411 | |
| 412 | // MIPSR6 |
| 413 | // ------ |
| 414 | // |
| 415 | // sel(eq|ne).[ds], max.[ds], maxa.[ds], min.[ds], mina.[ds], class.[ds] |
| 416 | def : ItinRW<[GenericWriteFPUS], [II_SELCCZ_S, II_SELCCZ_D, II_MAX_S, |
| 417 | II_MAX_D, II_MAXA_S, II_MAXA_D, II_MIN_S, |
| 418 | II_MIN_D, II_MINA_S, II_MINA_D, II_CLASS_S, |
| 419 | II_CLASS_D]>; |
| 420 | |
| 421 | // Long Pipe |
| 422 | // ---------- |
| 423 | // |
| 424 | // nmadd.d, nmsub.d, mul.[ds], mul.ps, ceil.[wl].[sd], cvt.d.[sw], cvt.s.[dw], |
| 425 | // cvt.w.[sd], cvt.[sw].ps, trunc.w.[ds], trunc.w.ps, floor.[ds], |
| 426 | // round.[lw].[ds], floor.[lw].ds |
| 427 | |
| 428 | // madd.d, msub.dm mul.d, mul.ps, nmadd.d, nmsub.d, ceil.[wl].[sd], cvt.d.[sw], |
| 429 | // cvt.s.[dw], cvt.w.[sd], cvt.[sw].ps, round.[lw].[ds], floor.[lw].ds, |
| 430 | // trunc.w.[ds], trunc.w.ps, |
| 431 | def : ItinRW<[GenericWriteFPUL], [II_MADD_D, II_MSUB_D, II_MUL_D, II_NMADD_D, |
| 432 | II_NMSUB_D, II_CEIL, II_CVT, |
| 433 | II_FLOOR, II_ROUND, II_TRUNC]>; |
| 434 | |
| 435 | // div.[ds], div.ps |
| 436 | def : ItinRW<[GenericWriteFPUDivS], [II_DIV_S]>; |
| 437 | def : ItinRW<[GenericWriteFPUDivD], [II_DIV_D]>; |
| 438 | |
| 439 | // sqrt.[ds], sqrt.ps |
| 440 | def : ItinRW<[GenericWriteFPUSqrtS], [II_SQRT_S]>; |
| 441 | def : ItinRW<[GenericWriteFPUSqrtD], [II_SQRT_D]>; |
| 442 | |
Simon Dardis | f45a59f | 2016-10-05 16:11:01 +0000 | [diff] [blame] | 443 | // rsqrt.[ds], recip.[ds] |
| 444 | def : ItinRW<[GenericWriteFPURcpS], [II_RECIP_S, II_RSQRT_S]>; |
| 445 | def : ItinRW<[GenericWriteFPURcpD], [II_RECIP_D, II_RSQRT_D]>; |
| 446 | |
Simon Dardis | 1fa1fb0 | 2016-09-01 15:03:13 +0000 | [diff] [blame] | 447 | // MIPSR6 |
| 448 | // ====== |
| 449 | // |
| 450 | // rint.[ds] |
| 451 | def : ItinRW<[GenericWriteFPUL], [II_RINT_S, II_RINT_D]>; |
| 452 | |
| 453 | // Load Pipe |
| 454 | // --------- |
| 455 | |
| 456 | // ctc1, mtc1, mthc1, cfc1, mfc1, mfhc1 |
| 457 | def : ItinRW<[GenericWriteFPUMoveGPRFPU], [II_CFC1, II_CTC1, II_MFC1, II_MFHC1, |
| 458 | II_MTC1, II_MTHC1]>; |
| 459 | |
| 460 | // swc1, swxc1 |
| 461 | def : ItinRW<[GenericWriteFPUStore], [II_SDC1, II_SDXC1, II_SUXC1, II_SWC1, |
| 462 | II_SWXC1]>; |
| 463 | |
| 464 | // movn.[ds], movz.[ds] |
| 465 | def : ItinRW<[GenericWriteFPUMoveFP], [II_MOV_D, II_MOV_S, II_MOVF, II_MOVT, |
| 466 | II_MOVN_D, II_MOVN_S, II_MOVZ_D, |
| 467 | II_MOVZ_S]>; |
| 468 | |
| 469 | // l[dw]x?c1 |
| 470 | def : ItinRW<[GenericWriteFPULoad], [II_LDC1, II_LDXC1, II_LUXC1, II_LWC1, |
| 471 | II_LWXC1]>; |
| 472 | |
| 473 | // MIPS64 |
| 474 | // ====== |
| 475 | |
| 476 | def : ItinRW<[GenericWriteFPUMoveGPRFPU], [II_DMFC1, II_DMTC1]>; |
| 477 | |
| 478 | // MIPSR6 |
| 479 | // ====== |
| 480 | |
| 481 | def : ItinRW<[GenericWriteFPUS], [II_MADDF_S, II_MSUBF_S]>; |
| 482 | |
| 483 | def : ItinRW<[GenericWriteFPUS], [II_MADDF_D, II_MSUBF_D]>; |
| 484 | |
| 485 | def : ItinRW<[GenericWriteFPUCmp], [II_BC1CCZ, II_SEL_D, II_SEL_S]>; |
| 486 | |
| 487 | // Cavium Networks MIPS (cnMIPS) - Octeon, HasCnMips |
| 488 | // ================================================= |
| 489 | |
| 490 | def : ItinRW<[GenericWriteALU], [II_SEQ_SNE, II_SEQI_SNEI, II_POP, II_BADDU, |
| 491 | II_BBIT]>; |
| 492 | |
| 493 | // MIPS DSP ASE, HasDSP |
| 494 | // ==================== |
| 495 | |
| 496 | def GenericDSP : ProcResource<1> { let BufferSize = 1; } |
| 497 | def GenericDSPShort : SchedWriteRes<[GenericDSP]> { let Latency = 2; } |
| 498 | def GenericDSPLong : SchedWriteRes<[GenericDSP]> { let Latency = 6; } |
| 499 | def GenericDSPBypass : SchedWriteRes<[GenericDSP]> { let Latency = 1; } |
| 500 | def GenericDSPMTHILO : SchedWriteRes<[GenericDSP]> { let Latency = 5; } |
| 501 | def GenericDSPLoad : SchedWriteRes<[GenericDSP]> { let Latency = 4; } |
| 502 | def GenericDSPMTHLIP : SchedWriteRes<[GenericDSP]> { let Latency = 5; } |
| 503 | |
| 504 | def : InstRW<[GenericDSPLong], (instregex "^EXTRV_RS_W$")>; |
| 505 | def : InstRW<[GenericDSPLong], (instregex "^EXTRV_R_W$")>; |
| 506 | def : InstRW<[GenericDSPLong], (instregex "^EXTRV_S_H$")>; |
| 507 | def : InstRW<[GenericDSPLong], (instregex "^EXTRV_W$")>; |
| 508 | def : InstRW<[GenericDSPLong], (instregex "^EXTR_RS_W$")>; |
| 509 | def : InstRW<[GenericDSPLong], (instregex "^EXTR_R_W$")>; |
| 510 | def : InstRW<[GenericDSPLong], (instregex "^EXTR_S_H$")>; |
| 511 | def : InstRW<[GenericDSPLong], (instregex "^EXTR_W$")>; |
| 512 | def : InstRW<[GenericDSPLong], (instregex "^INSV$")>; |
| 513 | |
| 514 | def : InstRW<[GenericDSPMTHLIP], (instregex "^MTHLIP$")>; |
| 515 | def : InstRW<[GenericDSPMTHILO], (instregex "^MTHI_DSP$")>; |
| 516 | def : InstRW<[GenericDSPMTHILO], (instregex "^MTLO_DSP$")>; |
| 517 | |
| 518 | def : InstRW<[GenericDSPShort], (instregex "^ABSQ_S_PH$")>; |
| 519 | def : InstRW<[GenericDSPShort], (instregex "^ABSQ_S_W$")>; |
| 520 | def : InstRW<[GenericDSPShort], (instregex "^ADDQ_PH$")>; |
| 521 | def : InstRW<[GenericDSPShort], (instregex "^ADDQ_S_PH$")>; |
| 522 | def : InstRW<[GenericDSPShort], (instregex "^ADDQ_S_W$")>; |
| 523 | def : InstRW<[GenericDSPShort], (instregex "^ADDSC$")>; |
| 524 | def : InstRW<[GenericDSPShort], (instregex "^ADDU_QB$")>; |
| 525 | def : InstRW<[GenericDSPShort], (instregex "^ADDU_S_QB$")>; |
| 526 | def : InstRW<[GenericDSPShort], (instregex "^ADDWC$")>; |
| 527 | def : InstRW<[GenericDSPShort], (instregex "^BITREV$")>; |
| 528 | def : InstRW<[GenericDSPShort], (instregex "^BPOSGE32$")>; |
| 529 | def : InstRW<[GenericDSPShort], (instregex "^CMPGU_EQ_QB$")>; |
| 530 | def : InstRW<[GenericDSPShort], (instregex "^CMPGU_LE_QB$")>; |
| 531 | def : InstRW<[GenericDSPShort], (instregex "^CMPGU_LT_QB$")>; |
| 532 | def : InstRW<[GenericDSPShort], (instregex "^CMPU_EQ_QB$")>; |
| 533 | def : InstRW<[GenericDSPShort], (instregex "^CMPU_LE_QB$")>; |
| 534 | def : InstRW<[GenericDSPShort], (instregex "^CMPU_LT_QB$")>; |
| 535 | def : InstRW<[GenericDSPShort], (instregex "^CMP_EQ_PH$")>; |
| 536 | def : InstRW<[GenericDSPShort], (instregex "^CMP_LE_PH$")>; |
| 537 | def : InstRW<[GenericDSPShort], (instregex "^CMP_LT_PH$")>; |
| 538 | def : InstRW<[GenericDSPShort], (instregex "^DPAQ_SA_L_W$")>; |
| 539 | def : InstRW<[GenericDSPShort], (instregex "^DPAQ_S_W_PH$")>; |
| 540 | def : InstRW<[GenericDSPShort], (instregex "^DPAU_H_QBL$")>; |
| 541 | def : InstRW<[GenericDSPShort], (instregex "^DPAU_H_QBR$")>; |
| 542 | def : InstRW<[GenericDSPShort], (instregex "^DPSQ_SA_L_W$")>; |
| 543 | def : InstRW<[GenericDSPShort], (instregex "^DPSQ_S_W_PH$")>; |
| 544 | def : InstRW<[GenericDSPShort], (instregex "^DPSU_H_QBL$")>; |
| 545 | def : InstRW<[GenericDSPShort], (instregex "^DPSU_H_QBR$")>; |
| 546 | def : InstRW<[GenericDSPShort], (instregex "^EXTPDPV$")>; |
| 547 | def : InstRW<[GenericDSPShort], (instregex "^EXTPDP$")>; |
| 548 | def : InstRW<[GenericDSPShort], (instregex "^EXTPV$")>; |
| 549 | def : InstRW<[GenericDSPShort], (instregex "^EXTP$")>; |
| 550 | def : InstRW<[GenericDSPShort], (instregex "^LBUX$")>; |
| 551 | def : InstRW<[GenericDSPShort], (instregex "^LHX$")>; |
| 552 | def : InstRW<[GenericDSPShort], (instregex "^LWX$")>; |
| 553 | def : InstRW<[GenericDSPShort], (instregex "^MADDU_DSP$")>; |
| 554 | def : InstRW<[GenericDSPShort], (instregex "^MADD_DSP$")>; |
| 555 | def : InstRW<[GenericDSPShort], (instregex "^MAQ_SA_W_PHL$")>; |
| 556 | def : InstRW<[GenericDSPShort], (instregex "^MAQ_SA_W_PHR$")>; |
| 557 | def : InstRW<[GenericDSPShort], (instregex "^MAQ_S_W_PHL$")>; |
| 558 | def : InstRW<[GenericDSPShort], (instregex "^MAQ_S_W_PHR$")>; |
| 559 | def : InstRW<[GenericDSPShort], (instregex "^MFHI_DSP$")>; |
| 560 | def : InstRW<[GenericDSPShort], (instregex "^MFLO_DSP$")>; |
| 561 | def : InstRW<[GenericDSPShort], (instregex "^MODSUB$")>; |
| 562 | def : InstRW<[GenericDSPShort], (instregex "^MSUBU_DSP$")>; |
| 563 | def : InstRW<[GenericDSPShort], (instregex "^MSUB_DSP$")>; |
| 564 | def : InstRW<[GenericDSPShort], (instregex "^MULEQ_S_W_PHL$")>; |
| 565 | def : InstRW<[GenericDSPShort], (instregex "^MULEQ_S_W_PHR$")>; |
| 566 | def : InstRW<[GenericDSPShort], (instregex "^MULEU_S_PH_QBL$")>; |
| 567 | def : InstRW<[GenericDSPShort], (instregex "^MULEU_S_PH_QBR$")>; |
| 568 | def : InstRW<[GenericDSPShort], (instregex "^MULQ_RS_PH$")>; |
| 569 | def : InstRW<[GenericDSPShort], (instregex "^MULSAQ_S_W_PH$")>; |
| 570 | def : InstRW<[GenericDSPShort], (instregex "^MULTU_DSP$")>; |
| 571 | def : InstRW<[GenericDSPShort], (instregex "^MULT_DSP$")>; |
| 572 | def : InstRW<[GenericDSPShort], (instregex "^PACKRL_PH$")>; |
| 573 | def : InstRW<[GenericDSPShort], (instregex "^PICK_PH$")>; |
| 574 | def : InstRW<[GenericDSPShort], (instregex "^PICK_QB$")>; |
| 575 | def : InstRW<[GenericDSPShort], (instregex "^PRECEQU_PH_QBLA$")>; |
| 576 | def : InstRW<[GenericDSPShort], (instregex "^PRECEQU_PH_QBL$")>; |
| 577 | def : InstRW<[GenericDSPShort], (instregex "^PRECEQU_PH_QBRA$")>; |
| 578 | def : InstRW<[GenericDSPShort], (instregex "^PRECEQU_PH_QBR$")>; |
| 579 | def : InstRW<[GenericDSPShort], (instregex "^PRECEQ_W_PHL$")>; |
| 580 | def : InstRW<[GenericDSPShort], (instregex "^PRECEQ_W_PHR$")>; |
| 581 | def : InstRW<[GenericDSPShort], (instregex "^PRECEU_PH_QBLA$")>; |
| 582 | def : InstRW<[GenericDSPShort], (instregex "^PRECEU_PH_QBL$")>; |
| 583 | def : InstRW<[GenericDSPShort], (instregex "^PRECEU_PH_QBRA$")>; |
| 584 | def : InstRW<[GenericDSPShort], (instregex "^PRECEU_PH_QBR$")>; |
| 585 | def : InstRW<[GenericDSPShort], (instregex "^PRECRQU_S_QB_PH$")>; |
| 586 | def : InstRW<[GenericDSPShort], (instregex "^PRECRQ_PH_W$")>; |
| 587 | def : InstRW<[GenericDSPShort], (instregex "^PRECRQ_QB_PH$")>; |
| 588 | def : InstRW<[GenericDSPShort], (instregex "^PRECRQ_RS_PH_W$")>; |
| 589 | def : InstRW<[GenericDSPShort], (instregex "^RADDU_W_QB$")>; |
| 590 | def : InstRW<[GenericDSPShort], (instregex "^RDDSP$")>; |
| 591 | def : InstRW<[GenericDSPShort], (instregex "^REPLV_PH$")>; |
| 592 | def : InstRW<[GenericDSPShort], (instregex "^REPLV_QB$")>; |
| 593 | def : InstRW<[GenericDSPShort], (instregex "^REPL_PH$")>; |
| 594 | def : InstRW<[GenericDSPShort], (instregex "^REPL_QB$")>; |
| 595 | def : InstRW<[GenericDSPShort], (instregex "^SHILOV$")>; |
| 596 | def : InstRW<[GenericDSPShort], (instregex "^SHILO$")>; |
| 597 | def : InstRW<[GenericDSPShort], (instregex "^SHLLV_PH$")>; |
| 598 | def : InstRW<[GenericDSPShort], (instregex "^SHLLV_QB$")>; |
| 599 | def : InstRW<[GenericDSPShort], (instregex "^SHLLV_S_PH$")>; |
| 600 | def : InstRW<[GenericDSPShort], (instregex "^SHLLV_S_W$")>; |
| 601 | def : InstRW<[GenericDSPShort], (instregex "^SHLL_PH$")>; |
| 602 | def : InstRW<[GenericDSPShort], (instregex "^SHLL_QB$")>; |
| 603 | def : InstRW<[GenericDSPShort], (instregex "^SHLL_S_PH$")>; |
| 604 | def : InstRW<[GenericDSPShort], (instregex "^SHLL_S_W$")>; |
| 605 | def : InstRW<[GenericDSPShort], (instregex "^SHRAV_PH$")>; |
| 606 | def : InstRW<[GenericDSPShort], (instregex "^SHRAV_R_PH$")>; |
| 607 | def : InstRW<[GenericDSPShort], (instregex "^SHRAV_R_W$")>; |
| 608 | def : InstRW<[GenericDSPShort], (instregex "^SHRA_PH$")>; |
| 609 | def : InstRW<[GenericDSPShort], (instregex "^SHRA_R_PH$")>; |
| 610 | def : InstRW<[GenericDSPShort], (instregex "^SHRA_R_W$")>; |
| 611 | def : InstRW<[GenericDSPShort], (instregex "^SHRLV_QB$")>; |
| 612 | def : InstRW<[GenericDSPShort], (instregex "^SHRL_QB$")>; |
| 613 | def : InstRW<[GenericDSPShort], (instregex "^SUBQ_PH$")>; |
| 614 | def : InstRW<[GenericDSPShort], (instregex "^SUBQ_S_PH$")>; |
| 615 | def : InstRW<[GenericDSPShort], (instregex "^SUBQ_S_W$")>; |
| 616 | def : InstRW<[GenericDSPShort], (instregex "^SUBU_QB$")>; |
| 617 | def : InstRW<[GenericDSPShort], (instregex "^SUBU_S_QB$")>; |
| 618 | def : InstRW<[GenericDSPShort], (instregex "^WRDSP$")>; |
| 619 | |
| 620 | // MIPS DSP R2 - hasDSP, HasDSPR2, InMicroMips |
| 621 | // =========================================== |
| 622 | |
| 623 | def : InstRW<[GenericDSPShort], (instregex "^ABSQ_S_QB$")>; |
| 624 | def : InstRW<[GenericDSPShort], (instregex "^ADDQH_PH$")>; |
| 625 | def : InstRW<[GenericDSPShort], (instregex "^ADDQH_R_PH$")>; |
| 626 | def : InstRW<[GenericDSPShort], (instregex "^ADDQH_R_W$")>; |
| 627 | def : InstRW<[GenericDSPShort], (instregex "^ADDQH_W$")>; |
| 628 | def : InstRW<[GenericDSPShort], (instregex "^ADDUH_QB$")>; |
| 629 | def : InstRW<[GenericDSPShort], (instregex "^ADDUH_R_QB$")>; |
| 630 | def : InstRW<[GenericDSPShort], (instregex "^ADDU_PH$")>; |
| 631 | def : InstRW<[GenericDSPShort], (instregex "^ADDU_S_PH$")>; |
| 632 | def : InstRW<[GenericDSPShort], (instregex "^APPEND$")>; |
| 633 | def : InstRW<[GenericDSPShort], (instregex "^BALIGN$")>; |
| 634 | def : InstRW<[GenericDSPShort], (instregex "^CMPGDU_EQ_QB$")>; |
| 635 | def : InstRW<[GenericDSPShort], (instregex "^CMPGDU_LE_QB$")>; |
| 636 | def : InstRW<[GenericDSPShort], (instregex "^CMPGDU_LT_QB$")>; |
| 637 | def : InstRW<[GenericDSPShort], (instregex "^DPA_W_PH$")>; |
| 638 | def : InstRW<[GenericDSPShort], (instregex "^DPAQX_SA_W_PH$")>; |
| 639 | def : InstRW<[GenericDSPShort], (instregex "^DPAQX_S_W_PH$")>; |
| 640 | def : InstRW<[GenericDSPShort], (instregex "^DPAX_W_PH$")>; |
| 641 | def : InstRW<[GenericDSPShort], (instregex "^DPS_W_PH$")>; |
| 642 | def : InstRW<[GenericDSPShort], (instregex "^DPSQX_S_W_PH$")>; |
| 643 | def : InstRW<[GenericDSPShort], (instregex "^DPSQX_SA_W_PH$")>; |
| 644 | def : InstRW<[GenericDSPShort], (instregex "^DPSX_W_PH$")>; |
| 645 | def : InstRW<[GenericDSPShort], (instregex "^MUL_PH$")>; |
| 646 | def : InstRW<[GenericDSPShort], (instregex "^MUL_S_PH$")>; |
| 647 | def : InstRW<[GenericDSPShort], (instregex "^MULQ_RS_W$")>; |
| 648 | def : InstRW<[GenericDSPShort], (instregex "^MULQ_S_PH$")>; |
| 649 | def : InstRW<[GenericDSPShort], (instregex "^MULQ_S_W$")>; |
| 650 | def : InstRW<[GenericDSPShort], (instregex "^MULSA_W_PH$")>; |
| 651 | def : InstRW<[GenericDSPShort], (instregex "^PRECR_QB_PH$")>; |
| 652 | def : InstRW<[GenericDSPShort], (instregex "^PRECR_SRA_PH_W$")>; |
| 653 | def : InstRW<[GenericDSPShort], (instregex "^PRECR_SRA_R_PH_W$")>; |
| 654 | def : InstRW<[GenericDSPShort], (instregex "^PREPEND$")>; |
| 655 | def : InstRW<[GenericDSPShort], (instregex "^SHRA_QB$")>; |
| 656 | def : InstRW<[GenericDSPShort], (instregex "^SHRA_R_QB$")>; |
| 657 | def : InstRW<[GenericDSPShort], (instregex "^SHRAV_QB$")>; |
| 658 | def : InstRW<[GenericDSPShort], (instregex "^SHRAV_R_QB$")>; |
| 659 | def : InstRW<[GenericDSPShort], (instregex "^SHRL_PH$")>; |
| 660 | def : InstRW<[GenericDSPShort], (instregex "^SHRLV_PH$")>; |
| 661 | def : InstRW<[GenericDSPShort], (instregex "^SUBQH_PH$")>; |
| 662 | def : InstRW<[GenericDSPShort], (instregex "^SUBQH_R_PH$")>; |
| 663 | def : InstRW<[GenericDSPShort], (instregex "^SUBQH_W$")>; |
| 664 | def : InstRW<[GenericDSPShort], (instregex "^SUBQH_R_W$")>; |
| 665 | def : InstRW<[GenericDSPShort], (instregex "^SUBU_PH$")>; |
| 666 | def : InstRW<[GenericDSPShort], (instregex "^SUBU_S_PH$")>; |
| 667 | def : InstRW<[GenericDSPShort], (instregex "^SUBUH_QB$")>; |
| 668 | def : InstRW<[GenericDSPShort], (instregex "^SUBUH_R_QB$")>; |
| 669 | |
| 670 | // microMIPS DSP R1 - HasDSP, InMicroMips |
| 671 | // ====================================== |
| 672 | |
| 673 | def : InstRW<[GenericDSPShort], (instregex "^ABSQ_S_PH_MM$")>; |
| 674 | def : InstRW<[GenericDSPShort], (instregex "^ABSQ_S_W_MM$")>; |
| 675 | def : InstRW<[GenericDSPShort], (instregex "^ADDQ_PH_MM$")>; |
| 676 | def : InstRW<[GenericDSPShort], (instregex "^ADDQ_S_PH_MM$")>; |
| 677 | def : InstRW<[GenericDSPShort], (instregex "^ADDQ_S_W_MM$")>; |
| 678 | def : InstRW<[GenericDSPShort], (instregex "^ADDSC_MM$")>; |
| 679 | def : InstRW<[GenericDSPShort], (instregex "^ADDU_QB_MM$")>; |
| 680 | def : InstRW<[GenericDSPShort], (instregex "^ADDU_S_QB_MM$")>; |
| 681 | def : InstRW<[GenericDSPShort], (instregex "^ADDWC_MM$")>; |
| 682 | def : InstRW<[GenericDSPShort], (instregex "^BITREV_MM$")>; |
| 683 | def : InstRW<[GenericDSPShort], (instregex "^BPOSGE32_MM$")>; |
| 684 | def : InstRW<[GenericDSPShort], (instregex "^CMPGU_EQ_QB_MM$")>; |
| 685 | def : InstRW<[GenericDSPShort], (instregex "^CMPGU_LE_QB_MM$")>; |
| 686 | def : InstRW<[GenericDSPShort], (instregex "^CMPGU_LT_QB_MM$")>; |
| 687 | def : InstRW<[GenericDSPShort], (instregex "^CMPU_EQ_QB_MM$")>; |
| 688 | def : InstRW<[GenericDSPShort], (instregex "^CMPU_LE_QB_MM$")>; |
| 689 | def : InstRW<[GenericDSPShort], (instregex "^CMPU_LT_QB_MM$")>; |
| 690 | def : InstRW<[GenericDSPShort], (instregex "^CMP_EQ_PH_MM$")>; |
| 691 | def : InstRW<[GenericDSPShort], (instregex "^CMP_LE_PH_MM$")>; |
| 692 | def : InstRW<[GenericDSPShort], (instregex "^CMP_LT_PH_MM$")>; |
| 693 | def : InstRW<[GenericDSPShort], (instregex "^DPAQ_SA_L_W_MM$")>; |
| 694 | def : InstRW<[GenericDSPShort], (instregex "^DPAQ_S_W_PH_MM$")>; |
| 695 | def : InstRW<[GenericDSPShort], (instregex "^DPAU_H_QBL_MM$")>; |
| 696 | def : InstRW<[GenericDSPShort], (instregex "^DPAU_H_QBR_MM$")>; |
| 697 | def : InstRW<[GenericDSPShort], (instregex "^DPSQ_SA_L_W_MM$")>; |
| 698 | def : InstRW<[GenericDSPShort], (instregex "^DPSQ_S_W_PH_MM$")>; |
| 699 | def : InstRW<[GenericDSPShort], (instregex "^DPSU_H_QBL_MM$")>; |
| 700 | def : InstRW<[GenericDSPShort], (instregex "^DPSU_H_QBR_MM$")>; |
| 701 | def : InstRW<[GenericDSPShort], (instregex "^EXTPDPV_MM$")>; |
| 702 | def : InstRW<[GenericDSPShort], (instregex "^EXTPDP_MM$")>; |
| 703 | def : InstRW<[GenericDSPShort], (instregex "^EXTPV_MM$")>; |
| 704 | def : InstRW<[GenericDSPShort], (instregex "^EXTP_MM$")>; |
| 705 | def : InstRW<[GenericDSPShort], (instregex "^EXTRV_RS_W_MM$")>; |
| 706 | def : InstRW<[GenericDSPShort], (instregex "^EXTRV_R_W_MM$")>; |
| 707 | def : InstRW<[GenericDSPShort], (instregex "^EXTRV_S_H_MM$")>; |
| 708 | def : InstRW<[GenericDSPShort], (instregex "^EXTRV_W_MM$")>; |
| 709 | def : InstRW<[GenericDSPShort], (instregex "^EXTR_RS_W_MM$")>; |
| 710 | def : InstRW<[GenericDSPShort], (instregex "^EXTR_R_W_MM$")>; |
| 711 | def : InstRW<[GenericDSPShort], (instregex "^EXTR_S_H_MM$")>; |
| 712 | def : InstRW<[GenericDSPShort], (instregex "^EXTR_W_MM$")>; |
| 713 | def : InstRW<[GenericDSPShort], (instregex "^INSV_MM$")>; |
| 714 | def : InstRW<[GenericDSPShort], (instregex "^LBUX_MM$")>; |
| 715 | def : InstRW<[GenericDSPShort], (instregex "^LHX_MM$")>; |
| 716 | def : InstRW<[GenericDSPShort], (instregex "^LWX_MM$")>; |
| 717 | def : InstRW<[GenericDSPShort], (instregex "^MADDU_DSP_MM$")>; |
| 718 | def : InstRW<[GenericDSPShort], (instregex "^MADD_DSP_MM$")>; |
| 719 | def : InstRW<[GenericDSPShort], (instregex "^MAQ_SA_W_PHL_MM$")>; |
| 720 | def : InstRW<[GenericDSPShort], (instregex "^MAQ_SA_W_PHR_MM$")>; |
| 721 | def : InstRW<[GenericDSPShort], (instregex "^MAQ_S_W_PHL_MM$")>; |
| 722 | def : InstRW<[GenericDSPShort], (instregex "^MAQ_S_W_PHR_MM$")>; |
| 723 | def : InstRW<[GenericDSPShort], (instregex "^MFHI_DSP_MM$")>; |
| 724 | def : InstRW<[GenericDSPShort], (instregex "^MFLO_DSP_MM$")>; |
| 725 | def : InstRW<[GenericDSPShort], (instregex "^MODSUB_MM$")>; |
| 726 | def : InstRW<[GenericDSPShort], (instregex "^MOVEP_MM$")>; |
| 727 | def : InstRW<[GenericDSPShort], (instregex "^MOVN_I_MM$")>; |
| 728 | def : InstRW<[GenericDSPShort], (instregex "^MOVZ_I_MM$")>; |
| 729 | def : InstRW<[GenericDSPShort], (instregex "^MSUBU_DSP_MM$")>; |
| 730 | def : InstRW<[GenericDSPShort], (instregex "^MSUB_DSP_MM$")>; |
| 731 | def : InstRW<[GenericDSPShort], (instregex "^MTHI_DSP_MM$")>; |
| 732 | def : InstRW<[GenericDSPShort], (instregex "^MTHLIP_MM$")>; |
| 733 | def : InstRW<[GenericDSPShort], (instregex "^MTLO_DSP_MM$")>; |
| 734 | def : InstRW<[GenericDSPShort], (instregex "^MULEQ_S_W_PHL_MM$")>; |
| 735 | def : InstRW<[GenericDSPShort], (instregex "^MULEQ_S_W_PHR_MM$")>; |
| 736 | def : InstRW<[GenericDSPShort], (instregex "^MULEU_S_PH_QBL_MM$")>; |
| 737 | def : InstRW<[GenericDSPShort], (instregex "^MULEU_S_PH_QBR_MM$")>; |
| 738 | def : InstRW<[GenericDSPShort], (instregex "^MULQ_RS_PH_MM$")>; |
| 739 | def : InstRW<[GenericDSPShort], (instregex "^MULSAQ_S_W_PH_MM$")>; |
| 740 | def : InstRW<[GenericDSPShort], (instregex "^MULTU_DSP_MM$")>; |
| 741 | def : InstRW<[GenericDSPShort], (instregex "^MULT_DSP_MM$")>; |
| 742 | def : InstRW<[GenericDSPShort], (instregex "^PACKRL_PH_MM$")>; |
| 743 | def : InstRW<[GenericDSPShort], (instregex "^PICK_PH_MM$")>; |
| 744 | def : InstRW<[GenericDSPShort], (instregex "^PICK_QB_MM$")>; |
| 745 | def : InstRW<[GenericDSPShort], (instregex "^PRECEQU_PH_QBLA_MM$")>; |
| 746 | def : InstRW<[GenericDSPShort], (instregex "^PRECEQU_PH_QBL_MM$")>; |
| 747 | def : InstRW<[GenericDSPShort], (instregex "^PRECEQU_PH_QBRA_MM$")>; |
| 748 | def : InstRW<[GenericDSPShort], (instregex "^PRECEQU_PH_QBR_MM$")>; |
| 749 | def : InstRW<[GenericDSPShort], (instregex "^PRECEQ_W_PHL_MM$")>; |
| 750 | def : InstRW<[GenericDSPShort], (instregex "^PRECEQ_W_PHR_MM$")>; |
| 751 | def : InstRW<[GenericDSPShort], (instregex "^PRECEU_PH_QBLA_MM$")>; |
| 752 | def : InstRW<[GenericDSPShort], (instregex "^PRECEU_PH_QBL_MM$")>; |
| 753 | def : InstRW<[GenericDSPShort], (instregex "^PRECEU_PH_QBRA_MM$")>; |
| 754 | def : InstRW<[GenericDSPShort], (instregex "^PRECEU_PH_QBR_MM$")>; |
| 755 | def : InstRW<[GenericDSPShort], (instregex "^PRECRQU_S_QB_PH_MM$")>; |
| 756 | def : InstRW<[GenericDSPShort], (instregex "^PRECRQ_PH_W_MM$")>; |
| 757 | def : InstRW<[GenericDSPShort], (instregex "^PRECRQ_QB_PH_MM$")>; |
| 758 | def : InstRW<[GenericDSPShort], (instregex "^PRECRQ_RS_PH_W_MM$")>; |
| 759 | def : InstRW<[GenericDSPShort], (instregex "^RADDU_W_QB_MM$")>; |
| 760 | def : InstRW<[GenericDSPShort], (instregex "^RDDSP_MM$")>; |
| 761 | def : InstRW<[GenericDSPShort], (instregex "^REPLV_PH_MM$")>; |
| 762 | def : InstRW<[GenericDSPShort], (instregex "^REPLV_QB_MM$")>; |
| 763 | def : InstRW<[GenericDSPShort], (instregex "^REPL_PH_MM$")>; |
| 764 | def : InstRW<[GenericDSPShort], (instregex "^REPL_QB_MM$")>; |
| 765 | def : InstRW<[GenericDSPShort], (instregex "^SHILOV_MM$")>; |
| 766 | def : InstRW<[GenericDSPShort], (instregex "^SHILO_MM$")>; |
| 767 | def : InstRW<[GenericDSPShort], (instregex "^SHLLV_PH_MM$")>; |
| 768 | def : InstRW<[GenericDSPShort], (instregex "^SHLLV_QB_MM$")>; |
| 769 | def : InstRW<[GenericDSPShort], (instregex "^SHLLV_S_PH_MM$")>; |
| 770 | def : InstRW<[GenericDSPShort], (instregex "^SHLLV_S_W_MM$")>; |
| 771 | def : InstRW<[GenericDSPShort], (instregex "^SHLL_PH_MM$")>; |
| 772 | def : InstRW<[GenericDSPShort], (instregex "^SHLL_QB_MM$")>; |
| 773 | def : InstRW<[GenericDSPShort], (instregex "^SHLL_S_PH_MM$")>; |
| 774 | def : InstRW<[GenericDSPShort], (instregex "^SHLL_S_W_MM$")>; |
| 775 | def : InstRW<[GenericDSPShort], (instregex "^SHRAV_PH_MM$")>; |
| 776 | def : InstRW<[GenericDSPShort], (instregex "^SHRAV_R_PH_MM$")>; |
| 777 | def : InstRW<[GenericDSPShort], (instregex "^SHRAV_R_W_MM$")>; |
| 778 | def : InstRW<[GenericDSPShort], (instregex "^SHRA_PH_MM$")>; |
| 779 | def : InstRW<[GenericDSPShort], (instregex "^SHRA_R_PH_MM$")>; |
| 780 | def : InstRW<[GenericDSPShort], (instregex "^SHRA_R_W_MM$")>; |
| 781 | def : InstRW<[GenericDSPShort], (instregex "^SHRLV_QB_MM$")>; |
| 782 | def : InstRW<[GenericDSPShort], (instregex "^SHRL_QB_MM$")>; |
| 783 | def : InstRW<[GenericDSPShort], (instregex "^SUBQ_PH_MM$")>; |
| 784 | def : InstRW<[GenericDSPShort], (instregex "^SUBQ_S_PH_MM$")>; |
| 785 | def : InstRW<[GenericDSPShort], (instregex "^SUBQ_S_W_MM$")>; |
| 786 | def : InstRW<[GenericDSPShort], (instregex "^SUBU_QB_MM$")>; |
| 787 | def : InstRW<[GenericDSPShort], (instregex "^SUBU_S_QB_MM$")>; |
| 788 | def : InstRW<[GenericDSPShort], (instregex "^WRDSP_MM$")>; |
| 789 | |
| 790 | |
| 791 | // microMIPS DSP R2 - hasDSP, HasDSPR2, InMicroMips |
| 792 | // ================================================ |
| 793 | |
| 794 | def : InstRW<[GenericDSPShort], (instregex "^ABSQ_S_QB_MMR2$")>; |
| 795 | def : InstRW<[GenericDSPShort], (instregex "^ADDQH_PH_MMR2$")>; |
| 796 | def : InstRW<[GenericDSPShort], (instregex "^ADDQH_R_PH_MMR2$")>; |
| 797 | def : InstRW<[GenericDSPShort], (instregex "^ADDQH_R_W_MMR2$")>; |
| 798 | def : InstRW<[GenericDSPShort], (instregex "^ADDQH_W_MMR2$")>; |
| 799 | def : InstRW<[GenericDSPShort], (instregex "^ADDUH_QB_MMR2$")>; |
| 800 | def : InstRW<[GenericDSPShort], (instregex "^ADDUH_R_QB_MMR2$")>; |
| 801 | def : InstRW<[GenericDSPShort], (instregex "^ADDU_PH_MMR2$")>; |
| 802 | def : InstRW<[GenericDSPShort], (instregex "^ADDU_S_PH_MMR2$")>; |
| 803 | def : InstRW<[GenericDSPShort], (instregex "^APPEND_MMR2$")>; |
| 804 | def : InstRW<[GenericDSPShort], (instregex "^BALIGN_MMR2$")>; |
| 805 | def : InstRW<[GenericDSPShort], (instregex "^CMPGDU_EQ_QB_MMR2$")>; |
| 806 | def : InstRW<[GenericDSPShort], (instregex "^CMPGDU_LE_QB_MMR2$")>; |
| 807 | def : InstRW<[GenericDSPShort], (instregex "^CMPGDU_LT_QB_MMR2$")>; |
| 808 | def : InstRW<[GenericDSPShort], (instregex "^DPA_W_PH_MMR2$")>; |
| 809 | def : InstRW<[GenericDSPShort], (instregex "^DPAQX_SA_W_PH_MMR2$")>; |
| 810 | def : InstRW<[GenericDSPShort], (instregex "^DPAQX_S_W_PH_MMR2$")>; |
| 811 | def : InstRW<[GenericDSPShort], (instregex "^DPAX_W_PH_MMR2$")>; |
| 812 | def : InstRW<[GenericDSPShort], (instregex "^DPS_W_PH_MMR2$")>; |
| 813 | def : InstRW<[GenericDSPShort], (instregex "^DPSQX_S_W_PH_MMR2$")>; |
| 814 | def : InstRW<[GenericDSPShort], (instregex "^DPSQX_SA_W_PH_MMR2$")>; |
| 815 | def : InstRW<[GenericDSPShort], (instregex "^DPSX_W_PH_MMR2$")>; |
| 816 | def : InstRW<[GenericDSPShort], (instregex "^MUL_PH_MMR2$")>; |
| 817 | def : InstRW<[GenericDSPShort], (instregex "^MUL_S_PH_MMR2$")>; |
| 818 | def : InstRW<[GenericDSPShort], (instregex "^MULQ_RS_W_MMR2$")>; |
| 819 | def : InstRW<[GenericDSPShort], (instregex "^MULQ_S_PH_MMR2$")>; |
| 820 | def : InstRW<[GenericDSPShort], (instregex "^MULQ_S_W_MMR2$")>; |
| 821 | def : InstRW<[GenericDSPShort], (instregex "^MULSA_W_PH_MMR2$")>; |
| 822 | def : InstRW<[GenericDSPShort], (instregex "^PRECR_QB_PH_MMR2$")>; |
| 823 | def : InstRW<[GenericDSPShort], (instregex "^PRECR_SRA_PH_W_MMR2$")>; |
| 824 | def : InstRW<[GenericDSPShort], (instregex "^PRECR_SRA_R_PH_W_MMR2$")>; |
| 825 | def : InstRW<[GenericDSPShort], (instregex "^PREPEND_MMR2$")>; |
| 826 | def : InstRW<[GenericDSPShort], (instregex "^SHRA_QB_MMR2$")>; |
| 827 | def : InstRW<[GenericDSPShort], (instregex "^SHRA_R_QB_MMR2$")>; |
| 828 | def : InstRW<[GenericDSPShort], (instregex "^SHRAV_QB_MMR2$")>; |
| 829 | def : InstRW<[GenericDSPShort], (instregex "^SHRAV_R_QB_MMR2$")>; |
| 830 | def : InstRW<[GenericDSPShort], (instregex "^SHRL_PH_MMR2$")>; |
| 831 | def : InstRW<[GenericDSPShort], (instregex "^SHRLV_PH_MMR2$")>; |
| 832 | def : InstRW<[GenericDSPShort], (instregex "^SUBQH_PH_MMR2$")>; |
| 833 | def : InstRW<[GenericDSPShort], (instregex "^SUBQH_R_PH_MMR2$")>; |
| 834 | def : InstRW<[GenericDSPShort], (instregex "^SUBQH_W_MMR2$")>; |
| 835 | def : InstRW<[GenericDSPShort], (instregex "^SUBQH_R_W_MMR2$")>; |
| 836 | def : InstRW<[GenericDSPShort], (instregex "^SUBU_PH_MMR2$")>; |
| 837 | def : InstRW<[GenericDSPShort], (instregex "^SUBU_S_PH_MMR2$")>; |
| 838 | def : InstRW<[GenericDSPShort], (instregex "^SUBUH_QB_MMR2$")>; |
| 839 | def : InstRW<[GenericDSPShort], (instregex "^SUBUH_R_QB_MMR2$")>; |
| 840 | |
| 841 | // microMIPS DSP R3 - hasDSP, hasDSPR2, hasDSPR3, InMicroMips |
| 842 | // ========================================================== |
| 843 | |
| 844 | def : InstRW<[GenericDSPShort], (instregex "^BPOSGE32C_MMR3$")>; |
| 845 | |
| 846 | // MIPS MSA ASE - hasMSA |
| 847 | // ===================== |
| 848 | |
| 849 | def GenericWriteMSAShortLogic : SchedWriteRes<[GenericIssueFPUS]>; |
| 850 | def GenericWriteMSAShortInt : SchedWriteRes<[GenericIssueFPUS]> { |
| 851 | let Latency = 2; |
| 852 | } |
| 853 | def GenericWriteMoveOtherUnitsToFPU : SchedWriteRes<[GenericIssueFPUS]>; |
| 854 | def GenericWriteMSAOther3 : SchedWriteRes<[GenericIssueFPUS]> { |
| 855 | let Latency = 3; |
| 856 | } |
| 857 | def GenericWriteMSALongInt : SchedWriteRes<[GenericIssueFPUS]> { |
| 858 | let Latency = 5; |
| 859 | } |
| 860 | def GenericWriteFPUDivI : SchedWriteRes<[GenericFPQ]> { |
| 861 | let Latency = 33; |
| 862 | let ResourceCycles = [ 33 ]; |
| 863 | } |
| 864 | |
| 865 | // FPUS is also used in moves from floating point and MSA registers to general |
| 866 | // purpose registers. |
| 867 | def GenericWriteMoveFPUSToOtherUnits : SchedWriteRes<[GenericIssueFPUS]> { |
| 868 | let Latency = 0; |
| 869 | } |
| 870 | |
| 871 | // FPUL is also used in moves from floating point and MSA registers to general |
| 872 | // purpose registers. |
| 873 | def GenericWriteMoveFPULToOtherUnits : SchedWriteRes<[GenericIssueFPUL]>; |
| 874 | |
| 875 | |
| 876 | // adds_a.[bhwd], adds_[asu].[bhwd], addvi?.[bhwd], asub_[us].[bhwd], |
| 877 | // aver?_[us].[bhwd] |
| 878 | def : InstRW<[GenericWriteMSAShortInt], (instregex "^ADD_A_[BHWD]$")>; |
| 879 | def : InstRW<[GenericWriteMSAShortInt], (instregex "^ADDS_[ASU]_[BHWD]$")>; |
| 880 | |
| 881 | // TODO: ADDVI_[BHW] might be 1 cycle latency rather than 2. Need to confirm it. |
| 882 | // add.[bhwd], addvi.[bhwd], asub_[us].[bhwd], ave.[bhwd], aver.[bhwd] |
| 883 | def : InstRW<[GenericWriteMSAShortInt], (instregex "^ADDVI?_[BHWD]$")>; |
| 884 | def : InstRW<[GenericWriteMSAShortInt], (instregex "^ASUB_[US].[BHWD]$")>; |
| 885 | def : InstRW<[GenericWriteMSAShortInt], (instregex "^AVER?_[US].[BHWD]$")>; |
| 886 | |
| 887 | // and.v, andi.b, move.v, ldi.[bhwd], xor.v, nor.v, xori.b, nori.b |
| 888 | def : InstRW<[GenericWriteMSAShortLogic], (instregex "^MOVE_V$")>; |
| 889 | def : InstRW<[GenericWriteMSAShortLogic], (instregex "^LDI_[BHWD]$")>; |
| 890 | def : InstRW<[GenericWriteMSAShortLogic], (instregex "^(AND|OR|[XN]OR)_V$")>; |
| 891 | def : InstRW<[GenericWriteMSAShortLogic], (instregex "^(AND|OR|[XN]OR)I_B$")>; |
| 892 | def : InstRW<[GenericWriteMSAShortLogic], (instregex "^(AND|OR|[XN]OR)I_B$")>; |
| 893 | |
| 894 | // vshf.[bhwd], binsl.[bhwd], binsr.[bhwd], insert.[bhwd], sld?.[bhwd], |
| 895 | // bset.[bhwd], bclr.[bhwd], bneg.[bhwd], bsel_v, bseli_b |
| 896 | def : InstRW<[GenericWriteMSAShortInt], (instregex "^VSHF_[BHWD]$")>; |
| 897 | def : InstRW<[GenericWriteMSAShortInt], (instregex "^(BINSL|BINSLI)_[BHWD]$")>; |
| 898 | def : InstRW<[GenericWriteMSAShortInt], (instregex "^(BINSR|BINSRI)_[BHWD]$")>; |
| 899 | def : InstRW<[GenericWriteMSAShortInt], (instregex "^INSERT_[BHWD]$")>; |
| 900 | def : InstRW<[GenericWriteMSAShortInt], (instregex "^(SLD|SLDI)_[BHWD]$")>; |
| 901 | def : InstRW<[GenericWriteMSAShortInt], (instregex "^(BSET|BSETI)_[BHWD]$")>; |
| 902 | def : InstRW<[GenericWriteMSAShortInt], (instregex "^(BCLR|BCLRI)_[BHWD]$")>; |
| 903 | def : InstRW<[GenericWriteMSAShortInt], (instregex "^(BNEG|BNEGI)_[BHWD]$")>; |
| 904 | def : InstRW<[GenericWriteMSAShortInt], (instregex "^(BSEL_V|BSELI_B)$")>; |
| 905 | def : InstRW<[GenericWriteMSAShortInt], (instregex "^BMN*Z.*$")>; |
| 906 | |
| 907 | // pcnt.[bhwd], sat_s.[bhwd], sat_u.bhwd] |
| 908 | def : InstRW<[GenericWriteMSAOther3], (instregex "^PCNT_[BHWD]$")>; |
| 909 | def : InstRW<[GenericWriteMSAOther3], (instregex "^SAT_(S|U)_[BHWD]$")>; |
| 910 | |
| 911 | // bnz.[bhwdv], cfcmsa, ctcmsa |
| 912 | def : InstRW<[GenericWriteMSAShortLogic], (instregex "^(BNZ|BZ)_[BHWDV]$")>; |
| 913 | def : InstRW<[GenericWriteMSAShortLogic], (instregex "^C(F|T)CMSA$")>; |
| 914 | |
| 915 | // shf.[bhw], fill[bhwd], splat?.[bhwd] |
| 916 | def : InstRW<[GenericWriteMSAShortInt], (instregex "^SHF_[BHW]$")>; |
| 917 | def : InstRW<[GenericWriteMSAShortInt], (instregex "^FILL_[BHWD]$")>; |
| 918 | def : InstRW<[GenericWriteMSAShortInt], (instregex "^(SPLAT|SPLATI)_[BHWD]$")>; |
| 919 | |
| 920 | // pcnt.[bhwd], sat_s.[bhwd], sat_u.bhwd] |
| 921 | def : InstRW<[GenericWriteMSAOther3], (instregex "^PCNT_[BHWD]$")>; |
| 922 | def : InstRW<[GenericWriteMSAOther3], (instregex "^SAT_(S|U)_[BHWD]$")>; |
| 923 | |
| 924 | // fexp2_w, fexp2_d |
| 925 | def : InstRW<[GenericWriteFPUS], (instregex "^FEXP2_(W|D)$")>; |
| 926 | |
| 927 | // compare, converts, round to int, floating point truncate. |
| 928 | def : InstRW<[GenericWriteFPUS], (instregex "^(CLT|CLTI)_(S|U)_[BHWD]$")>; |
| 929 | def : InstRW<[GenericWriteFPUS], (instregex "^(CLE|CLEI)_(S|U)_[BHWD]$")>; |
| 930 | def : InstRW<[GenericWriteFPUS], (instregex "^(CEQ|CEQI)_[BHWD]$")>; |
| 931 | def : InstRW<[GenericWriteFPUS], (instregex "^CMP_UN_(S|D)$")>; |
| 932 | def : InstRW<[GenericWriteFPUS], (instregex "^CMP_UEQ_(S|D)$")>; |
| 933 | def : InstRW<[GenericWriteFPUS], (instregex "^CMP_EQ_(S|D)$")>; |
| 934 | def : InstRW<[GenericWriteFPUS], (instregex "^CMP_LT_(S|D)$")>; |
| 935 | def : InstRW<[GenericWriteFPUS], (instregex "^CMP_ULT_(S|D)$")>; |
| 936 | def : InstRW<[GenericWriteFPUS], (instregex "^CMP_LE_(S|D)$")>; |
| 937 | def : InstRW<[GenericWriteFPUS], (instregex "^CMP_ULE_(S|D)$")>; |
| 938 | def : InstRW<[GenericWriteFPUS], (instregex "^FS(AF|EQ|LT|LE|NE|OR)_(W|D)$")>; |
| 939 | def : InstRW<[GenericWriteFPUS], (instregex "^FSUEQ_(W|D)$")>; |
| 940 | def : InstRW<[GenericWriteFPUS], (instregex "^FSULE_(W|D)$")>; |
| 941 | def : InstRW<[GenericWriteFPUS], (instregex "^FSULT_(W|D)$")>; |
| 942 | def : InstRW<[GenericWriteFPUS], (instregex "^FSUNE_(W|D)$")>; |
| 943 | def : InstRW<[GenericWriteFPUS], (instregex "^FSUN_(W|D)$")>; |
| 944 | def : InstRW<[GenericWriteFPUS], (instregex "^FCAF_(W|D)$")>; |
| 945 | def : InstRW<[GenericWriteFPUS], (instregex "^FCEQ_(W|D)$")>; |
| 946 | def : InstRW<[GenericWriteFPUS], (instregex "^FCLE_(W|D)$")>; |
| 947 | def : InstRW<[GenericWriteFPUS], (instregex "^FCLT_(W|D)$")>; |
| 948 | def : InstRW<[GenericWriteFPUS], (instregex "^FCNE_(W|D)$")>; |
| 949 | def : InstRW<[GenericWriteFPUS], (instregex "^FCOR_(W|D)$")>; |
| 950 | def : InstRW<[GenericWriteFPUS], (instregex "^FCUEQ_(W|D)$")>; |
| 951 | def : InstRW<[GenericWriteFPUS], (instregex "^FCULE_(W|D)$")>; |
| 952 | def : InstRW<[GenericWriteFPUS], (instregex "^FCULT_(W|D)$")>; |
| 953 | def : InstRW<[GenericWriteFPUS], (instregex "^FCUNE_(W|D)$")>; |
| 954 | def : InstRW<[GenericWriteFPUS], (instregex "^FCUN_(W|D)$")>; |
| 955 | def : InstRW<[GenericWriteFPUS], (instregex "^FABS_(W|D)$")>; |
| 956 | def : InstRW<[GenericWriteFPUS], (instregex "^FFINT_(U|S)_(W|D)$")>; |
| 957 | def : InstRW<[GenericWriteFPUS], (instregex "^FFQL_(W|D)$")>; |
| 958 | def : InstRW<[GenericWriteFPUS], (instregex "^FFQR_(W|D)$")>; |
| 959 | def : InstRW<[GenericWriteFPUS], (instregex "^FTINT_(U|S)_(W|D)$")>; |
| 960 | def : InstRW<[GenericWriteFPUS], (instregex "^FRINT_(W|D)$")>; |
| 961 | def : InstRW<[GenericWriteFPUS], (instregex "^FTQ_(H|W)$")>; |
| 962 | def : InstRW<[GenericWriteFPUS], (instregex "^FTRUNC_(U|S)_(W|D)$")>; |
| 963 | |
| 964 | // fexdo.[hw], fexupl.[wd], fexupr.[wd] |
| 965 | def : InstRW<[GenericWriteFPUS], (instregex "^FEXDO_(H|W)$")>; |
| 966 | def : InstRW<[GenericWriteFPUS], (instregex "^FEXUPL_(W|D)$")>; |
| 967 | def : InstRW<[GenericWriteFPUS], (instregex "^FEXUPR_(W|D)$")>; |
| 968 | |
| 969 | // fclass.[wd], fmax.[wd], fmax_a.[wd], fmin.[wd], fmin_a.[wd], flog2.[wd] |
| 970 | def : InstRW<[GenericWriteFPUS], (instregex "^FCLASS_(W|D)$")>; |
| 971 | def : InstRW<[GenericWriteFPUS], (instregex "^FMAX_A_(W|D)$")>; |
| 972 | def : InstRW<[GenericWriteFPUS], (instregex "^FMAX_(W|D)$")>; |
| 973 | def : InstRW<[GenericWriteFPUS], (instregex "^FMIN_A_(W|D)$")>; |
| 974 | def : InstRW<[GenericWriteFPUS], (instregex "^FMIN_(W|D)$")>; |
| 975 | def : InstRW<[GenericWriteFPUS], (instregex "^FLOG2_(W|D)$")>; |
| 976 | |
| 977 | // interleave right/left, interleave even/odd, insert |
| 978 | def : InstRW<[GenericWriteMSAShortLogic], (instregex "^(ILVR|ILVL)_[BHWD]$")>; |
| 979 | def : InstRW<[GenericWriteMSAShortLogic], (instregex "^(ILVEV|ILVOD)_[BHWD]$")>; |
| 980 | def : InstRW<[GenericWriteMSAShortLogic], (instregex "^INSVE_[BHWD]$")>; |
| 981 | |
| 982 | // subs_?.[bhwd], subsus_?.[bhwd], subsuu_?.[bhwd], subvi.[bhwd], subv.[bhwd], |
| 983 | def : InstRW<[GenericWriteMSAShortInt], (instregex "^SUBS_(S|U)_[BHWD]$")>; |
| 984 | def : InstRW<[GenericWriteMSAShortInt], (instregex "^SUBSUS_(S|U)_[BHWD]$")>; |
| 985 | def : InstRW<[GenericWriteMSAShortInt], (instregex "^SUBSUU_(S|U)_[BHWD]$")>; |
| 986 | def : InstRW<[GenericWriteMSAShortInt], (instregex "^SUBVI_[BHWD]$")>; |
| 987 | def : InstRW<[GenericWriteMSAShortInt], (instregex "^SUBV_[BHWD]$")>; |
| 988 | |
| 989 | // mod_[su].[bhwd], div_[su].[bhwd] |
| 990 | def : InstRW<[GenericWriteFPUDivI], (instregex "^MOD_(S|U)_[BHWD]$")>; |
| 991 | def : InstRW<[GenericWriteFPUDivI], (instregex "^DIV_(S|U)_[BHWD]$")>; |
| 992 | |
| 993 | // hadd_[su].[bhwd], hsub_[su].[bhwd], max_[sua].[bhwd], min_[sua].[bhwd], |
| 994 | // maxi_[su].[bhwd], mini_[su].[bhwd], sra?.[bhwd], srar?.[bhwd], srlr.[bhwd], |
| 995 | // sll?.[bhwd], pckev.[bhwd], pckod.[bhwd], nloc.[bhwd], nlzc.[bhwd], |
| 996 | // insve.[bhwd] |
| 997 | def : InstRW<[GenericWriteMSAShortLogic], (instregex "^HADD_(S|U)_[BHWD]$")>; |
| 998 | def : InstRW<[GenericWriteMSAShortLogic], (instregex "^HSUB_(S|U)_[BHWD]$")>; |
| 999 | def : InstRW<[GenericWriteMSAShortLogic], (instregex "^(MAX|MIN)_S_[BHWD]$")>; |
| 1000 | def : InstRW<[GenericWriteMSAShortLogic], (instregex "^(MAX|MIN)_U_[BHWD]$")>; |
| 1001 | def : InstRW<[GenericWriteMSAShortLogic], (instregex "^(MAX|MIN)_A_[BHWD]$")>; |
| 1002 | def : InstRW<[GenericWriteMSAShortLogic], |
| 1003 | (instregex "^(MAXI|MINI)_(S|U)_[BHWD]$")>; |
| 1004 | def : InstRW<[GenericWriteMSAShortLogic], (instregex "^(SRA|SRAI)_[BHWD]$")>; |
| 1005 | def : InstRW<[GenericWriteMSAShortLogic], (instregex "^(SRL|SRLI)_[BHWD]$")>; |
| 1006 | def : InstRW<[GenericWriteMSAShortLogic], (instregex "^(SRAR|SRARI)_[BHWD]$")>; |
| 1007 | def : InstRW<[GenericWriteMSAShortLogic], (instregex "^(SRLR|SRLRI)_[BHWD]$")>; |
| 1008 | def : InstRW<[GenericWriteMSAShortLogic], (instregex "^(SLL|SLLI)_[BHWD]$")>; |
| 1009 | def : InstRW<[GenericWriteMSAShortLogic], (instregex "^(PCKEV|PCKOD)_[BHWD]$")>; |
| 1010 | def : InstRW<[GenericWriteMSAShortLogic], (instregex "^(NLOC|NLZC)_[BHWD]$")>; |
| 1011 | def : InstRW<[GenericWriteMSAShortLogic], (instregex "^INSVE_[BHWD]$")>; |
| 1012 | |
| 1013 | // dpadd_?.[bhwd], dpsub_?.[bhwd], dotp_?.[bhwd], msubv.[bhwd], maddv.[bhwd] |
| 1014 | // mulv.[bhwd]. |
| 1015 | def : InstRW<[GenericWriteMSALongInt], (instregex "^DPADD_(S|U)_[HWD]$")>; |
| 1016 | def : InstRW<[GenericWriteMSALongInt], (instregex "^DPSUB_(S|U)_[HWD]$")>; |
| 1017 | def : InstRW<[GenericWriteMSALongInt], (instregex "^DOTP_(S|U)_[HWD]$")>; |
| 1018 | def : InstRW<[GenericWriteMSALongInt], (instregex "^MSUBV_[BHWD]$")>; |
| 1019 | def : InstRW<[GenericWriteMSALongInt], (instregex "^MADDV_[BHWD]$")>; |
| 1020 | def : InstRW<[GenericWriteMSALongInt], (instregex "^MULV_[BHWD]$")>; |
| 1021 | |
| 1022 | // madd?.q.[hw], msub?.q.[hw], mul?.q.[hw] |
| 1023 | def : InstRW<[GenericWriteMSALongInt], (instregex "^MADDR_Q_[HW]$")>; |
| 1024 | def : InstRW<[GenericWriteMSALongInt], (instregex "^MADD_Q_[HW]$")>; |
| 1025 | def : InstRW<[GenericWriteMSALongInt], (instregex "^MSUBR_Q_[HW]$")>; |
| 1026 | def : InstRW<[GenericWriteMSALongInt], (instregex "^MSUB_Q_[HW]$")>; |
| 1027 | def : InstRW<[GenericWriteMSALongInt], (instregex "^MULR_Q_[HW]$")>; |
| 1028 | def : InstRW<[GenericWriteMSALongInt], (instregex "^MUL_Q_[HW]$")>; |
| 1029 | |
| 1030 | // fadd.[dw], fmadd.[dw], fmul.[dw], frcp.[dw], frsqrt.[dw], fsqrt.[dw] |
| 1031 | // fsub.[dw], fdiv.[dw] |
| 1032 | def : InstRW<[GenericWriteFPUL], (instregex "^FADD_[DW]$")>; |
| 1033 | def : InstRW<[GenericWriteFPUL], (instregex "^FMADD_[DW]$")>; |
| 1034 | def : InstRW<[GenericWriteFPUL], (instregex "^FMSUB_[DW]$")>; |
| 1035 | def : InstRW<[GenericWriteFPUL], (instregex "^FMUL_[DW]$")>; |
| 1036 | def : InstRW<[GenericWriteFPUL], (instregex "^FRCP_[DW]$")>; |
| 1037 | def : InstRW<[GenericWriteFPUL], (instregex "^FRSQRT_[DW]$")>; |
| 1038 | def : InstRW<[GenericWriteFPUL], (instregex "^FSQRT_[DW]$")>; |
| 1039 | def : InstRW<[GenericWriteFPUL], (instregex "^FSUB_[DW]$")>; |
| 1040 | def : InstRW<[GenericWriteFPUL], (instregex "^FDIV_[DW]$")>; |
| 1041 | |
| 1042 | // copy.[su]_[bhwd] |
| 1043 | def : InstRW<[GenericWriteFPUMoveGPRFPU], (instregex "^COPY_U_[BHW]$")>; |
| 1044 | def : InstRW<[GenericWriteFPUMoveGPRFPU], (instregex "^COPY_S_[BHWD]$")>; |
| 1045 | |
| 1046 | def : InstRW<[GenericWriteFPUStore], (instregex "^ST_[BHWD]$")>; |
| 1047 | def : InstRW<[GenericWriteFPULoad], (instregex "^LD_[BHWD]$")>; |
| 1048 | } |