Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 1 | //===- P9InstrResources.td - P9 Instruction Resource Defs -*- 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 defines resources required by some of P9 instruction. This is part |
| 11 | // P9 processor model used for instruction scheduling. Not every instruction |
| 12 | // is listed here. Instructions in this file belong to itinerary classes that |
| 13 | // have instructions with different resource requirements. |
| 14 | // |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 15 | // The makeup of the P9 CPU is modeled as follows: |
| 16 | // - Each CPU is made up of two superslices. |
| 17 | // - Each superslice is made up of two slices. Therefore, there are 4 slices |
| 18 | // for each CPU. |
| 19 | // - Up to 6 instructions can be dispatched to each CPU. Three per superslice. |
| 20 | // - Each CPU has: |
| 21 | // - One CY (Crypto) unit P9_CY_* |
| 22 | // - One DFU (Decimal Floating Point and Quad Precision) unit P9_DFU_* |
| 23 | // - Two PM (Permute) units. One on each superslice. P9_PM_* |
| 24 | // - Two DIV (Fixed Point Divide) units. One on each superslize. P9_DIV_* |
| 25 | // - Four ALU (Fixed Point Arithmetic) units. One on each slice. P9_ALU_* |
| 26 | // - Four DP (Floating Point) units. One on each slice. P9_DP_* |
| 27 | // This also includes fixed point multiply add. |
| 28 | // - Four AGEN (Address Generation) units. One for each slice. P9_AGEN_* |
| 29 | // - Four Load/Store Queues. P9_LS_* |
| 30 | // - Each set of instructions will require a number of these resources. |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 31 | //===----------------------------------------------------------------------===// |
| 32 | |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 33 | // Two cycle ALU vector operation that uses an entire superslice. |
| 34 | // Uses both ALU units (the even ALUE and odd ALUO units), two pipelines |
| 35 | // (EXECE, EXECO) and all three dispatches (DISP) to the given superslice. |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 36 | def : InstRW<[P9_ALUE_2C, P9_ALUO_2C, IP_EXECE_1C, IP_EXECO_1C, |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 37 | DISP_1C, DISP_1C, DISP_1C], |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 38 | (instrs |
Stefan Pintilie | 626b651 | 2018-02-23 20:37:10 +0000 | [diff] [blame] | 39 | (instregex "VADDU(B|H|W|D)M$"), |
Stefan Pintilie | e894e0f | 2018-03-01 16:16:08 +0000 | [diff] [blame] | 40 | (instregex "VAND(C)?$"), |
Stefan Pintilie | b5a9440 | 2018-03-02 14:41:38 +0000 | [diff] [blame] | 41 | (instregex "VEXTS(B|H|W)2(D|W)(s)?$"), |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame^] | 42 | (instregex "V_SET0(B|H)?$"), |
| 43 | MTVSRDD, |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 44 | VEQV, |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 45 | VRLB, |
| 46 | VRLD, |
| 47 | VRLDMI, |
| 48 | VRLDNM, |
| 49 | VRLH, |
| 50 | VRLW, |
| 51 | VRLWMI, |
| 52 | VRLWNM, |
| 53 | VSRAB, |
| 54 | VSRAD, |
| 55 | VSRAH, |
| 56 | VSRAW, |
| 57 | VSRB, |
| 58 | VSRD, |
| 59 | VSRH, |
| 60 | VSRW, |
| 61 | VSLB, |
| 62 | VSLD, |
| 63 | VSLH, |
| 64 | VSLW, |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 65 | VMRGEW, |
| 66 | VMRGOW, |
| 67 | VNAND, |
| 68 | VNEGD, |
| 69 | VNEGW, |
| 70 | VNOR, |
| 71 | VOR, |
| 72 | VORC, |
| 73 | VPOPCNTB, |
| 74 | VPOPCNTH, |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 75 | VSEL, |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 76 | VSUBUBM, |
| 77 | VSUBUDM, |
| 78 | VSUBUHM, |
| 79 | VSUBUWM, |
| 80 | VXOR, |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 81 | XVABSDP, |
| 82 | XVABSSP, |
| 83 | XVCPSGNDP, |
| 84 | XVCPSGNSP, |
| 85 | XVIEXPDP, |
| 86 | XVNABSDP, |
| 87 | XVNABSSP, |
| 88 | XVNEGDP, |
| 89 | XVNEGSP, |
| 90 | XVXEXPDP, |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 91 | XVIEXPSP, |
| 92 | XVXEXPSP, |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 93 | XXLAND, |
| 94 | XXLANDC, |
| 95 | XXLEQV, |
| 96 | XXLNAND, |
| 97 | XXLNOR, |
| 98 | XXLOR, |
| 99 | XXLORf, |
| 100 | XXLORC, |
| 101 | XXLXOR, |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame^] | 102 | XXLXORdpz, |
| 103 | XXLXORspz, |
| 104 | XXLXORz, |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 105 | XXSEL, |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 106 | XSABSQP, |
| 107 | XSCPSGNQP, |
| 108 | XSIEXPQP, |
| 109 | XSNABSQP, |
| 110 | XSNEGQP, |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 111 | XSXEXPQP |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 112 | )>; |
| 113 | |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 114 | // Restricted Dispatch ALU operation for 3 cycles. The operation runs on a |
| 115 | // slingle slice. However, since it is Restricted it requires all 3 dispatches |
| 116 | // (DISP) for that superslice. |
| 117 | def : InstRW<[P9_ALU_3C, IP_EXEC_1C, DISP_1C, DISP_1C, DISP_1C], |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 118 | (instrs |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 119 | FCMPUS, |
| 120 | FCMPUD, |
| 121 | XSTSTDCDP, |
Stefan Pintilie | 626b651 | 2018-02-23 20:37:10 +0000 | [diff] [blame] | 122 | XSTSTDCSP, |
| 123 | FTDIV, |
| 124 | FTSQRT, |
Stefan Pintilie | d45db61 | 2018-03-05 14:34:59 +0000 | [diff] [blame] | 125 | CMPEQB, |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame^] | 126 | (instregex "TABORT(D|W)C(I)?$"), |
| 127 | (instregex "MTFSB(0|1)$"), |
| 128 | (instregex "MFFSC(D)?RN(I)?$"), |
Stefan Pintilie | 626b651 | 2018-02-23 20:37:10 +0000 | [diff] [blame] | 129 | (instregex "CMPRB(8)?$"), |
| 130 | (instregex "TD(I)?$"), |
| 131 | (instregex "TW(I)?$") |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 132 | )>; |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 133 | |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 134 | // Standard Dispatch ALU operation for 3 cycles. Only one slice used. |
| 135 | def : InstRW<[P9_ALU_3C, IP_EXEC_1C, DISP_1C, DISP_1C], |
| 136 | (instrs |
Stefan Pintilie | 626b651 | 2018-02-23 20:37:10 +0000 | [diff] [blame] | 137 | (instregex "XSMAX(C|J)?DP$"), |
| 138 | (instregex "XSMIN(C|J)?DP$"), |
| 139 | (instregex "XSCMP(EQ|EXP|GE|GT|O|U)DP$"), |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 140 | XSTDIVDP, |
| 141 | XSTSQRTDP, |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 142 | XSXSIGDP, |
Stefan Pintilie | 626b651 | 2018-02-23 20:37:10 +0000 | [diff] [blame] | 143 | XSCVSPDPN, |
| 144 | SETB, |
| 145 | BPERMD, |
Stefan Pintilie | d45db61 | 2018-03-05 14:34:59 +0000 | [diff] [blame] | 146 | (instregex "CNT(L|T)Z(D|W)(8)?(o)?$"), |
Stefan Pintilie | 626b651 | 2018-02-23 20:37:10 +0000 | [diff] [blame] | 147 | (instregex "POPCNT(D|W)$"), |
| 148 | (instregex "CMPB(8)?$") |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 149 | )>; |
| 150 | |
| 151 | // Standard Dispatch ALU operation for 2 cycles. Only one slice used. |
| 152 | def : InstRW<[P9_ALU_2C, IP_EXEC_1C, DISP_1C, DISP_1C], |
| 153 | (instrs |
| 154 | ADDIStocHA, |
| 155 | ADDItocL, |
| 156 | MCRF, |
| 157 | MCRXRX, |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 158 | XSNABSDP, |
| 159 | XSXEXPDP, |
| 160 | XSABSDP, |
| 161 | XSNEGDP, |
Stefan Pintilie | 626b651 | 2018-02-23 20:37:10 +0000 | [diff] [blame] | 162 | XSCPSGNDP, |
| 163 | (instregex "S(L|R)D$"), |
| 164 | (instregex "SRAD(I)?$"), |
| 165 | (instregex "EXTSWSLI$"), |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame^] | 166 | (instregex "MFV(S)?RD$"), |
| 167 | (instregex "MTVSRD$"), |
| 168 | (instregex "MTVSRW(A|Z)$"), |
| 169 | MFVSRWZ, |
Stefan Pintilie | 626b651 | 2018-02-23 20:37:10 +0000 | [diff] [blame] | 170 | SRADI_32, |
| 171 | RLDIC, |
Stefan Pintilie | e894e0f | 2018-03-01 16:16:08 +0000 | [diff] [blame] | 172 | RFEBB, |
Stefan Pintilie | 626b651 | 2018-02-23 20:37:10 +0000 | [diff] [blame] | 173 | LA, |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame^] | 174 | TBEGIN, |
| 175 | TRECHKPT, |
Stefan Pintilie | 626b651 | 2018-02-23 20:37:10 +0000 | [diff] [blame] | 176 | (instregex "CMP(WI|LWI|W|LW)(8)?$"), |
Stefan Pintilie | d45db61 | 2018-03-05 14:34:59 +0000 | [diff] [blame] | 177 | (instregex "CMP(L)?D(I)?$"), |
Stefan Pintilie | 626b651 | 2018-02-23 20:37:10 +0000 | [diff] [blame] | 178 | (instregex "SUBF(I)?C(8)?$"), |
| 179 | (instregex "ANDI(S)?o(8)?$"), |
Stefan Pintilie | e894e0f | 2018-03-01 16:16:08 +0000 | [diff] [blame] | 180 | (instregex "ADDC(8)?$"), |
| 181 | (instregex "ADDIC(8)?(o)?$"), |
| 182 | (instregex "ADD(8|4)(o)?$"), |
| 183 | (instregex "ADD(E|ME|ZE)(8)?(o)?$"), |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame^] | 184 | (instregex "SUBF(E|ME|ZE)?(8)?(o)?$"), |
| 185 | (instregex "NEG(8)?(o)?$"), |
Stefan Pintilie | 626b651 | 2018-02-23 20:37:10 +0000 | [diff] [blame] | 186 | (instregex "POPCNTB$"), |
| 187 | (instregex "ADD(I|IS)?(8)?$"), |
| 188 | (instregex "LI(S)?(8)?$"), |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame^] | 189 | (instregex "(X)?OR(I|IS)?(8)?(o)?$"), |
Stefan Pintilie | 626b651 | 2018-02-23 20:37:10 +0000 | [diff] [blame] | 190 | NOP, |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame^] | 191 | (instregex "NAND(8)?(o)?$"), |
Stefan Pintilie | e894e0f | 2018-03-01 16:16:08 +0000 | [diff] [blame] | 192 | (instregex "AND(C)?(8)?(o)?$"), |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame^] | 193 | (instregex "NOR(8)?(o)?$"), |
| 194 | (instregex "OR(C)?(8)?(o)?$"), |
Stefan Pintilie | d45db61 | 2018-03-05 14:34:59 +0000 | [diff] [blame] | 195 | (instregex "EQV(8)?(o)?$"), |
Stefan Pintilie | b5a9440 | 2018-03-02 14:41:38 +0000 | [diff] [blame] | 196 | (instregex "EXTS(B|H|W)(8)?(_32)?(_64)?(o)?$"), |
Stefan Pintilie | 626b651 | 2018-02-23 20:37:10 +0000 | [diff] [blame] | 197 | (instregex "ADD(4|8)(TLS)?(_)?$"), |
| 198 | (instregex "NEG(8)?$") |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 199 | )>; |
| 200 | |
| 201 | // Restricted Dispatch ALU operation for 2 cycles. The operation runs on a |
| 202 | // slingle slice. However, since it is Restricted it requires all 3 dispatches |
| 203 | // (DISP) for that superslice. |
| 204 | def : InstRW<[P9_ALU_2C, IP_EXEC_1C, DISP_1C, DISP_1C, DISP_1C], |
| 205 | (instrs |
| 206 | RLDCL, |
| 207 | RLDCR, |
| 208 | RLDIMI, |
| 209 | RLDICL, |
| 210 | RLDICR, |
| 211 | RLDICL_32_64, |
Stefan Pintilie | 626b651 | 2018-02-23 20:37:10 +0000 | [diff] [blame] | 212 | RLDICL_32, |
| 213 | RLDICR_32, |
| 214 | (instregex "RLWIMI(8)?$"), |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 215 | XSIEXPDP, |
| 216 | FMR, |
Stefan Pintilie | d45db61 | 2018-03-05 14:34:59 +0000 | [diff] [blame] | 217 | CREQV, |
| 218 | CRXOR, |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame^] | 219 | TRECLAIM, |
| 220 | TSR, |
| 221 | TABORT, |
| 222 | (instregex "MFOCRF(8)?$"), |
Stefan Pintilie | d45db61 | 2018-03-05 14:34:59 +0000 | [diff] [blame] | 223 | (instregex "CR(6)?(UN)?SET$"), |
| 224 | (instregex "CR(N)?(OR|AND)(C)?$"), |
Stefan Pintilie | 626b651 | 2018-02-23 20:37:10 +0000 | [diff] [blame] | 225 | (instregex "S(L|R)W(8)?$"), |
| 226 | (instregex "RLW(INM|NM)(8)?$"), |
| 227 | (instregex "F(N)?ABS(D|S)$"), |
| 228 | (instregex "FNEG(D|S)$"), |
| 229 | (instregex "FCPSGN(D|S)$"), |
| 230 | (instregex "SRAW(I)?$"), |
| 231 | (instregex "ISEL(8)?$") |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 232 | )>; |
| 233 | |
| 234 | // Three cycle ALU vector operation that uses an entire superslice. |
| 235 | // Uses both ALU units (the even ALUE and odd ALUO units), two pipelines |
| 236 | // (EXECE, EXECO) and all three dispatches (DISP) to the given superslice. |
| 237 | def : InstRW<[P9_ALUE_3C, P9_ALUO_3C, IP_EXECE_1C, IP_EXECO_1C, |
| 238 | DISP_1C, DISP_1C, DISP_1C], |
| 239 | (instrs |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame^] | 240 | (instregex "M(T|F)VSCR$"), |
Stefan Pintilie | e894e0f | 2018-03-01 16:16:08 +0000 | [diff] [blame] | 241 | (instregex "VCMPNEZ(B|H|W)$"), |
| 242 | VCMPEQUB, |
| 243 | VCMPEQUD, |
| 244 | VCMPEQUH, |
| 245 | VCMPEQUW, |
| 246 | VCMPNEB, |
| 247 | VCMPNEH, |
| 248 | VCMPNEW, |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 249 | VBPERMD, |
| 250 | VABSDUB, |
| 251 | VABSDUH, |
| 252 | VABSDUW, |
Stefan Pintilie | e894e0f | 2018-03-01 16:16:08 +0000 | [diff] [blame] | 253 | VADDCUW, |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 254 | VADDUBS, |
| 255 | VADDUHS, |
| 256 | VADDUWS, |
| 257 | VAVGSB, |
| 258 | VAVGSH, |
| 259 | VAVGSW, |
| 260 | VAVGUB, |
| 261 | VAVGUH, |
| 262 | VAVGUW, |
| 263 | VCMPEQFP, |
| 264 | VCMPEQFPo, |
| 265 | VCMPGEFP, |
| 266 | VCMPGEFPo, |
| 267 | VCMPBFP, |
| 268 | VCMPBFPo, |
| 269 | VCMPGTFP, |
| 270 | VCMPGTFPo, |
| 271 | VCLZB, |
| 272 | VCLZD, |
| 273 | VCLZH, |
| 274 | VCLZW, |
| 275 | VCTZB, |
| 276 | VCTZD, |
| 277 | VCTZH, |
| 278 | VCTZW, |
| 279 | VADDSBS, |
| 280 | VADDSHS, |
| 281 | VADDSWS, |
| 282 | VMINFP, |
| 283 | VMINSB, |
| 284 | VMINSD, |
| 285 | VMINSH, |
| 286 | VMINSW, |
| 287 | VMINUB, |
| 288 | VMINUD, |
| 289 | VMINUH, |
| 290 | VMINUW, |
| 291 | VMAXFP, |
| 292 | VMAXSB, |
| 293 | VMAXSD, |
| 294 | VMAXSH, |
| 295 | VMAXSW, |
| 296 | VMAXUB, |
| 297 | VMAXUD, |
| 298 | VMAXUH, |
| 299 | VMAXUW, |
| 300 | VPOPCNTW, |
| 301 | VPOPCNTD, |
| 302 | VPRTYBD, |
| 303 | VPRTYBW, |
| 304 | VSHASIGMAD, |
| 305 | VSHASIGMAW, |
| 306 | VSUBSBS, |
| 307 | VSUBSHS, |
| 308 | VSUBSWS, |
| 309 | VSUBUBS, |
| 310 | VSUBUHS, |
| 311 | VSUBUWS, |
| 312 | VSUBCUW, |
| 313 | VCMPGTSB, |
| 314 | VCMPGTSBo, |
| 315 | VCMPGTSD, |
| 316 | VCMPGTSDo, |
| 317 | VCMPGTSH, |
| 318 | VCMPGTSHo, |
| 319 | VCMPGTSW, |
| 320 | VCMPGTSWo, |
| 321 | VCMPGTUB, |
| 322 | VCMPGTUBo, |
| 323 | VCMPGTUD, |
| 324 | VCMPGTUDo, |
| 325 | VCMPGTUH, |
| 326 | VCMPGTUHo, |
| 327 | VCMPGTUW, |
| 328 | VCMPGTUWo, |
| 329 | VCMPNEBo, |
| 330 | VCMPNEHo, |
| 331 | VCMPNEWo, |
| 332 | VCMPNEZBo, |
| 333 | VCMPNEZHo, |
| 334 | VCMPNEZWo, |
| 335 | VCMPEQUBo, |
| 336 | VCMPEQUDo, |
| 337 | VCMPEQUHo, |
| 338 | VCMPEQUWo, |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 339 | XVCMPEQDP, |
| 340 | XVCMPEQDPo, |
| 341 | XVCMPEQSP, |
| 342 | XVCMPEQSPo, |
| 343 | XVCMPGEDP, |
| 344 | XVCMPGEDPo, |
| 345 | XVCMPGESP, |
| 346 | XVCMPGESPo, |
| 347 | XVCMPGTDP, |
| 348 | XVCMPGTDPo, |
| 349 | XVCMPGTSP, |
| 350 | XVCMPGTSPo, |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 351 | XVMAXDP, |
| 352 | XVMAXSP, |
| 353 | XVMINDP, |
| 354 | XVMINSP, |
| 355 | XVTDIVDP, |
| 356 | XVTDIVSP, |
| 357 | XVTSQRTDP, |
| 358 | XVTSQRTSP, |
| 359 | XVTSTDCDP, |
| 360 | XVTSTDCSP, |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 361 | XVXSIGDP, |
| 362 | XVXSIGSP |
| 363 | )>; |
| 364 | |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 365 | // 7 cycle DP vector operation that uses an entire superslice. |
| 366 | // Uses both DP units (the even DPE and odd DPO units), two pipelines |
| 367 | // (EXECE, EXECO) and all three dispatches (DISP) to the given superslice. |
| 368 | def : InstRW<[P9_DPE_7C, P9_DPO_7C, IP_EXECE_1C, IP_EXECO_1C, |
| 369 | DISP_1C, DISP_1C, DISP_1C], |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 370 | (instrs |
| 371 | VADDFP, |
| 372 | VCTSXS, |
| 373 | VCTSXS_0, |
| 374 | VCTUXS, |
| 375 | VCTUXS_0, |
| 376 | VEXPTEFP, |
| 377 | VLOGEFP, |
| 378 | VMADDFP, |
| 379 | VMHADDSHS, |
| 380 | VNMSUBFP, |
| 381 | VREFP, |
| 382 | VRFIM, |
| 383 | VRFIN, |
| 384 | VRFIP, |
| 385 | VRFIZ, |
| 386 | VRSQRTEFP, |
| 387 | VSUBFP, |
| 388 | XVADDDP, |
| 389 | XVADDSP, |
| 390 | XVCVDPSP, |
| 391 | XVCVDPSXDS, |
| 392 | XVCVDPSXWS, |
| 393 | XVCVDPUXDS, |
| 394 | XVCVDPUXWS, |
| 395 | XVCVHPSP, |
| 396 | XVCVSPDP, |
| 397 | XVCVSPHP, |
| 398 | XVCVSPSXDS, |
| 399 | XVCVSPSXWS, |
| 400 | XVCVSPUXDS, |
| 401 | XVCVSPUXWS, |
| 402 | XVCVSXDDP, |
| 403 | XVCVSXDSP, |
| 404 | XVCVSXWDP, |
| 405 | XVCVSXWSP, |
| 406 | XVCVUXDDP, |
| 407 | XVCVUXDSP, |
| 408 | XVCVUXWDP, |
| 409 | XVCVUXWSP, |
| 410 | XVMADDADP, |
| 411 | XVMADDASP, |
| 412 | XVMADDMDP, |
| 413 | XVMADDMSP, |
| 414 | XVMSUBADP, |
| 415 | XVMSUBASP, |
| 416 | XVMSUBMDP, |
| 417 | XVMSUBMSP, |
| 418 | XVMULDP, |
| 419 | XVMULSP, |
| 420 | XVNMADDADP, |
| 421 | XVNMADDASP, |
| 422 | XVNMADDMDP, |
| 423 | XVNMADDMSP, |
| 424 | XVNMSUBADP, |
| 425 | XVNMSUBASP, |
| 426 | XVNMSUBMDP, |
| 427 | XVNMSUBMSP, |
| 428 | XVRDPI, |
| 429 | XVRDPIC, |
| 430 | XVRDPIM, |
| 431 | XVRDPIP, |
| 432 | XVRDPIZ, |
| 433 | XVREDP, |
| 434 | XVRESP, |
| 435 | XVRSPI, |
| 436 | XVRSPIC, |
| 437 | XVRSPIM, |
| 438 | XVRSPIP, |
| 439 | XVRSPIZ, |
| 440 | XVRSQRTEDP, |
| 441 | XVRSQRTESP, |
| 442 | XVSUBDP, |
| 443 | XVSUBSP, |
| 444 | VCFSX, |
| 445 | VCFSX_0, |
| 446 | VCFUX, |
| 447 | VCFUX_0, |
| 448 | VMHRADDSHS, |
| 449 | VMLADDUHM, |
| 450 | VMSUMMBM, |
| 451 | VMSUMSHM, |
| 452 | VMSUMSHS, |
| 453 | VMSUMUBM, |
| 454 | VMSUMUHM, |
| 455 | VMSUMUHS, |
| 456 | VMULESB, |
| 457 | VMULESH, |
| 458 | VMULESW, |
| 459 | VMULEUB, |
| 460 | VMULEUH, |
| 461 | VMULEUW, |
| 462 | VMULOSB, |
| 463 | VMULOSH, |
| 464 | VMULOSW, |
| 465 | VMULOUB, |
| 466 | VMULOUH, |
| 467 | VMULOUW, |
| 468 | VMULUWM, |
| 469 | VSUM2SWS, |
| 470 | VSUM4SBS, |
| 471 | VSUM4SHS, |
| 472 | VSUM4UBS, |
| 473 | VSUMSWS |
| 474 | )>; |
| 475 | |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame^] | 476 | |
| 477 | // 5 cycle Restricted DP operation. One DP unit, one EXEC pipeline and all three |
| 478 | // dispatch units for the superslice. |
| 479 | def : InstRW<[P9_DP_5C, IP_EXEC_1C, DISP_1C, DISP_1C, DISP_1C], |
| 480 | (instrs |
| 481 | (instregex "MADD(HD|HDU|LD)$"), |
| 482 | (instregex "MUL(HD|HW|LD|LI|LI8|LW)(U)?$") |
| 483 | )>; |
| 484 | |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 485 | // 7 cycle Restricted DP operation. One DP unit, one EXEC pipeline and all three |
| 486 | // dispatch units for the superslice. |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 487 | def : InstRW<[P9_DP_7C, IP_EXEC_1C, DISP_1C, DISP_1C, DISP_1C], |
| 488 | (instrs |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 489 | FRSP, |
Stefan Pintilie | d45db61 | 2018-03-05 14:34:59 +0000 | [diff] [blame] | 490 | (instregex "FRI(N|P|Z|M)(D|S)$"), |
| 491 | (instregex "FRE(S)?$"), |
| 492 | (instregex "FADD(S)?$"), |
| 493 | (instregex "FMSUB(S)?$"), |
| 494 | (instregex "FMADD(S)?$"), |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 495 | FRSQRTE, |
| 496 | FRSQRTES, |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 497 | FNMADDS, |
| 498 | FNMADD, |
| 499 | FNMSUBS, |
| 500 | FNMSUB, |
| 501 | FSELD, |
| 502 | FSELS, |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 503 | FMULS, |
| 504 | FMUL, |
Stefan Pintilie | d45db61 | 2018-03-05 14:34:59 +0000 | [diff] [blame] | 505 | (instregex "FSUB(S)?$"), |
| 506 | (instregex "FCFID(U)?(S)?$"), |
| 507 | (instregex "FCTID(U)?(Z)?$"), |
| 508 | (instregex "FCTIW(U)?(Z)?$"), |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 509 | XSMADDADP, |
| 510 | XSMADDASP, |
| 511 | XSMADDMDP, |
| 512 | XSMADDMSP, |
| 513 | XSMSUBADP, |
| 514 | XSMSUBASP, |
| 515 | XSMSUBMDP, |
| 516 | XSMSUBMSP, |
| 517 | XSMULDP, |
| 518 | XSMULSP, |
| 519 | XSNMADDADP, |
| 520 | XSNMADDASP, |
| 521 | XSNMADDMDP, |
| 522 | XSNMADDMSP, |
| 523 | XSNMSUBADP, |
| 524 | XSNMSUBASP, |
| 525 | XSNMSUBMDP, |
| 526 | XSNMSUBMSP |
| 527 | )>; |
| 528 | |
Stefan Pintilie | e894e0f | 2018-03-01 16:16:08 +0000 | [diff] [blame] | 529 | // 7 cycle Restricted DP operation and one 3 cycle ALU operation. |
Stefan Pintilie | d45db61 | 2018-03-05 14:34:59 +0000 | [diff] [blame] | 530 | // These operations can be done in parallel. |
| 531 | // The DP is restricted so we need a full 5 dispatches. |
| 532 | def : InstRW<[P9_DP_7C, P9_ALU_3C, IP_EXEC_1C, IP_EXEC_1C, |
| 533 | DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 534 | (instrs |
| 535 | (instregex "FSEL(D|S)o$") |
| 536 | )>; |
| 537 | |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame^] | 538 | // 5 Cycle Restricted DP operation and one 2 cycle ALU operation. |
| 539 | def : InstRW<[P9_DPOpAndALUOp_7C, IP_EXEC_1C, IP_EXEC_1C, |
| 540 | DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 541 | (instrs |
| 542 | (instregex "MUL(H|L)(D|W)(U)?o$") |
| 543 | )>; |
| 544 | |
Stefan Pintilie | d45db61 | 2018-03-05 14:34:59 +0000 | [diff] [blame] | 545 | // 7 cycle Restricted DP operation and one 3 cycle ALU operation. |
| 546 | // These operations must be done sequentially. |
Stefan Pintilie | cc330da | 2017-10-10 13:45:35 +0000 | [diff] [blame] | 547 | // The DP is restricted so we need a full 5 dispatches. |
Stefan Pintilie | e894e0f | 2018-03-01 16:16:08 +0000 | [diff] [blame] | 548 | def : InstRW<[P9_DPOpAndALU2Op_10C, IP_EXEC_1C, IP_EXEC_1C, |
Stefan Pintilie | cc330da | 2017-10-10 13:45:35 +0000 | [diff] [blame] | 549 | DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 550 | (instrs |
Stefan Pintilie | d45db61 | 2018-03-05 14:34:59 +0000 | [diff] [blame] | 551 | (instregex "FRI(N|P|Z|M)(D|S)o$"), |
| 552 | (instregex "FRE(S)?o$"), |
| 553 | (instregex "FADD(S)?o$"), |
| 554 | (instregex "FSUB(S)?o$"), |
| 555 | (instregex "F(N)?MSUB(S)?o$"), |
| 556 | (instregex "F(N)?MADD(S)?o$"), |
| 557 | (instregex "FCFID(U)?(S)?o$"), |
| 558 | (instregex "FCTID(U)?(Z)?o$"), |
| 559 | (instregex "FCTIW(U)?(Z)?o$"), |
| 560 | (instregex "FMUL(S)?o$"), |
| 561 | (instregex "FRSQRTE(S)?o$"), |
| 562 | FRSPo |
Stefan Pintilie | cc330da | 2017-10-10 13:45:35 +0000 | [diff] [blame] | 563 | )>; |
| 564 | |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 565 | // 7 cycle DP operation. One DP unit, one EXEC pipeline and two dispatch units. |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 566 | def : InstRW<[P9_DP_7C, IP_EXEC_1C, DISP_1C, DISP_1C], |
| 567 | (instrs |
| 568 | XSADDDP, |
| 569 | XSADDSP, |
| 570 | XSCVDPHP, |
| 571 | XSCVDPSP, |
| 572 | XSCVDPSXDS, |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 573 | XSCVDPSXDSs, |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 574 | XSCVDPSXWS, |
| 575 | XSCVDPUXDS, |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 576 | XSCVDPUXDSs, |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 577 | XSCVDPUXWS, |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame^] | 578 | XSCVDPSXWSs, |
| 579 | XSCVDPUXWSs, |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 580 | XSCVHPDP, |
| 581 | XSCVSPDP, |
| 582 | XSCVSXDDP, |
| 583 | XSCVSXDSP, |
| 584 | XSCVUXDDP, |
| 585 | XSCVUXDSP, |
| 586 | XSRDPI, |
| 587 | XSRDPIC, |
| 588 | XSRDPIM, |
| 589 | XSRDPIP, |
| 590 | XSRDPIZ, |
| 591 | XSREDP, |
| 592 | XSRESP, |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 593 | XSRSQRTEDP, |
| 594 | XSRSQRTESP, |
| 595 | XSSUBDP, |
| 596 | XSSUBSP, |
| 597 | XSCVDPSPN |
| 598 | )>; |
| 599 | |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 600 | // Three Cycle PM operation. Only one PM unit per superslice so we use the whole |
| 601 | // superslice. That includes both exec pipelines (EXECO, EXECE) and all three |
| 602 | // dispatches. |
| 603 | def : InstRW<[P9_PM_3C, IP_EXECO_1C, IP_EXECE_1C, DISP_1C, DISP_1C, DISP_1C], |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 604 | (instrs |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame^] | 605 | (instregex "LVS(L|R)$"), |
| 606 | (instregex "VSPLTIS(W|H|B)$"), |
| 607 | (instregex "VSPLT(W|H|B)(s)?$"), |
| 608 | (instregex "V_SETALLONES(B|H)?$"), |
| 609 | (instregex "VEXTRACTU(B|H|W)$"), |
| 610 | MFVSRLD, |
| 611 | MTVSRWS, |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 612 | VBPERMQ, |
| 613 | VCLZLSBB, |
| 614 | VCTZLSBB, |
| 615 | VEXTRACTD, |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 616 | VEXTUBLX, |
| 617 | VEXTUBRX, |
| 618 | VEXTUHLX, |
| 619 | VEXTUHRX, |
| 620 | VEXTUWLX, |
| 621 | VEXTUWRX, |
| 622 | VGBBD, |
| 623 | VINSERTB, |
| 624 | VINSERTD, |
| 625 | VINSERTH, |
| 626 | VINSERTW, |
| 627 | VMRGHB, |
| 628 | VMRGHH, |
| 629 | VMRGHW, |
| 630 | VMRGLB, |
| 631 | VMRGLH, |
| 632 | VMRGLW, |
| 633 | VPERM, |
| 634 | VPERMR, |
| 635 | VPERMXOR, |
| 636 | VPKPX, |
| 637 | VPKSDSS, |
| 638 | VPKSDUS, |
| 639 | VPKSHSS, |
| 640 | VPKSHUS, |
| 641 | VPKSWSS, |
| 642 | VPKSWUS, |
| 643 | VPKUDUM, |
| 644 | VPKUDUS, |
| 645 | VPKUHUM, |
| 646 | VPKUHUS, |
| 647 | VPKUWUM, |
| 648 | VPKUWUS, |
| 649 | VPRTYBQ, |
| 650 | VSL, |
| 651 | VSLDOI, |
| 652 | VSLO, |
| 653 | VSLV, |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 654 | VSR, |
| 655 | VSRO, |
| 656 | VSRV, |
| 657 | VUPKHPX, |
| 658 | VUPKHSB, |
| 659 | VUPKHSH, |
| 660 | VUPKHSW, |
| 661 | VUPKLPX, |
| 662 | VUPKLSB, |
| 663 | VUPKLSH, |
| 664 | VUPKLSW, |
| 665 | XXBRD, |
| 666 | XXBRH, |
| 667 | XXBRQ, |
| 668 | XXBRW, |
| 669 | XXEXTRACTUW, |
| 670 | XXINSERTW, |
| 671 | XXMRGHW, |
| 672 | XXMRGLW, |
| 673 | XXPERM, |
| 674 | XXPERMR, |
| 675 | XXSLDWI, |
| 676 | XXSPLTIB, |
| 677 | XXSPLTW, |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 678 | XXSPLTWs, |
| 679 | XXPERMDI, |
| 680 | XXPERMDIs, |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 681 | VADDCUQ, |
| 682 | VADDECUQ, |
| 683 | VADDEUQM, |
| 684 | VADDUQM, |
| 685 | VMUL10CUQ, |
| 686 | VMUL10ECUQ, |
| 687 | VMUL10EUQ, |
| 688 | VMUL10UQ, |
| 689 | VSUBCUQ, |
| 690 | VSUBECUQ, |
| 691 | VSUBEUQM, |
| 692 | VSUBUQM, |
| 693 | XSCMPEXPQP, |
| 694 | XSCMPOQP, |
| 695 | XSCMPUQP, |
| 696 | XSTSTDCQP, |
Stefan Pintilie | e894e0f | 2018-03-01 16:16:08 +0000 | [diff] [blame] | 697 | XSXSIGQP, |
| 698 | BCDCFNo, |
| 699 | BCDCFZo, |
| 700 | BCDCPSGNo, |
| 701 | BCDCTNo, |
| 702 | BCDCTZo, |
| 703 | BCDSETSGNo, |
| 704 | BCDSo, |
| 705 | BCDTRUNCo, |
| 706 | BCDUSo, |
| 707 | BCDUTRUNCo |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 708 | )>; |
| 709 | |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 710 | // 12 Cycle DFU operation. Only one DFU unit per CPU so we use a whole |
| 711 | // superslice. That includes both exec pipelines (EXECO, EXECE) and all three |
| 712 | // dispatches. |
| 713 | def : InstRW<[P9_DFU_12C, IP_EXECE_1C, IP_EXECO_1C, DISP_1C, DISP_1C, DISP_1C], |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 714 | (instrs |
Stefan Pintilie | e894e0f | 2018-03-01 16:16:08 +0000 | [diff] [blame] | 715 | BCDSRo, |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 716 | XSADDQP, |
| 717 | XSADDQPO, |
| 718 | XSCVDPQP, |
| 719 | XSCVQPDP, |
| 720 | XSCVQPDPO, |
| 721 | XSCVQPSDZ, |
| 722 | XSCVQPSWZ, |
| 723 | XSCVQPUDZ, |
| 724 | XSCVQPUWZ, |
| 725 | XSCVSDQP, |
| 726 | XSCVUDQP, |
| 727 | XSRQPI, |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame^] | 728 | XSRQPIX, |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 729 | XSRQPXP, |
| 730 | XSSUBQP, |
| 731 | XSSUBQPO |
| 732 | )>; |
| 733 | |
Stefan Pintilie | e894e0f | 2018-03-01 16:16:08 +0000 | [diff] [blame] | 734 | // 23 Cycle DFU operation. Only one DFU unit per CPU so we use a whole |
| 735 | // superslice. That includes both exec pipelines (EXECO, EXECE) and all three |
| 736 | // dispatches. |
| 737 | def : InstRW<[P9_DFU_23C, IP_EXECE_1C, IP_EXECO_1C, DISP_1C, DISP_1C, DISP_1C], |
| 738 | (instrs |
| 739 | BCDCTSQo |
| 740 | )>; |
| 741 | |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 742 | // 24 Cycle DFU operation. Only one DFU unit per CPU so we use a whole |
| 743 | // superslice. That includes both exec pipelines (EXECO, EXECE) and all three |
| 744 | // dispatches. |
| 745 | def : InstRW<[P9_DFU_24C, IP_EXECE_1C, IP_EXECO_1C, DISP_1C, DISP_1C, DISP_1C], |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 746 | (instrs |
| 747 | XSMADDQP, |
| 748 | XSMADDQPO, |
| 749 | XSMSUBQP, |
| 750 | XSMSUBQPO, |
| 751 | XSMULQP, |
| 752 | XSMULQPO, |
| 753 | XSNMADDQP, |
| 754 | XSNMADDQPO, |
| 755 | XSNMSUBQP, |
| 756 | XSNMSUBQPO |
| 757 | )>; |
| 758 | |
Stefan Pintilie | e894e0f | 2018-03-01 16:16:08 +0000 | [diff] [blame] | 759 | // 37 Cycle DFU operation. Only one DFU unit per CPU so we use a whole |
| 760 | // superslice. That includes both exec pipelines (EXECO, EXECE) and all three |
| 761 | // dispatches. |
| 762 | def : InstRW<[P9_DFU_37C, IP_EXECE_1C, IP_EXECO_1C, DISP_1C, DISP_1C, DISP_1C], |
| 763 | (instrs |
| 764 | BCDCFSQo |
| 765 | )>; |
| 766 | |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 767 | // 58 Cycle DFU operation. Only one DFU unit per CPU so we use a whole |
| 768 | // superslice. That includes both exec pipelines (EXECO, EXECE) and all three |
| 769 | // dispatches. |
| 770 | def : InstRW<[P9_DFU_58C, IP_EXECE_1C, IP_EXECO_1C, DISP_1C, DISP_1C, DISP_1C], |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 771 | (instrs |
| 772 | XSDIVQP, |
| 773 | XSDIVQPO |
| 774 | )>; |
| 775 | |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 776 | // 76 Cycle DFU operation. Only one DFU unit per CPU so we use a whole |
| 777 | // superslice. That includes both exec pipelines (EXECO, EXECE) and all three |
| 778 | // dispatches. |
| 779 | def : InstRW<[P9_DFU_76C, IP_EXECE_1C, IP_EXECO_1C, DISP_1C, DISP_1C, DISP_1C], |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 780 | (instrs |
| 781 | XSSQRTQP, |
| 782 | XSSQRTQPO |
| 783 | )>; |
| 784 | |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame^] | 785 | // 6 Cycle load uses a single slice. |
| 786 | def : InstRW<[P9_LS_6C, IP_AGEN_1C, DISP_1C, DISP_1C], |
| 787 | (instrs |
| 788 | (instregex "LXVL(L)?") |
| 789 | )>; |
| 790 | |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 791 | // 5 Cycle load uses a single slice. |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 792 | def : InstRW<[P9_LS_5C, IP_AGEN_1C, DISP_1C, DISP_1C], |
| 793 | (instrs |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame^] | 794 | (instregex "LVE(B|H|W)X$"), |
| 795 | (instregex "LVX(L)?"), |
| 796 | (instregex "LXSI(B|H)ZX$"), |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 797 | LXSDX, |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame^] | 798 | LXVB16X, |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 799 | LXVD2X, |
Stefan Pintilie | e894e0f | 2018-03-01 16:16:08 +0000 | [diff] [blame] | 800 | LXVWSX, |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 801 | LXSIWZX, |
| 802 | LXV, |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 803 | LXVX, |
| 804 | LXSD, |
Tony Jiang | 438bf4a | 2017-11-20 14:38:30 +0000 | [diff] [blame] | 805 | DFLOADf64, |
Stefan Pintilie | 626b651 | 2018-02-23 20:37:10 +0000 | [diff] [blame] | 806 | XFLOADf64, |
| 807 | LIWZX |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 808 | )>; |
| 809 | |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 810 | // 4 Cycle load uses a single slice. |
| 811 | def : InstRW<[P9_LS_4C, IP_AGEN_1C, DISP_1C, DISP_1C], |
| 812 | (instrs |
Stefan Pintilie | d45db61 | 2018-03-05 14:34:59 +0000 | [diff] [blame] | 813 | COPY, |
| 814 | CP_ABORT, |
| 815 | DARN, |
| 816 | EnforceIEIO, |
| 817 | ISYNC, |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame^] | 818 | MSGSYNC, |
| 819 | TLBSYNC, |
| 820 | SYNC, |
Stefan Pintilie | d45db61 | 2018-03-05 14:34:59 +0000 | [diff] [blame] | 821 | (instregex "DCB(F|T|ST)(EP)?$"), |
| 822 | (instregex "DCBZ(L)?(EP)?$"), |
| 823 | (instregex "DCBTST(EP)?$"), |
| 824 | (instregex "CP_COPY(8)?$"), |
| 825 | (instregex "CP_PASTE(8)?$"), |
| 826 | (instregex "ICBI(EP)?$"), |
| 827 | (instregex "ICBT(LS)?$"), |
| 828 | (instregex "LBARX(L)?$"), |
| 829 | (instregex "LBZ(CIX|8|X|X8)?$"), |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame^] | 830 | (instregex "LD(ARX|ARXL|BRX|CIX|X)?$"), |
| 831 | (instregex "LH(A|B)RX(L)?(8)?$"), |
| 832 | (instregex "LWARX(L)?$"), |
| 833 | (instregex "LWBRX(8)?$"), |
| 834 | (instregex "LWZ(8|CIX|X|X8)?$"), |
| 835 | LHZ, |
| 836 | LHZ8, |
| 837 | LHZCIX, |
| 838 | LHZX, |
| 839 | LHZX8, |
| 840 | LMW, |
| 841 | LSWI |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 842 | )>; |
| 843 | |
| 844 | // 4 Cycle Restricted load uses a single slice but the dispatch for the whole |
| 845 | // superslice. |
| 846 | def : InstRW<[P9_LS_4C, IP_AGEN_1C, DISP_1C, DISP_1C, DISP_1C], |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 847 | (instrs |
| 848 | LFIWZX, |
| 849 | LFDX, |
| 850 | LFD |
| 851 | )>; |
| 852 | |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame^] | 853 | // Cracked load instructions. |
| 854 | // Load instruction that can be done in parallel. |
| 855 | def : InstRW<[P9_LS_4C, P9_LS_4C, IP_AGEN_1C, IP_AGEN_1C, |
| 856 | DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 857 | (instrs |
| 858 | SLBIA, |
| 859 | SLBIE, |
| 860 | SLBMFEE, |
| 861 | SLBMFEV, |
| 862 | SLBMTE, |
| 863 | TLBIEL |
| 864 | )>; |
| 865 | |
| 866 | // Cracked Load instruction. |
| 867 | // Requires Load and ALU pieces totaling 6 cycles. The Load and ALU |
| 868 | // operations can be run in parallel. |
| 869 | def : InstRW<[P9_LS_4C, P9_ALU_2C, IP_EXEC_1C, IP_AGEN_1C, |
| 870 | DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 871 | (instrs |
| 872 | (instregex "L(W|H)ZU(X)?(8)?$"), |
| 873 | TEND |
| 874 | )>; |
| 875 | |
| 876 | def : InstRW<[P9_StoreAndALUOp_3C, IP_EXEC_1C, IP_EXEC_1C, IP_AGEN_1C, |
| 877 | DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 878 | (instrs |
| 879 | (instregex "ST(B|H|W|D)CX$") |
| 880 | )>; |
| 881 | |
Stefan Pintilie | d45db61 | 2018-03-05 14:34:59 +0000 | [diff] [blame] | 882 | // Cracked Load instruction. |
| 883 | // Requires consecutive Load and ALU pieces totaling 6 cycles. The Load and ALU |
| 884 | // operations cannot be done at the same time and so their latencies are added. |
| 885 | def : InstRW<[P9_LoadAndALUOp_6C, IP_EXEC_1C, IP_AGEN_1C, |
| 886 | DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 887 | (instrs |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame^] | 888 | (instregex "LHA(X)?(8)?$"), |
| 889 | (instregex "CP_PASTE(8)?o$"), |
| 890 | (instregex "LWA(X)?(_32)?$"), |
| 891 | TCHECK |
Stefan Pintilie | d45db61 | 2018-03-05 14:34:59 +0000 | [diff] [blame] | 892 | )>; |
| 893 | |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 894 | // Cracked Restricted Load instruction. |
| 895 | // Requires consecutive Load and ALU pieces totaling 6 cycles. The Load and ALU |
| 896 | // operations cannot be done at the same time and so their latencies are added. |
| 897 | // Full 6 dispatches are required as this is both cracked and restricted. |
| 898 | def : InstRW<[P9_LoadAndALUOp_6C, IP_EXEC_1C, IP_AGEN_1C, |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 899 | DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 900 | (instrs |
Stefan Pintilie | e894e0f | 2018-03-01 16:16:08 +0000 | [diff] [blame] | 901 | LFIWAX |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 902 | )>; |
| 903 | |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 904 | // Cracked Load instruction. |
| 905 | // Requires consecutive Load and ALU pieces totaling 7 cycles. The Load and ALU |
| 906 | // operations cannot be done at the same time and so their latencies are added. |
| 907 | // Full 4 dispatches are required as this is a cracked instruction. |
| 908 | def : InstRW<[P9_LoadAndALUOp_7C, IP_AGEN_1C, IP_EXEC_1C, |
| 909 | DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 910 | (instrs |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 911 | LXSIWAX, |
Stefan Pintilie | 626b651 | 2018-02-23 20:37:10 +0000 | [diff] [blame] | 912 | LIWAX |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 913 | )>; |
| 914 | |
Stefan Pintilie | e894e0f | 2018-03-01 16:16:08 +0000 | [diff] [blame] | 915 | // Cracked Load instruction. |
| 916 | // Requires consecutive Load (4 cycles) and ALU (3 cycles) pieces totaling 7 |
| 917 | // cycles. The Load and ALU operations cannot be done at the same time and so |
| 918 | // their latencies are added. |
| 919 | // Full 6 dispatches are required as this is a restricted instruction. |
| 920 | def : InstRW<[P9_LoadAndALU2Op_7C, IP_AGEN_1C, IP_EXEC_1C, |
| 921 | DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 922 | (instrs |
| 923 | LFSX, |
| 924 | LFS |
| 925 | )>; |
| 926 | |
| 927 | // Cracked Load instruction. |
| 928 | // Requires consecutive Load and ALU pieces totaling 8 cycles. The Load and ALU |
| 929 | // operations cannot be done at the same time and so their latencies are added. |
| 930 | // Full 4 dispatches are required as this is a cracked instruction. |
| 931 | def : InstRW<[P9_LoadAndALU2Op_8C, IP_AGEN_1C, IP_EXEC_1C, |
| 932 | DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 933 | (instrs |
| 934 | LXSSP, |
| 935 | LXSSPX, |
| 936 | XFLOADf32, |
| 937 | DFLOADf32 |
| 938 | )>; |
| 939 | |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame^] | 940 | // Cracked 3-Way Load Instruction |
| 941 | // Load with two ALU operations that depend on each other |
| 942 | def : InstRW<[P9_LoadAndALUOp_6C, P9_ALU_2C, IP_AGEN_1C, IP_EXEC_1C, IP_EXEC_1C, |
| 943 | DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 944 | (instrs |
| 945 | (instregex "LHAU(X)?(8)?$"), |
| 946 | LWAUX |
| 947 | )>; |
| 948 | |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 949 | // Cracked Load that requires the PM resource. |
| 950 | // Since the Load and the PM cannot be done at the same time the latencies are |
| 951 | // added. Requires 8 cycles. |
| 952 | // Since the PM requires the full superslice we need both EXECE, EXECO pipelines |
| 953 | // as well as 3 dispatches for the PM. The Load requires the remaining 2 |
| 954 | // dispatches. |
| 955 | def : InstRW<[P9_LoadAndPMOp_8C, IP_AGEN_1C, IP_EXECE_1C, IP_EXECO_1C, |
| 956 | DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 957 | (instrs |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame^] | 958 | LXVH8X, |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 959 | LXVDSX, |
| 960 | LXVW4X |
| 961 | )>; |
| 962 | |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 963 | // Single slice Restricted store operation. The restricted operation requires |
| 964 | // all three dispatches for the superslice. |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 965 | def : InstRW<[P9_LS_1C, IP_EXEC_1C, IP_AGEN_1C, DISP_1C, DISP_1C, DISP_1C], |
| 966 | (instrs |
Stefan Pintilie | 626b651 | 2018-02-23 20:37:10 +0000 | [diff] [blame] | 967 | (instregex "STF(S|D|IWX|SX|DX)$"), |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame^] | 968 | (instregex "STXS(D|DX|SPX|IWX|IBX|IHX|SP)(v)?$"), |
| 969 | (instregex "STW(8)?$"), |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 970 | DFSTOREf32, |
Tony Jiang | 438bf4a | 2017-11-20 14:38:30 +0000 | [diff] [blame] | 971 | DFSTOREf64, |
| 972 | XFSTOREf32, |
| 973 | XFSTOREf64, |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame^] | 974 | STIWX, |
| 975 | SLBIEG, |
| 976 | STMW, |
| 977 | STSWI, |
| 978 | TLBIE, |
| 979 | (instregex "ST(W|H|D)BRX$"), |
| 980 | (instregex "ST(B|H|D)(8)?$"), |
| 981 | (instregex "ST(B|W|H|D)(CI)?X(8)?$") |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 982 | )>; |
| 983 | |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 984 | // Store operation that requires the whole superslice. |
| 985 | def : InstRW<[P9_LS_1C, IP_EXECE_1C, IP_EXECO_1C, IP_AGEN_1C, |
| 986 | DISP_1C, DISP_1C, DISP_1C], |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 987 | (instrs |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame^] | 988 | (instregex "STVE(B|H|W)X$"), |
| 989 | (instregex "STVX(L)?$"), |
| 990 | (instregex "STXV(B16X|H8X|W4X|D2X|L|LL|X)?$") |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 991 | )>; |
| 992 | |
Stefan Pintilie | 626b651 | 2018-02-23 20:37:10 +0000 | [diff] [blame] | 993 | // Cracked instruction made up up two restriced stores. |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame^] | 994 | //def : InstRW<[P9_LS_1C, P9_LS_1C, IP_EXEC_1C, IP_EXEC_1C, IP_AGEN_1C, |
| 995 | // IP_AGEN_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 996 | // (instrs |
| 997 | // STFDEPX |
| 998 | //)>; |
| 999 | |
| 1000 | // 5 Cycle DIV operation. Only one DIV unit per superslice so we use the whole |
| 1001 | // superslice. That includes both exec pipelines (EXECO, EXECE) and all three |
| 1002 | // dispatches. |
| 1003 | def : InstRW<[P9_DIV_5C, IP_EXECE_1C, IP_EXECO_1C, DISP_1C, DISP_1C, DISP_1C], |
Stefan Pintilie | 626b651 | 2018-02-23 20:37:10 +0000 | [diff] [blame] | 1004 | (instrs |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame^] | 1005 | (instregex "MTCTR(8)?(loop)?$"), |
| 1006 | (instregex "MTLR(8)?$") |
Stefan Pintilie | 626b651 | 2018-02-23 20:37:10 +0000 | [diff] [blame] | 1007 | )>; |
| 1008 | |
| 1009 | // 12 Cycle DIV operation. Only one DIV unit per superslice so we use the whole |
| 1010 | // superslice. That includes both exec pipelines (EXECO, EXECE) and all three |
| 1011 | // dispatches. |
| 1012 | def : InstRW<[P9_DIV_12C, IP_EXECE_1C, IP_EXECO_1C, DISP_1C, DISP_1C, DISP_1C], |
| 1013 | (instrs |
Stefan Pintilie | e894e0f | 2018-03-01 16:16:08 +0000 | [diff] [blame] | 1014 | (instregex "M(T|F)VRSAVE(v)?$"), |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame^] | 1015 | (instregex "M(T|F)PMR$"), |
| 1016 | (instregex "M(T|F)TB(8)?$"), |
Stefan Pintilie | e894e0f | 2018-03-01 16:16:08 +0000 | [diff] [blame] | 1017 | (instregex "MF(SPR|CTR|LR)(8)?$"), |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame^] | 1018 | (instregex "M(T|F)MSR(D)?$"), |
| 1019 | (instregex "MTSPR(8)?$") |
Stefan Pintilie | 626b651 | 2018-02-23 20:37:10 +0000 | [diff] [blame] | 1020 | )>; |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 1021 | |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 1022 | // 16 Cycle DIV operation. Only one DIV unit per superslice so we use the whole |
| 1023 | // superslice. That includes both exec pipelines (EXECO, EXECE) and all three |
| 1024 | // dispatches. |
| 1025 | def : InstRW<[P9_DIV_16C_8, IP_EXECO_1C, IP_EXECE_1C, |
| 1026 | DISP_1C, DISP_1C, DISP_1C], |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 1027 | (instrs |
| 1028 | DIVW, |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 1029 | DIVWU, |
| 1030 | MODSW |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 1031 | )>; |
| 1032 | |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 1033 | // 24 Cycle DIV operation. Only one DIV unit per superslice so we use the whole |
| 1034 | // superslice. That includes both exec pipelines (EXECO, EXECE) and all three |
| 1035 | // dispatches. |
| 1036 | def : InstRW<[P9_DIV_24C_8, IP_EXECO_1C, IP_EXECE_1C, |
| 1037 | DISP_1C, DISP_1C, DISP_1C], |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 1038 | (instrs |
| 1039 | DIVWE, |
| 1040 | DIVD, |
| 1041 | DIVWEU, |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 1042 | DIVDU, |
| 1043 | MODSD, |
| 1044 | MODUD, |
| 1045 | MODUW |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 1046 | )>; |
| 1047 | |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 1048 | // 40 Cycle DIV operation. Only one DIV unit per superslice so we use the whole |
| 1049 | // superslice. That includes both exec pipelines (EXECO, EXECE) and all three |
| 1050 | // dispatches. |
| 1051 | def : InstRW<[P9_DIV_40C_8, IP_EXECO_1C, IP_EXECE_1C, |
| 1052 | DISP_1C, DISP_1C, DISP_1C], |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 1053 | (instrs |
| 1054 | DIVDE, |
| 1055 | DIVDEU |
| 1056 | )>; |
| 1057 | |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 1058 | // Cracked DIV and ALU operation. Requires one full slice for the ALU operation |
| 1059 | // and one full superslice for the DIV operation since there is only one DIV |
| 1060 | // per superslice. Latency of DIV plus ALU is 26. |
Stefan Pintilie | d45db61 | 2018-03-05 14:34:59 +0000 | [diff] [blame] | 1061 | def : InstRW<[P9_IntDivAndALUOp_18C_8, IP_EXECE_1C, IP_EXECO_1C, IP_EXEC_1C, |
| 1062 | DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 1063 | (instrs |
| 1064 | (instregex "DIVW(U)?(O)?o$") |
| 1065 | )>; |
| 1066 | |
| 1067 | // Cracked DIV and ALU operation. Requires one full slice for the ALU operation |
| 1068 | // and one full superslice for the DIV operation since there is only one DIV |
| 1069 | // per superslice. Latency of DIV plus ALU is 26. |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 1070 | def : InstRW<[P9_IntDivAndALUOp_26C_8, IP_EXECE_1C, IP_EXECO_1C, IP_EXEC_1C, |
| 1071 | DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 1072 | (instrs |
Stefan Pintilie | cc330da | 2017-10-10 13:45:35 +0000 | [diff] [blame] | 1073 | DIVDo, |
| 1074 | DIVDUo, |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 1075 | DIVWEo, |
| 1076 | DIVWEUo |
| 1077 | )>; |
| 1078 | |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 1079 | // Cracked DIV and ALU operation. Requires one full slice for the ALU operation |
| 1080 | // and one full superslice for the DIV operation since there is only one DIV |
| 1081 | // per superslice. Latency of DIV plus ALU is 42. |
| 1082 | def : InstRW<[P9_IntDivAndALUOp_42C_8, IP_EXECE_1C, IP_EXECO_1C, IP_EXEC_1C, |
| 1083 | DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 1084 | (instrs |
| 1085 | DIVDEo, |
| 1086 | DIVDEUo |
| 1087 | )>; |
| 1088 | |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 1089 | // CR access instructions in _BrMCR, IIC_BrMCRX. |
| 1090 | |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 1091 | // Cracked, restricted, ALU operations. |
| 1092 | // Here the two ALU ops can actually be done in parallel and therefore the |
| 1093 | // latencies are not added together. Otherwise this is like having two |
| 1094 | // instructions running together on two pipelines and 6 dispatches. |
| 1095 | // ALU ops are 2 cycles each. |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 1096 | def : InstRW<[P9_ALU_2C, P9_ALU_2C, IP_EXEC_1C, IP_EXEC_1C, |
| 1097 | DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 1098 | (instrs |
| 1099 | MTOCRF, |
| 1100 | MTOCRF8, |
| 1101 | MTCRF, |
| 1102 | MTCRF8 |
| 1103 | )>; |
| 1104 | |
Stefan Pintilie | e894e0f | 2018-03-01 16:16:08 +0000 | [diff] [blame] | 1105 | // Cracked ALU operations. |
| 1106 | // Here the two ALU ops can actually be done in parallel and therefore the |
| 1107 | // latencies are not added together. Otherwise this is like having two |
| 1108 | // instructions running together on two pipelines and 4 dispatches. |
| 1109 | // ALU ops are 2 cycles each. |
| 1110 | def : InstRW<[P9_ALU_2C, P9_ALU_2C, IP_EXEC_1C, IP_EXEC_1C, |
| 1111 | DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 1112 | (instrs |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame^] | 1113 | (instregex "ADDC(8)?o$"), |
| 1114 | (instregex "SUBFC(8)?o$") |
Stefan Pintilie | e894e0f | 2018-03-01 16:16:08 +0000 | [diff] [blame] | 1115 | )>; |
| 1116 | |
Stefan Pintilie | d45db61 | 2018-03-05 14:34:59 +0000 | [diff] [blame] | 1117 | // Cracked ALU operations. |
| 1118 | // Two ALU ops can be done in parallel. |
| 1119 | // One is three cycle ALU the ohter is a two cycle ALU. |
| 1120 | // One of the ALU ops is restricted the other is not so we have a total of |
| 1121 | // 5 dispatches. |
| 1122 | def : InstRW<[P9_ALU_2C, P9_ALU_3C, IP_EXEC_1C, IP_EXEC_1C, |
| 1123 | DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 1124 | (instrs |
| 1125 | (instregex "F(N)?ABS(D|S)o$"), |
| 1126 | (instregex "FCPSGN(D|S)o$"), |
| 1127 | (instregex "FNEG(D|S)o$"), |
| 1128 | FMRo |
| 1129 | )>; |
| 1130 | |
| 1131 | // Cracked ALU operations. |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 1132 | // Here the two ALU ops can actually be done in parallel and therefore the |
| 1133 | // latencies are not added together. Otherwise this is like having two |
Stefan Pintilie | d45db61 | 2018-03-05 14:34:59 +0000 | [diff] [blame] | 1134 | // instructions running together on two pipelines and 4 dispatches. |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 1135 | // ALU ops are 3 cycles each. |
| 1136 | def : InstRW<[P9_ALU_3C, P9_ALU_3C, IP_EXEC_1C, IP_EXEC_1C, |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 1137 | DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 1138 | (instrs |
| 1139 | MCRFS |
| 1140 | )>; |
| 1141 | |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame^] | 1142 | // Cracked Restricted ALU operations. |
| 1143 | // Here the two ALU ops can actually be done in parallel and therefore the |
| 1144 | // latencies are not added together. Otherwise this is like having two |
| 1145 | // instructions running together on two pipelines and 6 dispatches. |
| 1146 | // ALU ops are 3 cycles each. |
| 1147 | def : InstRW<[P9_ALU_3C, P9_ALU_3C, IP_EXEC_1C, IP_EXEC_1C, |
| 1148 | DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 1149 | (instrs |
| 1150 | (instregex "MTFSF(b|o)?$"), |
| 1151 | (instregex "MTFSFI(o)?$") |
| 1152 | )>; |
| 1153 | |
Stefan Pintilie | b5a9440 | 2018-03-02 14:41:38 +0000 | [diff] [blame] | 1154 | // Cracked instruction made of two ALU ops. |
| 1155 | // The two ops cannot be done in parallel. |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame^] | 1156 | // One of the ALU ops is restricted and takes 3 dispatches. |
Stefan Pintilie | 626b651 | 2018-02-23 20:37:10 +0000 | [diff] [blame] | 1157 | def : InstRW<[P9_ALUOpAndALUOp_4C, IP_EXEC_1C, IP_EXEC_1C, |
| 1158 | DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 1159 | (instrs |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame^] | 1160 | (instregex "RLD(I)?C(R|L)o$"), |
| 1161 | (instregex "RLW(IMI|INM|NM)(8)?o$"), |
| 1162 | (instregex "SLW(8)?o$"), |
| 1163 | (instregex "SRAW(I)?o$"), |
| 1164 | (instregex "SRW(8)?o$"), |
| 1165 | RLDICL_32o, |
| 1166 | RLDIMIo |
| 1167 | )>; |
| 1168 | |
| 1169 | // Cracked instruction made of two ALU ops. |
| 1170 | // The two ops cannot be done in parallel. |
| 1171 | // Both of the ALU ops are restricted and take 3 dispatches. |
| 1172 | def : InstRW<[P9_ALU2OpAndALU2Op_6C, IP_EXEC_1C, IP_EXEC_1C, |
| 1173 | DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 1174 | (instrs |
| 1175 | (instregex "MFFS(L|CE|o)?$") |
| 1176 | )>; |
| 1177 | |
| 1178 | def : InstRW<[P9_ALUOpAndALUOpAndALUOp_6C, IP_EXEC_1C, IP_EXEC_1C, IP_EXEC_1C, |
| 1179 | DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C, |
| 1180 | DISP_1C, DISP_1C], |
| 1181 | (instrs |
| 1182 | (instregex "MFCR(8)?$") |
Stefan Pintilie | 626b651 | 2018-02-23 20:37:10 +0000 | [diff] [blame] | 1183 | )>; |
| 1184 | |
Stefan Pintilie | b5a9440 | 2018-03-02 14:41:38 +0000 | [diff] [blame] | 1185 | // Cracked instruction made of two ALU ops. |
| 1186 | // The two ops cannot be done in parallel. |
| 1187 | def : InstRW<[P9_ALUOpAndALUOp_4C, IP_EXEC_1C, IP_EXEC_1C, |
| 1188 | DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 1189 | (instrs |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame^] | 1190 | (instregex "EXTSWSLIo$"), |
| 1191 | (instregex "SRAD(I)?o$"), |
| 1192 | SLDo, |
| 1193 | SRDo, |
| 1194 | RLDICo |
Stefan Pintilie | b5a9440 | 2018-03-02 14:41:38 +0000 | [diff] [blame] | 1195 | )>; |
| 1196 | |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 1197 | // FP Div instructions in IIC_FPDivD and IIC_FPDivS. |
| 1198 | |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 1199 | // 33 Cycle DP Instruction Restricted. Takes one slice and 3 dispatches. |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 1200 | def : InstRW<[P9_DP_33C_8, IP_EXEC_1C, DISP_1C, DISP_1C, DISP_1C], |
| 1201 | (instrs |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 1202 | FDIV |
| 1203 | )>; |
| 1204 | |
Stefan Pintilie | d45db61 | 2018-03-05 14:34:59 +0000 | [diff] [blame] | 1205 | // 33 Cycle DP Instruction Restricted and Cracked with 3 Cycle ALU. |
Stefan Pintilie | e894e0f | 2018-03-01 16:16:08 +0000 | [diff] [blame] | 1206 | def : InstRW<[P9_DPOpAndALU2Op_36C_8, IP_EXEC_1C, IP_EXEC_1C, |
Stefan Pintilie | cc330da | 2017-10-10 13:45:35 +0000 | [diff] [blame] | 1207 | DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 1208 | (instrs |
| 1209 | FDIVo |
| 1210 | )>; |
| 1211 | |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame^] | 1212 | // 36 Cycle DP Instruction. |
| 1213 | def : InstRW<[P9_DP_36C_10, IP_EXEC_1C, DISP_1C, DISP_1C], |
| 1214 | (instrs |
| 1215 | XSSQRTDP |
| 1216 | )>; |
| 1217 | |
Stefan Pintilie | d45db61 | 2018-03-05 14:34:59 +0000 | [diff] [blame] | 1218 | // 36 Cycle DP Instruction Restricted. Takes one slice and 3 dispatches. |
| 1219 | def : InstRW<[P9_DP_36C_10, IP_EXEC_1C, DISP_1C, DISP_1C, DISP_1C], |
| 1220 | (instrs |
| 1221 | FSQRT |
| 1222 | )>; |
| 1223 | |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame^] | 1224 | // 36 Cycle DP Vector Instruction. |
| 1225 | def : InstRW<[P9_DPE_36C_10, P9_DPO_36C_10, IP_EXECE_1C, IP_EXECO_1C, |
| 1226 | DISP_1C, DISP_1C, DISP_1C], |
| 1227 | (instrs |
| 1228 | XVSQRTDP |
| 1229 | )>; |
| 1230 | |
| 1231 | // 27 Cycle DP Vector Instruction. |
| 1232 | def : InstRW<[P9_DPE_27C_10, P9_DPO_27C_10, IP_EXECE_1C, IP_EXECO_1C, |
| 1233 | DISP_1C, DISP_1C, DISP_1C], |
| 1234 | (instrs |
| 1235 | XVSQRTSP |
| 1236 | )>; |
| 1237 | |
Stefan Pintilie | d45db61 | 2018-03-05 14:34:59 +0000 | [diff] [blame] | 1238 | // 36 Cycle DP Instruction Restricted and Cracked with 3 Cycle ALU. |
| 1239 | def : InstRW<[P9_DPOpAndALU2Op_39C_10, IP_EXEC_1C, IP_EXEC_1C, |
| 1240 | DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 1241 | (instrs |
| 1242 | FSQRTo |
| 1243 | )>; |
| 1244 | |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame^] | 1245 | // 26 Cycle DP Instruction. |
| 1246 | def : InstRW<[P9_DP_26C_5, IP_EXEC_1C, DISP_1C, DISP_1C], |
| 1247 | (instrs |
| 1248 | XSSQRTSP |
| 1249 | )>; |
| 1250 | |
Stefan Pintilie | d45db61 | 2018-03-05 14:34:59 +0000 | [diff] [blame] | 1251 | // 26 Cycle DP Instruction Restricted. Takes one slice and 3 dispatches. |
| 1252 | def : InstRW<[P9_DP_26C_5, IP_EXEC_1C, DISP_1C, DISP_1C, DISP_1C], |
| 1253 | (instrs |
| 1254 | FSQRTS |
| 1255 | )>; |
| 1256 | |
| 1257 | // 26 Cycle DP Instruction Restricted and Cracked with 3 Cycle ALU. |
| 1258 | def : InstRW<[P9_DPOpAndALU2Op_29C_5, IP_EXEC_1C, IP_EXEC_1C, |
| 1259 | DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 1260 | (instrs |
| 1261 | FSQRTSo |
| 1262 | )>; |
| 1263 | |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 1264 | // 33 Cycle DP Instruction. Takes one slice and 2 dispatches. |
| 1265 | def : InstRW<[P9_DP_33C_8, IP_EXEC_1C, DISP_1C, DISP_1C], |
| 1266 | (instrs |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 1267 | XSDIVDP |
| 1268 | )>; |
| 1269 | |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 1270 | // 22 Cycle DP Instruction Restricted. Takes one slice and 3 dispatches. |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 1271 | def : InstRW<[P9_DP_22C_5, IP_EXEC_1C, DISP_1C, DISP_1C, DISP_1C], |
| 1272 | (instrs |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 1273 | FDIVS |
| 1274 | )>; |
| 1275 | |
Stefan Pintilie | cc330da | 2017-10-10 13:45:35 +0000 | [diff] [blame] | 1276 | // 22 Cycle DP Instruction Restricted and Cracked with 2 Cycle ALU. |
Stefan Pintilie | e894e0f | 2018-03-01 16:16:08 +0000 | [diff] [blame] | 1277 | def : InstRW<[P9_DPOpAndALU2Op_25C_5, IP_EXEC_1C, IP_EXEC_1C, |
Stefan Pintilie | cc330da | 2017-10-10 13:45:35 +0000 | [diff] [blame] | 1278 | DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 1279 | (instrs |
| 1280 | FDIVSo |
| 1281 | )>; |
| 1282 | |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 1283 | // 22 Cycle DP Instruction. Takes one slice and 2 dispatches. |
| 1284 | def : InstRW<[P9_DP_22C_5, IP_EXEC_1C, DISP_1C, DISP_1C], |
| 1285 | (instrs |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 1286 | XSDIVSP |
| 1287 | )>; |
| 1288 | |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 1289 | // 24 Cycle DP Vector Instruction. Takes one full superslice. |
| 1290 | // Includes both EXECE, EXECO pipelines and all 3 dispatches for the given |
| 1291 | // superslice. |
| 1292 | def : InstRW<[P9_DPE_24C_8, P9_DPO_24C_8, IP_EXECE_1C, IP_EXECO_1C, |
| 1293 | DISP_1C, DISP_1C, DISP_1C], |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 1294 | (instrs |
| 1295 | XVDIVSP |
| 1296 | )>; |
| 1297 | |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 1298 | // 33 Cycle DP Vector Instruction. Takes one full superslice. |
| 1299 | // Includes both EXECE, EXECO pipelines and all 3 dispatches for the given |
| 1300 | // superslice. |
| 1301 | def : InstRW<[P9_DPE_33C_8, P9_DPO_33C_8, IP_EXECE_1C, IP_EXECO_1C, |
| 1302 | DISP_1C, DISP_1C, DISP_1C], |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 1303 | (instrs |
| 1304 | XVDIVDP |
| 1305 | )>; |
| 1306 | |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 1307 | // Load instructions in IIC_LdStLFDU and IIC_LdStLFDUX. |
| 1308 | |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 1309 | // Instruction cracked into three pieces. One Load and two ALU operations. |
| 1310 | // The Load and one of the ALU ops cannot be run at the same time and so the |
| 1311 | // latencies are added together for 6 cycles. The remainaing ALU is 2 cycles. |
| 1312 | // Both the load and the ALU that depends on it are restricted and so they take |
| 1313 | // a total of 6 dispatches. The final 2 dispatches come from the second ALU op. |
| 1314 | // The two EXEC pipelines are for the 2 ALUs while the AGEN is for the load. |
Stefan Pintilie | e894e0f | 2018-03-01 16:16:08 +0000 | [diff] [blame] | 1315 | def : InstRW<[P9_LoadAndALU2Op_7C, P9_ALU_2C, |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 1316 | IP_AGEN_1C, IP_EXEC_1C, IP_EXEC_1C, |
| 1317 | DISP_1C, DISP_1C, DISP_1C, DISP_1C, |
| 1318 | DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 1319 | (instrs |
Stefan Pintilie | 626b651 | 2018-02-23 20:37:10 +0000 | [diff] [blame] | 1320 | (instregex "LF(SU|SUX)$") |
| 1321 | )>; |
| 1322 | |
| 1323 | // Cracked instruction made up of a Store and an ALU. The ALU does not depend on |
| 1324 | // the store and so it can be run at the same time as the store. The store is |
| 1325 | // also restricted. |
| 1326 | def : InstRW<[P9_LS_1C, P9_ALU_2C, IP_AGEN_1C, IP_EXEC_1C, IP_EXEC_1C, |
| 1327 | DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 1328 | (instrs |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame^] | 1329 | (instregex "STF(S|D)U(X)?$"), |
| 1330 | (instregex "ST(B|H|W|D)U(X)?(8)?$") |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 1331 | )>; |
| 1332 | |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 1333 | // Cracked instruction made up of a Load and an ALU. The ALU does not depend on |
Stefan Pintilie | d45db61 | 2018-03-05 14:34:59 +0000 | [diff] [blame] | 1334 | // the load and so it can be run at the same time as the load. |
| 1335 | def : InstRW<[P9_LS_4C, P9_ALU_2C, IP_AGEN_1C, IP_EXEC_1C, |
| 1336 | DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 1337 | (instrs |
| 1338 | (instregex "LBZU(X)?(8)?$"), |
| 1339 | (instregex "LDU(X)?$") |
| 1340 | )>; |
| 1341 | |
| 1342 | |
| 1343 | // Cracked instruction made up of a Load and an ALU. The ALU does not depend on |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 1344 | // the load and so it can be run at the same time as the load. The load is also |
| 1345 | // restricted. 3 dispatches are from the restricted load while the other two |
| 1346 | // are from the ALU. The AGEN pipeline is from the load and the EXEC pipeline |
| 1347 | // is required for the ALU. |
| 1348 | def : InstRW<[P9_LS_4C, P9_ALU_2C, IP_AGEN_1C, IP_EXEC_1C, |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 1349 | DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 1350 | (instrs |
Stefan Pintilie | 626b651 | 2018-02-23 20:37:10 +0000 | [diff] [blame] | 1351 | (instregex "LF(DU|DUX)$") |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 1352 | )>; |
| 1353 | |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 1354 | // Crypto Instructions |
| 1355 | |
| 1356 | // 6 Cycle CY operation. Only one CY unit per CPU so we use a whole |
| 1357 | // superslice. That includes both exec pipelines (EXECO, EXECE) and all three |
| 1358 | // dispatches. |
| 1359 | def : InstRW<[P9_CY_6C, IP_EXECO_1C, IP_EXECE_1C, DISP_1C, DISP_1C, DISP_1C], |
| 1360 | (instrs |
Stefan Pintilie | e894e0f | 2018-03-01 16:16:08 +0000 | [diff] [blame] | 1361 | (instregex "VPMSUM(B|H|W|D)$"), |
| 1362 | (instregex "V(N)?CIPHER(LAST)?$"), |
| 1363 | VSBOX |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 1364 | )>; |
Stefan Pintilie | 626b651 | 2018-02-23 20:37:10 +0000 | [diff] [blame] | 1365 | |
Stefan Pintilie | e894e0f | 2018-03-01 16:16:08 +0000 | [diff] [blame] | 1366 | // Branch Instructions |
| 1367 | |
| 1368 | // Two Cycle Branch |
| 1369 | def : InstRW<[P9_BR_2C, DISP_1C, DISP_1C], |
| 1370 | (instrs |
| 1371 | (instregex "BCCCTR(L)?(8)?$"), |
| 1372 | (instregex "BCCL(A|R|RL)?$"), |
| 1373 | (instregex "BCCTR(L)?(8)?(n)?$"), |
| 1374 | (instregex "BD(N)?Z(8|A|Am|Ap|m|p)?$"), |
| 1375 | (instregex "BD(N)?ZL(A|Am|Ap|R|R8|RL|RLm|RLp|Rm|Rp|m|p)?$"), |
| 1376 | (instregex "BL(_TLS)?$"), |
| 1377 | (instregex "BL8(_TLS|_NOP|_NOP_TLS|_TLS_)?$"), |
| 1378 | (instregex "BLA(8|8_NOP)?$"), |
| 1379 | (instregex "BLR(8|L)?$"), |
| 1380 | (instregex "TAILB(A)?(8)?$"), |
| 1381 | (instregex "TAILBCTR(8)?$"), |
| 1382 | (instregex "gBC(A|Aat|CTR|CTRL|L|LA|LAat|LR|LRL|Lat|at)?$"), |
| 1383 | (instregex "BCLR(L)?(n)?$"), |
| 1384 | (instregex "BCTR(L)?(8)?$"), |
| 1385 | B, |
| 1386 | BA, |
| 1387 | BC, |
| 1388 | BCC, |
| 1389 | BCCA, |
| 1390 | BCL, |
| 1391 | BCLalways, |
| 1392 | BCLn, |
| 1393 | BCTRL8_LDinto_toc, |
| 1394 | BCn, |
| 1395 | CTRL_DEP |
| 1396 | )>; |
| 1397 | |
| 1398 | // Five Cycle Branch with a 2 Cycle ALU Op |
| 1399 | // Operations must be done consecutively and not in parallel. |
| 1400 | def : InstRW<[P9_BROpAndALUOp_7C, IP_EXEC_1C, |
| 1401 | DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 1402 | (instrs |
| 1403 | ADDPCIS |
| 1404 | )>; |
| 1405 | |
Stefan Pintilie | d45db61 | 2018-03-05 14:34:59 +0000 | [diff] [blame] | 1406 | // Special Extracted Instructions |
| 1407 | |
| 1408 | // Atomic Load |
| 1409 | def : InstRW<[P9_LS_1C, P9_LS_1C, P9_LS_4C, P9_LS_4C, P9_LS_4C, |
| 1410 | IP_EXEC_1C, IP_EXEC_1C, IP_AGEN_1C, IP_AGEN_1C, IP_AGEN_1C, |
| 1411 | IP_AGEN_1C, IP_AGEN_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C, |
| 1412 | DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C, |
| 1413 | DISP_1C], |
| 1414 | (instrs |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame^] | 1415 | (instregex "L(D|W)AT$") |
| 1416 | )>; |
| 1417 | |
| 1418 | // Atomic Store |
| 1419 | def : InstRW<[P9_LS_1C, P9_LS_4C, P9_LS_4C, IP_EXEC_1C, IP_AGEN_1C, IP_AGEN_1C, |
| 1420 | IP_AGEN_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C, |
| 1421 | DISP_1C], |
| 1422 | (instrs |
| 1423 | (instregex "ST(D|W)AT$") |
Stefan Pintilie | d45db61 | 2018-03-05 14:34:59 +0000 | [diff] [blame] | 1424 | )>; |
| 1425 | |
Stefan Pintilie | b5a9440 | 2018-03-02 14:41:38 +0000 | [diff] [blame] | 1426 | // Signal Processing Engine (SPE) Instructions |
| 1427 | // These instructions are not supported on Power 9 |
| 1428 | def : InstRW<[], |
| 1429 | (instrs |
| 1430 | BRINC, |
| 1431 | EVABS, |
| 1432 | EVEQV, |
| 1433 | EVMRA, |
| 1434 | EVNAND, |
| 1435 | EVNEG, |
| 1436 | (instregex "EVADD(I)?W$"), |
| 1437 | (instregex "EVADD(SM|SS|UM|US)IAAW$"), |
| 1438 | (instregex "EVAND(C)?$"), |
| 1439 | (instregex "EVCMP(EQ|GTS|GTU|LTS|LTU)$"), |
| 1440 | (instregex "EVCNTL(S|Z)W$"), |
| 1441 | (instregex "EVDIVW(S|U)$"), |
| 1442 | (instregex "EVEXTS(B|H)$"), |
| 1443 | (instregex "EVLD(H|W|D)(X)?$"), |
| 1444 | (instregex "EVLHH(E|OS|OU)SPLAT(X)?$"), |
| 1445 | (instregex "EVLWHE(X)?$"), |
| 1446 | (instregex "EVLWHO(S|U)(X)?$"), |
| 1447 | (instregex "EVLW(H|W)SPLAT(X)?$"), |
| 1448 | (instregex "EVMERGE(HI|LO|HILO|LOHI)$"), |
| 1449 | (instregex "EVMHEG(S|U)M(F|I)A(A|N)$"), |
| 1450 | (instregex "EVMHES(M|S)(F|I)(A|AA|AAW|ANW)?$"), |
| 1451 | (instregex "EVMHEU(M|S)I(A|AA|AAW|ANW)?$"), |
| 1452 | (instregex "EVMHOG(U|S)M(F|I)A(A|N)$"), |
| 1453 | (instregex "EVMHOS(M|S)(F|I)(A|AA|AAW|ANW)?$"), |
| 1454 | (instregex "EVMHOU(M|S)I(A|AA|ANW|AAW)?$"), |
| 1455 | (instregex "EVMWHS(M|S)(F|FA|I|IA)$"), |
| 1456 | (instregex "EVMWHUMI(A)?$"), |
| 1457 | (instregex "EVMWLS(M|S)IA(A|N)W$"), |
| 1458 | (instregex "EVMWLU(M|S)I(A|AA|AAW|ANW)?$"), |
| 1459 | (instregex "EVMWSM(F|I)(A|AA|AN)?$"), |
| 1460 | (instregex "EVMWSSF(A|AA|AN)?$"), |
| 1461 | (instregex "EVMWUMI(A|AA|AN)?$"), |
| 1462 | (instregex "EV(N|X)?OR(C)?$"), |
| 1463 | (instregex "EVR(LW|LWI|NDW)$"), |
| 1464 | (instregex "EVSLW(I)?$"), |
| 1465 | (instregex "EVSPLAT(F)?I$"), |
| 1466 | (instregex "EVSRW(I)?(S|U)$"), |
| 1467 | (instregex "EVST(DD|DH|DW|WHE|WHO|WWE|WWO)(X)?$"), |
| 1468 | (instregex "EVSUBF(S|U)(M|S)IAAW$"), |
| 1469 | (instregex "EVSUB(I)?FW$") |
| 1470 | )> { let Unsupported = 1; } |
Stefan Pintilie | e894e0f | 2018-03-01 16:16:08 +0000 | [diff] [blame] | 1471 | |
Stefan Pintilie | b5a9440 | 2018-03-02 14:41:38 +0000 | [diff] [blame] | 1472 | // General Instructions without scheduling support. |
Stefan Pintilie | 626b651 | 2018-02-23 20:37:10 +0000 | [diff] [blame] | 1473 | def : InstRW<[], |
| 1474 | (instrs |
Stefan Pintilie | e894e0f | 2018-03-01 16:16:08 +0000 | [diff] [blame] | 1475 | (instregex "(H)?RFI(D)?$"), |
Stefan Pintilie | d45db61 | 2018-03-05 14:34:59 +0000 | [diff] [blame] | 1476 | (instregex "DSS(ALL)?$"), |
| 1477 | (instregex "DST(ST)?(T)?(64)?$"), |
| 1478 | (instregex "ICBL(C|Q)$"), |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame^] | 1479 | (instregex "L(W|H|B)EPX$"), |
| 1480 | (instregex "ST(W|H|B)EPX$"), |
| 1481 | (instregex "(L|ST)FDEPX$"), |
| 1482 | (instregex "M(T|F)SR(IN)?$"), |
| 1483 | (instregex "M(T|F)DCR$"), |
| 1484 | (instregex "NOP_GT_PWR(6|7)$"), |
| 1485 | (instregex "TLB(IA|IVAX|SX|SX2|SX2D|LD|LI|RE|RE2|WE|WE2)$"), |
| 1486 | (instregex "WRTEE(I)?$"), |
Stefan Pintilie | e894e0f | 2018-03-01 16:16:08 +0000 | [diff] [blame] | 1487 | ATTN, |
Stefan Pintilie | e894e0f | 2018-03-01 16:16:08 +0000 | [diff] [blame] | 1488 | CLRBHRB, |
| 1489 | MFBHRBE, |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame^] | 1490 | MBAR, |
| 1491 | MSYNC, |
| 1492 | SLBSYNC, |
Stefan Pintilie | e894e0f | 2018-03-01 16:16:08 +0000 | [diff] [blame] | 1493 | NAP, |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame^] | 1494 | STOP, |
| 1495 | TRAP, |
| 1496 | LDMX, |
Stefan Pintilie | e894e0f | 2018-03-01 16:16:08 +0000 | [diff] [blame] | 1497 | RFCI, |
| 1498 | RFDI, |
| 1499 | RFMCI, |
| 1500 | SC, |
Stefan Pintilie | d45db61 | 2018-03-05 14:34:59 +0000 | [diff] [blame] | 1501 | WAIT, |
| 1502 | DCBA, |
| 1503 | DCBI, |
| 1504 | DCCCI, |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame^] | 1505 | ICCCI |
Stefan Pintilie | 626b651 | 2018-02-23 20:37:10 +0000 | [diff] [blame] | 1506 | )> { let Unsupported = 1; } |