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, |
| 518 | XSCVDPSPN |
| 519 | )>; |
| 520 | |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 521 | // Three Cycle PM operation. Only one PM unit per superslice so we use the whole |
| 522 | // superslice. That includes both exec pipelines (EXECO, EXECE) and all three |
| 523 | // dispatches. |
| 524 | 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] | 525 | (instrs |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame] | 526 | (instregex "LVS(L|R)$"), |
| 527 | (instregex "VSPLTIS(W|H|B)$"), |
| 528 | (instregex "VSPLT(W|H|B)(s)?$"), |
| 529 | (instregex "V_SETALLONES(B|H)?$"), |
| 530 | (instregex "VEXTRACTU(B|H|W)$"), |
Stefan Pintilie | 735817a | 2018-03-09 21:08:35 +0000 | [diff] [blame] | 531 | (instregex "VINSERT(B|H|W|D)$"), |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame] | 532 | MFVSRLD, |
| 533 | MTVSRWS, |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 534 | VBPERMQ, |
| 535 | VCLZLSBB, |
| 536 | VCTZLSBB, |
| 537 | VEXTRACTD, |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 538 | VEXTUBLX, |
| 539 | VEXTUBRX, |
| 540 | VEXTUHLX, |
| 541 | VEXTUHRX, |
| 542 | VEXTUWLX, |
| 543 | VEXTUWRX, |
| 544 | VGBBD, |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 545 | VMRGHB, |
| 546 | VMRGHH, |
| 547 | VMRGHW, |
| 548 | VMRGLB, |
| 549 | VMRGLH, |
| 550 | VMRGLW, |
| 551 | VPERM, |
| 552 | VPERMR, |
| 553 | VPERMXOR, |
| 554 | VPKPX, |
| 555 | VPKSDSS, |
| 556 | VPKSDUS, |
| 557 | VPKSHSS, |
| 558 | VPKSHUS, |
| 559 | VPKSWSS, |
| 560 | VPKSWUS, |
| 561 | VPKUDUM, |
| 562 | VPKUDUS, |
| 563 | VPKUHUM, |
| 564 | VPKUHUS, |
| 565 | VPKUWUM, |
| 566 | VPKUWUS, |
| 567 | VPRTYBQ, |
| 568 | VSL, |
| 569 | VSLDOI, |
| 570 | VSLO, |
| 571 | VSLV, |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 572 | VSR, |
| 573 | VSRO, |
| 574 | VSRV, |
| 575 | VUPKHPX, |
| 576 | VUPKHSB, |
| 577 | VUPKHSH, |
| 578 | VUPKHSW, |
| 579 | VUPKLPX, |
| 580 | VUPKLSB, |
| 581 | VUPKLSH, |
| 582 | VUPKLSW, |
| 583 | XXBRD, |
| 584 | XXBRH, |
| 585 | XXBRQ, |
| 586 | XXBRW, |
| 587 | XXEXTRACTUW, |
| 588 | XXINSERTW, |
| 589 | XXMRGHW, |
| 590 | XXMRGLW, |
| 591 | XXPERM, |
| 592 | XXPERMR, |
| 593 | XXSLDWI, |
| 594 | XXSPLTIB, |
| 595 | XXSPLTW, |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 596 | XXSPLTWs, |
| 597 | XXPERMDI, |
| 598 | XXPERMDIs, |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 599 | VADDCUQ, |
| 600 | VADDECUQ, |
| 601 | VADDEUQM, |
| 602 | VADDUQM, |
| 603 | VMUL10CUQ, |
| 604 | VMUL10ECUQ, |
| 605 | VMUL10EUQ, |
| 606 | VMUL10UQ, |
| 607 | VSUBCUQ, |
| 608 | VSUBECUQ, |
| 609 | VSUBEUQM, |
| 610 | VSUBUQM, |
| 611 | XSCMPEXPQP, |
| 612 | XSCMPOQP, |
| 613 | XSCMPUQP, |
| 614 | XSTSTDCQP, |
Stefan Pintilie | e894e0f | 2018-03-01 16:16:08 +0000 | [diff] [blame] | 615 | XSXSIGQP, |
| 616 | BCDCFNo, |
| 617 | BCDCFZo, |
| 618 | BCDCPSGNo, |
| 619 | BCDCTNo, |
| 620 | BCDCTZo, |
| 621 | BCDSETSGNo, |
| 622 | BCDSo, |
| 623 | BCDTRUNCo, |
| 624 | BCDUSo, |
| 625 | BCDUTRUNCo |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 626 | )>; |
| 627 | |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 628 | // 12 Cycle DFU operation. Only one DFU unit per CPU so we use a whole |
| 629 | // superslice. That includes both exec pipelines (EXECO, EXECE) and all three |
| 630 | // dispatches. |
| 631 | 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] | 632 | (instrs |
Stefan Pintilie | e894e0f | 2018-03-01 16:16:08 +0000 | [diff] [blame] | 633 | BCDSRo, |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 634 | XSADDQP, |
| 635 | XSADDQPO, |
| 636 | XSCVDPQP, |
| 637 | XSCVQPDP, |
| 638 | XSCVQPDPO, |
| 639 | XSCVQPSDZ, |
| 640 | XSCVQPSWZ, |
| 641 | XSCVQPUDZ, |
| 642 | XSCVQPUWZ, |
| 643 | XSCVSDQP, |
| 644 | XSCVUDQP, |
| 645 | XSRQPI, |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame] | 646 | XSRQPIX, |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 647 | XSRQPXP, |
| 648 | XSSUBQP, |
| 649 | XSSUBQPO |
| 650 | )>; |
| 651 | |
Stefan Pintilie | e894e0f | 2018-03-01 16:16:08 +0000 | [diff] [blame] | 652 | // 23 Cycle DFU operation. Only one DFU unit per CPU so we use a whole |
| 653 | // superslice. That includes both exec pipelines (EXECO, EXECE) and all three |
| 654 | // dispatches. |
| 655 | def : InstRW<[P9_DFU_23C, IP_EXECE_1C, IP_EXECO_1C, DISP_1C, DISP_1C, DISP_1C], |
| 656 | (instrs |
| 657 | BCDCTSQo |
| 658 | )>; |
| 659 | |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 660 | // 24 Cycle DFU operation. Only one DFU unit per CPU so we use a whole |
| 661 | // superslice. That includes both exec pipelines (EXECO, EXECE) and all three |
| 662 | // dispatches. |
| 663 | 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] | 664 | (instrs |
| 665 | XSMADDQP, |
| 666 | XSMADDQPO, |
| 667 | XSMSUBQP, |
| 668 | XSMSUBQPO, |
| 669 | XSMULQP, |
| 670 | XSMULQPO, |
| 671 | XSNMADDQP, |
| 672 | XSNMADDQPO, |
| 673 | XSNMSUBQP, |
| 674 | XSNMSUBQPO |
| 675 | )>; |
| 676 | |
Stefan Pintilie | e894e0f | 2018-03-01 16:16:08 +0000 | [diff] [blame] | 677 | // 37 Cycle DFU operation. Only one DFU unit per CPU so we use a whole |
| 678 | // superslice. That includes both exec pipelines (EXECO, EXECE) and all three |
| 679 | // dispatches. |
| 680 | def : InstRW<[P9_DFU_37C, IP_EXECE_1C, IP_EXECO_1C, DISP_1C, DISP_1C, DISP_1C], |
| 681 | (instrs |
| 682 | BCDCFSQo |
| 683 | )>; |
| 684 | |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 685 | // 58 Cycle DFU operation. Only one DFU unit per CPU so we use a whole |
| 686 | // superslice. That includes both exec pipelines (EXECO, EXECE) and all three |
| 687 | // dispatches. |
| 688 | 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] | 689 | (instrs |
| 690 | XSDIVQP, |
| 691 | XSDIVQPO |
| 692 | )>; |
| 693 | |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 694 | // 76 Cycle DFU operation. Only one DFU unit per CPU so we use a whole |
| 695 | // superslice. That includes both exec pipelines (EXECO, EXECE) and all three |
| 696 | // dispatches. |
| 697 | 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] | 698 | (instrs |
| 699 | XSSQRTQP, |
| 700 | XSSQRTQPO |
| 701 | )>; |
| 702 | |
Stefan Pintilie | 735817a | 2018-03-09 21:08:35 +0000 | [diff] [blame] | 703 | // 6 Cycle Load uses a single slice. |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame] | 704 | def : InstRW<[P9_LS_6C, IP_AGEN_1C, DISP_1C, DISP_1C], |
| 705 | (instrs |
| 706 | (instregex "LXVL(L)?") |
| 707 | )>; |
| 708 | |
Stefan Pintilie | 735817a | 2018-03-09 21:08:35 +0000 | [diff] [blame] | 709 | // 5 Cycle Load uses a single slice. |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 710 | def : InstRW<[P9_LS_5C, IP_AGEN_1C, DISP_1C, DISP_1C], |
| 711 | (instrs |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame] | 712 | (instregex "LVE(B|H|W)X$"), |
| 713 | (instregex "LVX(L)?"), |
| 714 | (instregex "LXSI(B|H)ZX$"), |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 715 | LXSDX, |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame] | 716 | LXVB16X, |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 717 | LXVD2X, |
Stefan Pintilie | e894e0f | 2018-03-01 16:16:08 +0000 | [diff] [blame] | 718 | LXVWSX, |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 719 | LXSIWZX, |
| 720 | LXV, |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 721 | LXVX, |
| 722 | LXSD, |
Tony Jiang | 438bf4a | 2017-11-20 14:38:30 +0000 | [diff] [blame] | 723 | DFLOADf64, |
Stefan Pintilie | 626b651 | 2018-02-23 20:37:10 +0000 | [diff] [blame] | 724 | XFLOADf64, |
| 725 | LIWZX |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 726 | )>; |
| 727 | |
Stefan Pintilie | 735817a | 2018-03-09 21:08:35 +0000 | [diff] [blame] | 728 | // 4 Cycle Load uses a single slice. |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 729 | def : InstRW<[P9_LS_4C, IP_AGEN_1C, DISP_1C, DISP_1C], |
| 730 | (instrs |
Stefan Pintilie | d45db61 | 2018-03-05 14:34:59 +0000 | [diff] [blame] | 731 | (instregex "DCB(F|T|ST)(EP)?$"), |
| 732 | (instregex "DCBZ(L)?(EP)?$"), |
| 733 | (instregex "DCBTST(EP)?$"), |
| 734 | (instregex "CP_COPY(8)?$"), |
| 735 | (instregex "CP_PASTE(8)?$"), |
| 736 | (instregex "ICBI(EP)?$"), |
| 737 | (instregex "ICBT(LS)?$"), |
| 738 | (instregex "LBARX(L)?$"), |
Zaara Syeda | 6f3df02 | 2018-05-28 15:27:58 +0000 | [diff] [blame^] | 739 | (instregex "LBZ(CIX|8|X|X8|XTLS|XTLS_32)?(_)?$"), |
| 740 | (instregex "LD(ARX|ARXL|BRX|CIX|X|XTLS)?(_)?$"), |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame] | 741 | (instregex "LH(A|B)RX(L)?(8)?$"), |
Zaara Syeda | 6f3df02 | 2018-05-28 15:27:58 +0000 | [diff] [blame^] | 742 | (instregex "LHZ(8|CIX|X|X8|XTLS|XTLS_32)?(_)?$"), |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame] | 743 | (instregex "LWARX(L)?$"), |
| 744 | (instregex "LWBRX(8)?$"), |
Zaara Syeda | 6f3df02 | 2018-05-28 15:27:58 +0000 | [diff] [blame^] | 745 | (instregex "LWZ(8|CIX|X|X8|XTLS|XTLS_32)?(_)?$"), |
Stefan Pintilie | 735817a | 2018-03-09 21:08:35 +0000 | [diff] [blame] | 746 | CP_ABORT, |
| 747 | DARN, |
| 748 | EnforceIEIO, |
| 749 | ISYNC, |
| 750 | MSGSYNC, |
| 751 | TLBSYNC, |
| 752 | SYNC, |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame] | 753 | LMW, |
| 754 | LSWI |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 755 | )>; |
| 756 | |
| 757 | // 4 Cycle Restricted load uses a single slice but the dispatch for the whole |
| 758 | // superslice. |
| 759 | 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] | 760 | (instrs |
| 761 | LFIWZX, |
| 762 | LFDX, |
| 763 | LFD |
| 764 | )>; |
| 765 | |
Stefan Pintilie | 735817a | 2018-03-09 21:08:35 +0000 | [diff] [blame] | 766 | // Cracked Load Instructions. |
| 767 | // Load instructions that can be done in parallel. |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame] | 768 | def : InstRW<[P9_LS_4C, P9_LS_4C, IP_AGEN_1C, IP_AGEN_1C, |
| 769 | DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 770 | (instrs |
| 771 | SLBIA, |
| 772 | SLBIE, |
| 773 | SLBMFEE, |
| 774 | SLBMFEV, |
| 775 | SLBMTE, |
| 776 | TLBIEL |
| 777 | )>; |
| 778 | |
Stefan Pintilie | 735817a | 2018-03-09 21:08:35 +0000 | [diff] [blame] | 779 | // Cracked Load Instruction. |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame] | 780 | // Requires Load and ALU pieces totaling 6 cycles. The Load and ALU |
| 781 | // operations can be run in parallel. |
| 782 | def : InstRW<[P9_LS_4C, P9_ALU_2C, IP_EXEC_1C, IP_AGEN_1C, |
| 783 | DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 784 | (instrs |
| 785 | (instregex "L(W|H)ZU(X)?(8)?$"), |
| 786 | TEND |
| 787 | )>; |
| 788 | |
Stefan Pintilie | 735817a | 2018-03-09 21:08:35 +0000 | [diff] [blame] | 789 | // Cracked Store Instruction |
| 790 | // Consecutive Store and ALU instructions. The store is restricted and requires |
| 791 | // three dispatches. |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame] | 792 | def : InstRW<[P9_StoreAndALUOp_3C, IP_EXEC_1C, IP_EXEC_1C, IP_AGEN_1C, |
| 793 | DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 794 | (instrs |
| 795 | (instregex "ST(B|H|W|D)CX$") |
| 796 | )>; |
| 797 | |
Stefan Pintilie | 735817a | 2018-03-09 21:08:35 +0000 | [diff] [blame] | 798 | // Cracked Load Instruction. |
| 799 | // Two consecutive load operations for a total of 8 cycles. |
| 800 | def : InstRW<[P9_LoadAndLoadOp_8C, IP_AGEN_1C, IP_AGEN_1C, |
| 801 | DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 802 | (instrs |
| 803 | LDMX |
| 804 | )>; |
| 805 | |
Stefan Pintilie | d45db61 | 2018-03-05 14:34:59 +0000 | [diff] [blame] | 806 | // Cracked Load instruction. |
| 807 | // Requires consecutive Load and ALU pieces totaling 6 cycles. The Load and ALU |
| 808 | // operations cannot be done at the same time and so their latencies are added. |
| 809 | def : InstRW<[P9_LoadAndALUOp_6C, IP_EXEC_1C, IP_AGEN_1C, |
| 810 | DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 811 | (instrs |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame] | 812 | (instregex "LHA(X)?(8)?$"), |
| 813 | (instregex "CP_PASTE(8)?o$"), |
| 814 | (instregex "LWA(X)?(_32)?$"), |
| 815 | TCHECK |
Stefan Pintilie | d45db61 | 2018-03-05 14:34:59 +0000 | [diff] [blame] | 816 | )>; |
| 817 | |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 818 | // Cracked Restricted Load instruction. |
| 819 | // Requires consecutive Load and ALU pieces totaling 6 cycles. The Load and ALU |
| 820 | // operations cannot be done at the same time and so their latencies are added. |
| 821 | // Full 6 dispatches are required as this is both cracked and restricted. |
| 822 | def : InstRW<[P9_LoadAndALUOp_6C, IP_EXEC_1C, IP_AGEN_1C, |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 823 | DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 824 | (instrs |
Stefan Pintilie | e894e0f | 2018-03-01 16:16:08 +0000 | [diff] [blame] | 825 | LFIWAX |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 826 | )>; |
| 827 | |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 828 | // Cracked Load instruction. |
| 829 | // Requires consecutive Load and ALU pieces totaling 7 cycles. The Load and ALU |
| 830 | // operations cannot be done at the same time and so their latencies are added. |
| 831 | // Full 4 dispatches are required as this is a cracked instruction. |
| 832 | def : InstRW<[P9_LoadAndALUOp_7C, IP_AGEN_1C, IP_EXEC_1C, |
| 833 | DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 834 | (instrs |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 835 | LXSIWAX, |
Stefan Pintilie | 626b651 | 2018-02-23 20:37:10 +0000 | [diff] [blame] | 836 | LIWAX |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 837 | )>; |
| 838 | |
Stefan Pintilie | e894e0f | 2018-03-01 16:16:08 +0000 | [diff] [blame] | 839 | // Cracked Load instruction. |
| 840 | // Requires consecutive Load (4 cycles) and ALU (3 cycles) pieces totaling 7 |
| 841 | // cycles. The Load and ALU operations cannot be done at the same time and so |
| 842 | // their latencies are added. |
| 843 | // Full 6 dispatches are required as this is a restricted instruction. |
| 844 | def : InstRW<[P9_LoadAndALU2Op_7C, IP_AGEN_1C, IP_EXEC_1C, |
| 845 | DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 846 | (instrs |
| 847 | LFSX, |
| 848 | LFS |
| 849 | )>; |
| 850 | |
| 851 | // Cracked Load instruction. |
| 852 | // Requires consecutive Load and ALU pieces totaling 8 cycles. The Load and ALU |
| 853 | // operations cannot be done at the same time and so their latencies are added. |
| 854 | // Full 4 dispatches are required as this is a cracked instruction. |
| 855 | def : InstRW<[P9_LoadAndALU2Op_8C, IP_AGEN_1C, IP_EXEC_1C, |
| 856 | DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 857 | (instrs |
| 858 | LXSSP, |
| 859 | LXSSPX, |
| 860 | XFLOADf32, |
| 861 | DFLOADf32 |
| 862 | )>; |
| 863 | |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame] | 864 | // Cracked 3-Way Load Instruction |
| 865 | // Load with two ALU operations that depend on each other |
| 866 | def : InstRW<[P9_LoadAndALUOp_6C, P9_ALU_2C, IP_AGEN_1C, IP_EXEC_1C, IP_EXEC_1C, |
| 867 | DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 868 | (instrs |
| 869 | (instregex "LHAU(X)?(8)?$"), |
| 870 | LWAUX |
| 871 | )>; |
| 872 | |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 873 | // Cracked Load that requires the PM resource. |
| 874 | // Since the Load and the PM cannot be done at the same time the latencies are |
| 875 | // added. Requires 8 cycles. |
| 876 | // Since the PM requires the full superslice we need both EXECE, EXECO pipelines |
| 877 | // as well as 3 dispatches for the PM. The Load requires the remaining 2 |
| 878 | // dispatches. |
| 879 | def : InstRW<[P9_LoadAndPMOp_8C, IP_AGEN_1C, IP_EXECE_1C, IP_EXECO_1C, |
| 880 | DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 881 | (instrs |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame] | 882 | LXVH8X, |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 883 | LXVDSX, |
| 884 | LXVW4X |
| 885 | )>; |
| 886 | |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 887 | // Single slice Restricted store operation. The restricted operation requires |
| 888 | // all three dispatches for the superslice. |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 889 | def : InstRW<[P9_LS_1C, IP_EXEC_1C, IP_AGEN_1C, DISP_1C, DISP_1C, DISP_1C], |
| 890 | (instrs |
Stefan Pintilie | 626b651 | 2018-02-23 20:37:10 +0000 | [diff] [blame] | 891 | (instregex "STF(S|D|IWX|SX|DX)$"), |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame] | 892 | (instregex "STXS(D|DX|SPX|IWX|IBX|IHX|SP)(v)?$"), |
| 893 | (instregex "STW(8)?$"), |
Stefan Pintilie | 735817a | 2018-03-09 21:08:35 +0000 | [diff] [blame] | 894 | (instregex "(D|X)FSTORE(f32|f64)$"), |
| 895 | (instregex "ST(W|H|D)BRX$"), |
| 896 | (instregex "ST(B|H|D)(8)?$"), |
Zaara Syeda | 6f3df02 | 2018-05-28 15:27:58 +0000 | [diff] [blame^] | 897 | (instregex "ST(B|W|H|D)(CI)?X(TLS|TLS_32)?(8)?(_)?$"), |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame] | 898 | STIWX, |
| 899 | SLBIEG, |
| 900 | STMW, |
| 901 | STSWI, |
Stefan Pintilie | 735817a | 2018-03-09 21:08:35 +0000 | [diff] [blame] | 902 | TLBIE |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 903 | )>; |
| 904 | |
Stefan Pintilie | 735817a | 2018-03-09 21:08:35 +0000 | [diff] [blame] | 905 | // Vector Store Instruction |
| 906 | // Requires the whole superslice and therefore requires all three dispatches |
| 907 | // as well as both the Even and Odd exec pipelines. |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 908 | def : InstRW<[P9_LS_1C, IP_EXECE_1C, IP_EXECO_1C, IP_AGEN_1C, |
| 909 | DISP_1C, DISP_1C, DISP_1C], |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 910 | (instrs |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame] | 911 | (instregex "STVE(B|H|W)X$"), |
| 912 | (instregex "STVX(L)?$"), |
| 913 | (instregex "STXV(B16X|H8X|W4X|D2X|L|LL|X)?$") |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 914 | )>; |
| 915 | |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame] | 916 | // 5 Cycle DIV operation. Only one DIV unit per superslice so we use the whole |
| 917 | // superslice. That includes both exec pipelines (EXECO, EXECE) and all three |
| 918 | // dispatches. |
| 919 | 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] | 920 | (instrs |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame] | 921 | (instregex "MTCTR(8)?(loop)?$"), |
| 922 | (instregex "MTLR(8)?$") |
Stefan Pintilie | 626b651 | 2018-02-23 20:37:10 +0000 | [diff] [blame] | 923 | )>; |
| 924 | |
| 925 | // 12 Cycle DIV operation. Only one DIV unit per superslice so we use the whole |
| 926 | // superslice. That includes both exec pipelines (EXECO, EXECE) and all three |
| 927 | // dispatches. |
| 928 | def : InstRW<[P9_DIV_12C, IP_EXECE_1C, IP_EXECO_1C, DISP_1C, DISP_1C, DISP_1C], |
| 929 | (instrs |
Stefan Pintilie | e894e0f | 2018-03-01 16:16:08 +0000 | [diff] [blame] | 930 | (instregex "M(T|F)VRSAVE(v)?$"), |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame] | 931 | (instregex "M(T|F)PMR$"), |
| 932 | (instregex "M(T|F)TB(8)?$"), |
Stefan Pintilie | e894e0f | 2018-03-01 16:16:08 +0000 | [diff] [blame] | 933 | (instregex "MF(SPR|CTR|LR)(8)?$"), |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame] | 934 | (instregex "M(T|F)MSR(D)?$"), |
| 935 | (instregex "MTSPR(8)?$") |
Stefan Pintilie | 626b651 | 2018-02-23 20:37:10 +0000 | [diff] [blame] | 936 | )>; |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 937 | |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 938 | // 16 Cycle DIV operation. Only one DIV unit per superslice so we use the whole |
| 939 | // superslice. That includes both exec pipelines (EXECO, EXECE) and all three |
| 940 | // dispatches. |
| 941 | def : InstRW<[P9_DIV_16C_8, IP_EXECO_1C, IP_EXECE_1C, |
| 942 | DISP_1C, DISP_1C, DISP_1C], |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 943 | (instrs |
| 944 | DIVW, |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 945 | DIVWU, |
| 946 | MODSW |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 947 | )>; |
| 948 | |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 949 | // 24 Cycle DIV operation. Only one DIV unit per superslice so we use the whole |
| 950 | // superslice. That includes both exec pipelines (EXECO, EXECE) and all three |
| 951 | // dispatches. |
| 952 | def : InstRW<[P9_DIV_24C_8, IP_EXECO_1C, IP_EXECE_1C, |
| 953 | DISP_1C, DISP_1C, DISP_1C], |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 954 | (instrs |
| 955 | DIVWE, |
| 956 | DIVD, |
| 957 | DIVWEU, |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 958 | DIVDU, |
| 959 | MODSD, |
| 960 | MODUD, |
| 961 | MODUW |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 962 | )>; |
| 963 | |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 964 | // 40 Cycle DIV operation. Only one DIV unit per superslice so we use the whole |
| 965 | // superslice. That includes both exec pipelines (EXECO, EXECE) and all three |
| 966 | // dispatches. |
| 967 | def : InstRW<[P9_DIV_40C_8, IP_EXECO_1C, IP_EXECE_1C, |
| 968 | DISP_1C, DISP_1C, DISP_1C], |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 969 | (instrs |
| 970 | DIVDE, |
| 971 | DIVDEU |
| 972 | )>; |
| 973 | |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 974 | // Cracked DIV and ALU operation. Requires one full slice for the ALU operation |
| 975 | // and one full superslice for the DIV operation since there is only one DIV |
| 976 | // per superslice. Latency of DIV plus ALU is 26. |
Stefan Pintilie | d45db61 | 2018-03-05 14:34:59 +0000 | [diff] [blame] | 977 | def : InstRW<[P9_IntDivAndALUOp_18C_8, IP_EXECE_1C, IP_EXECO_1C, IP_EXEC_1C, |
| 978 | DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 979 | (instrs |
| 980 | (instregex "DIVW(U)?(O)?o$") |
| 981 | )>; |
| 982 | |
| 983 | // Cracked DIV and ALU operation. Requires one full slice for the ALU operation |
| 984 | // and one full superslice for the DIV operation since there is only one DIV |
| 985 | // per superslice. Latency of DIV plus ALU is 26. |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 986 | def : InstRW<[P9_IntDivAndALUOp_26C_8, IP_EXECE_1C, IP_EXECO_1C, IP_EXEC_1C, |
| 987 | DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 988 | (instrs |
Stefan Pintilie | cc330da | 2017-10-10 13:45:35 +0000 | [diff] [blame] | 989 | DIVDo, |
| 990 | DIVDUo, |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 991 | DIVWEo, |
| 992 | DIVWEUo |
| 993 | )>; |
| 994 | |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 995 | // Cracked DIV and ALU operation. Requires one full slice for the ALU operation |
| 996 | // and one full superslice for the DIV operation since there is only one DIV |
| 997 | // per superslice. Latency of DIV plus ALU is 42. |
| 998 | def : InstRW<[P9_IntDivAndALUOp_42C_8, IP_EXECE_1C, IP_EXECO_1C, IP_EXEC_1C, |
| 999 | DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 1000 | (instrs |
| 1001 | DIVDEo, |
| 1002 | DIVDEUo |
| 1003 | )>; |
| 1004 | |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 1005 | // CR access instructions in _BrMCR, IIC_BrMCRX. |
| 1006 | |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 1007 | // Cracked, restricted, ALU operations. |
| 1008 | // Here the two ALU ops can actually be done in parallel and therefore the |
| 1009 | // latencies are not added together. Otherwise this is like having two |
| 1010 | // instructions running together on two pipelines and 6 dispatches. |
| 1011 | // ALU ops are 2 cycles each. |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 1012 | def : InstRW<[P9_ALU_2C, P9_ALU_2C, IP_EXEC_1C, IP_EXEC_1C, |
| 1013 | DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 1014 | (instrs |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 1015 | MTCRF, |
| 1016 | MTCRF8 |
| 1017 | )>; |
| 1018 | |
Stefan Pintilie | e894e0f | 2018-03-01 16:16:08 +0000 | [diff] [blame] | 1019 | // Cracked ALU operations. |
| 1020 | // Here the two ALU ops can actually be done in parallel and therefore the |
| 1021 | // latencies are not added together. Otherwise this is like having two |
| 1022 | // instructions running together on two pipelines and 4 dispatches. |
| 1023 | // ALU ops are 2 cycles each. |
| 1024 | def : InstRW<[P9_ALU_2C, P9_ALU_2C, IP_EXEC_1C, IP_EXEC_1C, |
| 1025 | DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 1026 | (instrs |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame] | 1027 | (instregex "ADDC(8)?o$"), |
| 1028 | (instregex "SUBFC(8)?o$") |
Stefan Pintilie | e894e0f | 2018-03-01 16:16:08 +0000 | [diff] [blame] | 1029 | )>; |
| 1030 | |
Stefan Pintilie | d45db61 | 2018-03-05 14:34:59 +0000 | [diff] [blame] | 1031 | // Cracked ALU operations. |
| 1032 | // Two ALU ops can be done in parallel. |
| 1033 | // One is three cycle ALU the ohter is a two cycle ALU. |
| 1034 | // One of the ALU ops is restricted the other is not so we have a total of |
| 1035 | // 5 dispatches. |
| 1036 | def : InstRW<[P9_ALU_2C, P9_ALU_3C, IP_EXEC_1C, IP_EXEC_1C, |
| 1037 | DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 1038 | (instrs |
| 1039 | (instregex "F(N)?ABS(D|S)o$"), |
| 1040 | (instregex "FCPSGN(D|S)o$"), |
| 1041 | (instregex "FNEG(D|S)o$"), |
| 1042 | FMRo |
| 1043 | )>; |
| 1044 | |
| 1045 | // Cracked ALU operations. |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 1046 | // Here the two ALU ops can actually be done in parallel and therefore the |
| 1047 | // latencies are not added together. Otherwise this is like having two |
Stefan Pintilie | d45db61 | 2018-03-05 14:34:59 +0000 | [diff] [blame] | 1048 | // instructions running together on two pipelines and 4 dispatches. |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 1049 | // ALU ops are 3 cycles each. |
| 1050 | 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] | 1051 | DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 1052 | (instrs |
| 1053 | MCRFS |
| 1054 | )>; |
| 1055 | |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame] | 1056 | // Cracked Restricted ALU operations. |
| 1057 | // Here the two ALU ops can actually be done in parallel and therefore the |
| 1058 | // latencies are not added together. Otherwise this is like having two |
| 1059 | // instructions running together on two pipelines and 6 dispatches. |
| 1060 | // ALU ops are 3 cycles each. |
| 1061 | def : InstRW<[P9_ALU_3C, P9_ALU_3C, IP_EXEC_1C, IP_EXEC_1C, |
| 1062 | DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 1063 | (instrs |
| 1064 | (instregex "MTFSF(b|o)?$"), |
| 1065 | (instregex "MTFSFI(o)?$") |
| 1066 | )>; |
| 1067 | |
Stefan Pintilie | b5a9440 | 2018-03-02 14:41:38 +0000 | [diff] [blame] | 1068 | // Cracked instruction made of two ALU ops. |
| 1069 | // The two ops cannot be done in parallel. |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame] | 1070 | // One of the ALU ops is restricted and takes 3 dispatches. |
Stefan Pintilie | 626b651 | 2018-02-23 20:37:10 +0000 | [diff] [blame] | 1071 | def : InstRW<[P9_ALUOpAndALUOp_4C, IP_EXEC_1C, IP_EXEC_1C, |
| 1072 | DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 1073 | (instrs |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame] | 1074 | (instregex "RLD(I)?C(R|L)o$"), |
| 1075 | (instregex "RLW(IMI|INM|NM)(8)?o$"), |
| 1076 | (instregex "SLW(8)?o$"), |
| 1077 | (instregex "SRAW(I)?o$"), |
| 1078 | (instregex "SRW(8)?o$"), |
| 1079 | RLDICL_32o, |
| 1080 | RLDIMIo |
| 1081 | )>; |
| 1082 | |
| 1083 | // Cracked instruction made of two ALU ops. |
| 1084 | // The two ops cannot be done in parallel. |
| 1085 | // Both of the ALU ops are restricted and take 3 dispatches. |
| 1086 | def : InstRW<[P9_ALU2OpAndALU2Op_6C, IP_EXEC_1C, IP_EXEC_1C, |
| 1087 | DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 1088 | (instrs |
| 1089 | (instregex "MFFS(L|CE|o)?$") |
| 1090 | )>; |
| 1091 | |
Stefan Pintilie | 735817a | 2018-03-09 21:08:35 +0000 | [diff] [blame] | 1092 | // Cracked ALU instruction composed of three consecutive 2 cycle loads for a |
| 1093 | // total of 6 cycles. All of the ALU operations are also restricted so each |
| 1094 | // takes 3 dispatches for a total of 9. |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame] | 1095 | def : InstRW<[P9_ALUOpAndALUOpAndALUOp_6C, IP_EXEC_1C, IP_EXEC_1C, IP_EXEC_1C, |
| 1096 | DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C, |
| 1097 | DISP_1C, DISP_1C], |
| 1098 | (instrs |
| 1099 | (instregex "MFCR(8)?$") |
Stefan Pintilie | 626b651 | 2018-02-23 20:37:10 +0000 | [diff] [blame] | 1100 | )>; |
| 1101 | |
Stefan Pintilie | b5a9440 | 2018-03-02 14:41:38 +0000 | [diff] [blame] | 1102 | // Cracked instruction made of two ALU ops. |
| 1103 | // The two ops cannot be done in parallel. |
| 1104 | def : InstRW<[P9_ALUOpAndALUOp_4C, IP_EXEC_1C, IP_EXEC_1C, |
| 1105 | DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 1106 | (instrs |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame] | 1107 | (instregex "EXTSWSLIo$"), |
| 1108 | (instregex "SRAD(I)?o$"), |
| 1109 | SLDo, |
| 1110 | SRDo, |
| 1111 | RLDICo |
Stefan Pintilie | b5a9440 | 2018-03-02 14:41:38 +0000 | [diff] [blame] | 1112 | )>; |
| 1113 | |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 1114 | // 33 Cycle DP Instruction Restricted. Takes one slice and 3 dispatches. |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 1115 | def : InstRW<[P9_DP_33C_8, IP_EXEC_1C, DISP_1C, DISP_1C, DISP_1C], |
| 1116 | (instrs |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 1117 | FDIV |
| 1118 | )>; |
| 1119 | |
Stefan Pintilie | d45db61 | 2018-03-05 14:34:59 +0000 | [diff] [blame] | 1120 | // 33 Cycle DP Instruction Restricted and Cracked with 3 Cycle ALU. |
Stefan Pintilie | e894e0f | 2018-03-01 16:16:08 +0000 | [diff] [blame] | 1121 | def : InstRW<[P9_DPOpAndALU2Op_36C_8, IP_EXEC_1C, IP_EXEC_1C, |
Stefan Pintilie | cc330da | 2017-10-10 13:45:35 +0000 | [diff] [blame] | 1122 | DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 1123 | (instrs |
| 1124 | FDIVo |
| 1125 | )>; |
| 1126 | |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame] | 1127 | // 36 Cycle DP Instruction. |
Stefan Pintilie | 735817a | 2018-03-09 21:08:35 +0000 | [diff] [blame] | 1128 | // Instruction can be done on a single slice. |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame] | 1129 | def : InstRW<[P9_DP_36C_10, IP_EXEC_1C, DISP_1C, DISP_1C], |
| 1130 | (instrs |
| 1131 | XSSQRTDP |
| 1132 | )>; |
| 1133 | |
Stefan Pintilie | d45db61 | 2018-03-05 14:34:59 +0000 | [diff] [blame] | 1134 | // 36 Cycle DP Instruction Restricted. Takes one slice and 3 dispatches. |
| 1135 | def : InstRW<[P9_DP_36C_10, IP_EXEC_1C, DISP_1C, DISP_1C, DISP_1C], |
| 1136 | (instrs |
| 1137 | FSQRT |
| 1138 | )>; |
| 1139 | |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame] | 1140 | // 36 Cycle DP Vector Instruction. |
| 1141 | def : InstRW<[P9_DPE_36C_10, P9_DPO_36C_10, IP_EXECE_1C, IP_EXECO_1C, |
| 1142 | DISP_1C, DISP_1C, DISP_1C], |
| 1143 | (instrs |
| 1144 | XVSQRTDP |
| 1145 | )>; |
| 1146 | |
| 1147 | // 27 Cycle DP Vector Instruction. |
| 1148 | def : InstRW<[P9_DPE_27C_10, P9_DPO_27C_10, IP_EXECE_1C, IP_EXECO_1C, |
| 1149 | DISP_1C, DISP_1C, DISP_1C], |
| 1150 | (instrs |
| 1151 | XVSQRTSP |
| 1152 | )>; |
| 1153 | |
Stefan Pintilie | d45db61 | 2018-03-05 14:34:59 +0000 | [diff] [blame] | 1154 | // 36 Cycle DP Instruction Restricted and Cracked with 3 Cycle ALU. |
| 1155 | def : InstRW<[P9_DPOpAndALU2Op_39C_10, IP_EXEC_1C, IP_EXEC_1C, |
| 1156 | DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 1157 | (instrs |
| 1158 | FSQRTo |
| 1159 | )>; |
| 1160 | |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame] | 1161 | // 26 Cycle DP Instruction. |
| 1162 | def : InstRW<[P9_DP_26C_5, IP_EXEC_1C, DISP_1C, DISP_1C], |
| 1163 | (instrs |
| 1164 | XSSQRTSP |
| 1165 | )>; |
| 1166 | |
Stefan Pintilie | d45db61 | 2018-03-05 14:34:59 +0000 | [diff] [blame] | 1167 | // 26 Cycle DP Instruction Restricted. Takes one slice and 3 dispatches. |
| 1168 | def : InstRW<[P9_DP_26C_5, IP_EXEC_1C, DISP_1C, DISP_1C, DISP_1C], |
| 1169 | (instrs |
| 1170 | FSQRTS |
| 1171 | )>; |
| 1172 | |
| 1173 | // 26 Cycle DP Instruction Restricted and Cracked with 3 Cycle ALU. |
| 1174 | def : InstRW<[P9_DPOpAndALU2Op_29C_5, IP_EXEC_1C, IP_EXEC_1C, |
| 1175 | DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 1176 | (instrs |
| 1177 | FSQRTSo |
| 1178 | )>; |
| 1179 | |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 1180 | // 33 Cycle DP Instruction. Takes one slice and 2 dispatches. |
| 1181 | def : InstRW<[P9_DP_33C_8, IP_EXEC_1C, DISP_1C, DISP_1C], |
| 1182 | (instrs |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 1183 | XSDIVDP |
| 1184 | )>; |
| 1185 | |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 1186 | // 22 Cycle DP Instruction Restricted. Takes one slice and 3 dispatches. |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 1187 | def : InstRW<[P9_DP_22C_5, IP_EXEC_1C, DISP_1C, DISP_1C, DISP_1C], |
| 1188 | (instrs |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 1189 | FDIVS |
| 1190 | )>; |
| 1191 | |
Stefan Pintilie | cc330da | 2017-10-10 13:45:35 +0000 | [diff] [blame] | 1192 | // 22 Cycle DP Instruction Restricted and Cracked with 2 Cycle ALU. |
Stefan Pintilie | e894e0f | 2018-03-01 16:16:08 +0000 | [diff] [blame] | 1193 | def : InstRW<[P9_DPOpAndALU2Op_25C_5, IP_EXEC_1C, IP_EXEC_1C, |
Stefan Pintilie | cc330da | 2017-10-10 13:45:35 +0000 | [diff] [blame] | 1194 | DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 1195 | (instrs |
| 1196 | FDIVSo |
| 1197 | )>; |
| 1198 | |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 1199 | // 22 Cycle DP Instruction. Takes one slice and 2 dispatches. |
| 1200 | def : InstRW<[P9_DP_22C_5, IP_EXEC_1C, DISP_1C, DISP_1C], |
| 1201 | (instrs |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 1202 | XSDIVSP |
| 1203 | )>; |
| 1204 | |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 1205 | // 24 Cycle DP Vector Instruction. Takes one full superslice. |
| 1206 | // Includes both EXECE, EXECO pipelines and all 3 dispatches for the given |
| 1207 | // superslice. |
| 1208 | def : InstRW<[P9_DPE_24C_8, P9_DPO_24C_8, IP_EXECE_1C, IP_EXECO_1C, |
| 1209 | DISP_1C, DISP_1C, DISP_1C], |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 1210 | (instrs |
| 1211 | XVDIVSP |
| 1212 | )>; |
| 1213 | |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 1214 | // 33 Cycle DP Vector Instruction. Takes one full superslice. |
| 1215 | // Includes both EXECE, EXECO pipelines and all 3 dispatches for the given |
| 1216 | // superslice. |
| 1217 | def : InstRW<[P9_DPE_33C_8, P9_DPO_33C_8, IP_EXECE_1C, IP_EXECO_1C, |
| 1218 | DISP_1C, DISP_1C, DISP_1C], |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 1219 | (instrs |
| 1220 | XVDIVDP |
| 1221 | )>; |
| 1222 | |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 1223 | // Instruction cracked into three pieces. One Load and two ALU operations. |
| 1224 | // The Load and one of the ALU ops cannot be run at the same time and so the |
| 1225 | // latencies are added together for 6 cycles. The remainaing ALU is 2 cycles. |
| 1226 | // Both the load and the ALU that depends on it are restricted and so they take |
| 1227 | // a total of 6 dispatches. The final 2 dispatches come from the second ALU op. |
| 1228 | // 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] | 1229 | def : InstRW<[P9_LoadAndALU2Op_7C, P9_ALU_2C, |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 1230 | IP_AGEN_1C, IP_EXEC_1C, IP_EXEC_1C, |
| 1231 | DISP_1C, DISP_1C, DISP_1C, DISP_1C, |
| 1232 | DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 1233 | (instrs |
Stefan Pintilie | 626b651 | 2018-02-23 20:37:10 +0000 | [diff] [blame] | 1234 | (instregex "LF(SU|SUX)$") |
| 1235 | )>; |
| 1236 | |
| 1237 | // Cracked instruction made up of a Store and an ALU. The ALU does not depend on |
| 1238 | // the store and so it can be run at the same time as the store. The store is |
| 1239 | // also restricted. |
| 1240 | def : InstRW<[P9_LS_1C, P9_ALU_2C, IP_AGEN_1C, IP_EXEC_1C, IP_EXEC_1C, |
| 1241 | DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 1242 | (instrs |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame] | 1243 | (instregex "STF(S|D)U(X)?$"), |
| 1244 | (instregex "ST(B|H|W|D)U(X)?(8)?$") |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 1245 | )>; |
| 1246 | |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 1247 | // 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] | 1248 | // the load and so it can be run at the same time as the load. |
| 1249 | def : InstRW<[P9_LS_4C, P9_ALU_2C, IP_AGEN_1C, IP_EXEC_1C, |
| 1250 | DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 1251 | (instrs |
| 1252 | (instregex "LBZU(X)?(8)?$"), |
| 1253 | (instregex "LDU(X)?$") |
| 1254 | )>; |
| 1255 | |
| 1256 | |
| 1257 | // 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] | 1258 | // the load and so it can be run at the same time as the load. The load is also |
| 1259 | // restricted. 3 dispatches are from the restricted load while the other two |
| 1260 | // are from the ALU. The AGEN pipeline is from the load and the EXEC pipeline |
| 1261 | // is required for the ALU. |
| 1262 | 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] | 1263 | DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 1264 | (instrs |
Stefan Pintilie | 626b651 | 2018-02-23 20:37:10 +0000 | [diff] [blame] | 1265 | (instregex "LF(DU|DUX)$") |
Ehsan Amiri | 6c17bb0 | 2016-12-19 13:35:45 +0000 | [diff] [blame] | 1266 | )>; |
| 1267 | |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 1268 | // Crypto Instructions |
| 1269 | |
| 1270 | // 6 Cycle CY operation. Only one CY unit per CPU so we use a whole |
| 1271 | // superslice. That includes both exec pipelines (EXECO, EXECE) and all three |
| 1272 | // dispatches. |
| 1273 | def : InstRW<[P9_CY_6C, IP_EXECO_1C, IP_EXECE_1C, DISP_1C, DISP_1C, DISP_1C], |
| 1274 | (instrs |
Stefan Pintilie | e894e0f | 2018-03-01 16:16:08 +0000 | [diff] [blame] | 1275 | (instregex "VPMSUM(B|H|W|D)$"), |
| 1276 | (instregex "V(N)?CIPHER(LAST)?$"), |
| 1277 | VSBOX |
Stefan Pintilie | 590eb27 | 2017-09-22 20:17:25 +0000 | [diff] [blame] | 1278 | )>; |
Stefan Pintilie | 626b651 | 2018-02-23 20:37:10 +0000 | [diff] [blame] | 1279 | |
Stefan Pintilie | e894e0f | 2018-03-01 16:16:08 +0000 | [diff] [blame] | 1280 | // Branch Instructions |
| 1281 | |
| 1282 | // Two Cycle Branch |
| 1283 | def : InstRW<[P9_BR_2C, DISP_1C, DISP_1C], |
| 1284 | (instrs |
| 1285 | (instregex "BCCCTR(L)?(8)?$"), |
| 1286 | (instregex "BCCL(A|R|RL)?$"), |
| 1287 | (instregex "BCCTR(L)?(8)?(n)?$"), |
| 1288 | (instregex "BD(N)?Z(8|A|Am|Ap|m|p)?$"), |
| 1289 | (instregex "BD(N)?ZL(A|Am|Ap|R|R8|RL|RLm|RLp|Rm|Rp|m|p)?$"), |
| 1290 | (instregex "BL(_TLS)?$"), |
| 1291 | (instregex "BL8(_TLS|_NOP|_NOP_TLS|_TLS_)?$"), |
| 1292 | (instregex "BLA(8|8_NOP)?$"), |
| 1293 | (instregex "BLR(8|L)?$"), |
| 1294 | (instregex "TAILB(A)?(8)?$"), |
| 1295 | (instregex "TAILBCTR(8)?$"), |
| 1296 | (instregex "gBC(A|Aat|CTR|CTRL|L|LA|LAat|LR|LRL|Lat|at)?$"), |
| 1297 | (instregex "BCLR(L)?(n)?$"), |
| 1298 | (instregex "BCTR(L)?(8)?$"), |
| 1299 | B, |
| 1300 | BA, |
| 1301 | BC, |
| 1302 | BCC, |
| 1303 | BCCA, |
| 1304 | BCL, |
| 1305 | BCLalways, |
| 1306 | BCLn, |
| 1307 | BCTRL8_LDinto_toc, |
| 1308 | BCn, |
| 1309 | CTRL_DEP |
| 1310 | )>; |
| 1311 | |
| 1312 | // Five Cycle Branch with a 2 Cycle ALU Op |
| 1313 | // Operations must be done consecutively and not in parallel. |
| 1314 | def : InstRW<[P9_BROpAndALUOp_7C, IP_EXEC_1C, |
| 1315 | DISP_1C, DISP_1C, DISP_1C, DISP_1C], |
| 1316 | (instrs |
| 1317 | ADDPCIS |
| 1318 | )>; |
| 1319 | |
Stefan Pintilie | 735817a | 2018-03-09 21:08:35 +0000 | [diff] [blame] | 1320 | // Special Extracted Instructions For Atomics |
Stefan Pintilie | d45db61 | 2018-03-05 14:34:59 +0000 | [diff] [blame] | 1321 | |
| 1322 | // Atomic Load |
| 1323 | def : InstRW<[P9_LS_1C, P9_LS_1C, P9_LS_4C, P9_LS_4C, P9_LS_4C, |
| 1324 | IP_EXEC_1C, IP_EXEC_1C, IP_AGEN_1C, IP_AGEN_1C, IP_AGEN_1C, |
| 1325 | IP_AGEN_1C, IP_AGEN_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C, |
| 1326 | DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C, |
| 1327 | DISP_1C], |
| 1328 | (instrs |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame] | 1329 | (instregex "L(D|W)AT$") |
| 1330 | )>; |
| 1331 | |
| 1332 | // Atomic Store |
| 1333 | def : InstRW<[P9_LS_1C, P9_LS_4C, P9_LS_4C, IP_EXEC_1C, IP_AGEN_1C, IP_AGEN_1C, |
| 1334 | IP_AGEN_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C, DISP_1C, |
| 1335 | DISP_1C], |
| 1336 | (instrs |
| 1337 | (instregex "ST(D|W)AT$") |
Stefan Pintilie | d45db61 | 2018-03-05 14:34:59 +0000 | [diff] [blame] | 1338 | )>; |
| 1339 | |
Stefan Pintilie | b5a9440 | 2018-03-02 14:41:38 +0000 | [diff] [blame] | 1340 | // Signal Processing Engine (SPE) Instructions |
| 1341 | // These instructions are not supported on Power 9 |
| 1342 | def : InstRW<[], |
| 1343 | (instrs |
| 1344 | BRINC, |
| 1345 | EVABS, |
| 1346 | EVEQV, |
| 1347 | EVMRA, |
| 1348 | EVNAND, |
| 1349 | EVNEG, |
| 1350 | (instregex "EVADD(I)?W$"), |
| 1351 | (instregex "EVADD(SM|SS|UM|US)IAAW$"), |
| 1352 | (instregex "EVAND(C)?$"), |
| 1353 | (instregex "EVCMP(EQ|GTS|GTU|LTS|LTU)$"), |
| 1354 | (instregex "EVCNTL(S|Z)W$"), |
| 1355 | (instregex "EVDIVW(S|U)$"), |
| 1356 | (instregex "EVEXTS(B|H)$"), |
| 1357 | (instregex "EVLD(H|W|D)(X)?$"), |
| 1358 | (instregex "EVLHH(E|OS|OU)SPLAT(X)?$"), |
| 1359 | (instregex "EVLWHE(X)?$"), |
| 1360 | (instregex "EVLWHO(S|U)(X)?$"), |
| 1361 | (instregex "EVLW(H|W)SPLAT(X)?$"), |
| 1362 | (instregex "EVMERGE(HI|LO|HILO|LOHI)$"), |
| 1363 | (instregex "EVMHEG(S|U)M(F|I)A(A|N)$"), |
| 1364 | (instregex "EVMHES(M|S)(F|I)(A|AA|AAW|ANW)?$"), |
| 1365 | (instregex "EVMHEU(M|S)I(A|AA|AAW|ANW)?$"), |
| 1366 | (instregex "EVMHOG(U|S)M(F|I)A(A|N)$"), |
| 1367 | (instregex "EVMHOS(M|S)(F|I)(A|AA|AAW|ANW)?$"), |
| 1368 | (instregex "EVMHOU(M|S)I(A|AA|ANW|AAW)?$"), |
| 1369 | (instregex "EVMWHS(M|S)(F|FA|I|IA)$"), |
| 1370 | (instregex "EVMWHUMI(A)?$"), |
| 1371 | (instregex "EVMWLS(M|S)IA(A|N)W$"), |
| 1372 | (instregex "EVMWLU(M|S)I(A|AA|AAW|ANW)?$"), |
| 1373 | (instregex "EVMWSM(F|I)(A|AA|AN)?$"), |
| 1374 | (instregex "EVMWSSF(A|AA|AN)?$"), |
| 1375 | (instregex "EVMWUMI(A|AA|AN)?$"), |
| 1376 | (instregex "EV(N|X)?OR(C)?$"), |
| 1377 | (instregex "EVR(LW|LWI|NDW)$"), |
| 1378 | (instregex "EVSLW(I)?$"), |
| 1379 | (instregex "EVSPLAT(F)?I$"), |
| 1380 | (instregex "EVSRW(I)?(S|U)$"), |
| 1381 | (instregex "EVST(DD|DH|DW|WHE|WHO|WWE|WWO)(X)?$"), |
| 1382 | (instregex "EVSUBF(S|U)(M|S)IAAW$"), |
| 1383 | (instregex "EVSUB(I)?FW$") |
| 1384 | )> { let Unsupported = 1; } |
Stefan Pintilie | e894e0f | 2018-03-01 16:16:08 +0000 | [diff] [blame] | 1385 | |
Stefan Pintilie | b5a9440 | 2018-03-02 14:41:38 +0000 | [diff] [blame] | 1386 | // General Instructions without scheduling support. |
Stefan Pintilie | 626b651 | 2018-02-23 20:37:10 +0000 | [diff] [blame] | 1387 | def : InstRW<[], |
| 1388 | (instrs |
Stefan Pintilie | e894e0f | 2018-03-01 16:16:08 +0000 | [diff] [blame] | 1389 | (instregex "(H)?RFI(D)?$"), |
Stefan Pintilie | d45db61 | 2018-03-05 14:34:59 +0000 | [diff] [blame] | 1390 | (instregex "DSS(ALL)?$"), |
| 1391 | (instregex "DST(ST)?(T)?(64)?$"), |
| 1392 | (instregex "ICBL(C|Q)$"), |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame] | 1393 | (instregex "L(W|H|B)EPX$"), |
| 1394 | (instregex "ST(W|H|B)EPX$"), |
| 1395 | (instregex "(L|ST)FDEPX$"), |
| 1396 | (instregex "M(T|F)SR(IN)?$"), |
| 1397 | (instregex "M(T|F)DCR$"), |
| 1398 | (instregex "NOP_GT_PWR(6|7)$"), |
| 1399 | (instregex "TLB(IA|IVAX|SX|SX2|SX2D|LD|LI|RE|RE2|WE|WE2)$"), |
| 1400 | (instregex "WRTEE(I)?$"), |
Stefan Pintilie | e894e0f | 2018-03-01 16:16:08 +0000 | [diff] [blame] | 1401 | ATTN, |
Stefan Pintilie | e894e0f | 2018-03-01 16:16:08 +0000 | [diff] [blame] | 1402 | CLRBHRB, |
| 1403 | MFBHRBE, |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame] | 1404 | MBAR, |
| 1405 | MSYNC, |
| 1406 | SLBSYNC, |
Stefan Pintilie | e894e0f | 2018-03-01 16:16:08 +0000 | [diff] [blame] | 1407 | NAP, |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame] | 1408 | STOP, |
| 1409 | TRAP, |
Stefan Pintilie | e894e0f | 2018-03-01 16:16:08 +0000 | [diff] [blame] | 1410 | RFCI, |
| 1411 | RFDI, |
| 1412 | RFMCI, |
| 1413 | SC, |
Stefan Pintilie | d45db61 | 2018-03-05 14:34:59 +0000 | [diff] [blame] | 1414 | DCBA, |
| 1415 | DCBI, |
| 1416 | DCCCI, |
Stefan Pintilie | 235fb92 | 2018-03-08 16:24:33 +0000 | [diff] [blame] | 1417 | ICCCI |
Stefan Pintilie | 626b651 | 2018-02-23 20:37:10 +0000 | [diff] [blame] | 1418 | )> { let Unsupported = 1; } |