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