1*0b57cec5SDimitry Andric//===-- PPCScheduleE500mc.td - e5500 Scheduling Defs -------*- tablegen -*-===// 2*0b57cec5SDimitry Andric// 3*0b57cec5SDimitry Andric// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4*0b57cec5SDimitry Andric// See https://llvm.org/LICENSE.txt for license information. 5*0b57cec5SDimitry Andric// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6*0b57cec5SDimitry Andric// 7*0b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 8*0b57cec5SDimitry Andric// 9*0b57cec5SDimitry Andric// This file defines the itinerary class data for the Freescale e5500 64-bit 10*0b57cec5SDimitry Andric// Power processor. 11*0b57cec5SDimitry Andric// 12*0b57cec5SDimitry Andric// All information is derived from the "e5500 Core Reference Manual", 13*0b57cec5SDimitry Andric// Freescale Document Number e5500RM, Rev. 1, 03/2012. 14*0b57cec5SDimitry Andric// 15*0b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 16*0b57cec5SDimitry Andric// Relevant functional units in the Freescale e5500 core 17*0b57cec5SDimitry Andric// (These are the same as for the e500mc) 18*0b57cec5SDimitry Andric// 19*0b57cec5SDimitry Andric// * Decode & Dispatch 20*0b57cec5SDimitry Andric// Can dispatch up to 2 instructions per clock cycle to either the GPR Issue 21*0b57cec5SDimitry Andric// queues (GIQx), FP Issue Queue (FIQ), or Branch issue queue (BIQ). 22*0b57cec5SDimitry Andricdef E5500_DIS0 : FuncUnit; 23*0b57cec5SDimitry Andricdef E5500_DIS1 : FuncUnit; 24*0b57cec5SDimitry Andric 25*0b57cec5SDimitry Andric// * Execute 26*0b57cec5SDimitry Andric// 6 pipelined execution units: SFX0, SFX1, BU, FPU, LSU, CFX. 27*0b57cec5SDimitry Andric// The CFX has a bypass path, allowing non-divide instructions to execute 28*0b57cec5SDimitry Andric// while a divide instruction is being executed. 29*0b57cec5SDimitry Andricdef E5500_SFX0 : FuncUnit; // Simple unit 0 30*0b57cec5SDimitry Andricdef E5500_SFX1 : FuncUnit; // Simple unit 1 31*0b57cec5SDimitry Andricdef E5500_BU : FuncUnit; // Branch unit 32*0b57cec5SDimitry Andricdef E5500_CFX_DivBypass 33*0b57cec5SDimitry Andric : FuncUnit; // CFX divide bypass path 34*0b57cec5SDimitry Andricdef E5500_CFX_0 : FuncUnit; // CFX pipeline stage 0 35*0b57cec5SDimitry Andric 36*0b57cec5SDimitry Andricdef E5500_CFX_1 : FuncUnit; // CFX pipeline stage 1 37*0b57cec5SDimitry Andric 38*0b57cec5SDimitry Andricdef E5500_LSU_0 : FuncUnit; // LSU pipeline 39*0b57cec5SDimitry Andricdef E5500_FPU_0 : FuncUnit; // FPU pipeline 40*0b57cec5SDimitry Andric 41*0b57cec5SDimitry Andricdef E5500_GPR_Bypass : Bypass; 42*0b57cec5SDimitry Andricdef E5500_FPR_Bypass : Bypass; 43*0b57cec5SDimitry Andricdef E5500_CR_Bypass : Bypass; 44*0b57cec5SDimitry Andric 45*0b57cec5SDimitry Andricdef PPCE5500Itineraries : ProcessorItineraries< 46*0b57cec5SDimitry Andric [E5500_DIS0, E5500_DIS1, E5500_SFX0, E5500_SFX1, E5500_BU, 47*0b57cec5SDimitry Andric E5500_CFX_DivBypass, E5500_CFX_0, E5500_CFX_1, 48*0b57cec5SDimitry Andric E5500_LSU_0, E5500_FPU_0], 49*0b57cec5SDimitry Andric [E5500_CR_Bypass, E5500_GPR_Bypass, E5500_FPR_Bypass], [ 50*0b57cec5SDimitry Andric InstrItinData<IIC_IntSimple, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 51*0b57cec5SDimitry Andric InstrStage<1, [E5500_SFX0, E5500_SFX1]>], 52*0b57cec5SDimitry Andric [5, 2, 2], // Latency = 1 53*0b57cec5SDimitry Andric [E5500_GPR_Bypass, 54*0b57cec5SDimitry Andric E5500_GPR_Bypass, E5500_GPR_Bypass]>, 55*0b57cec5SDimitry Andric InstrItinData<IIC_IntGeneral, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 56*0b57cec5SDimitry Andric InstrStage<1, [E5500_SFX0, E5500_SFX1]>], 57*0b57cec5SDimitry Andric [5, 2, 2], // Latency = 1 58*0b57cec5SDimitry Andric [E5500_GPR_Bypass, 59*0b57cec5SDimitry Andric E5500_GPR_Bypass, E5500_GPR_Bypass]>, 60*0b57cec5SDimitry Andric InstrItinData<IIC_IntISEL, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 61*0b57cec5SDimitry Andric InstrStage<1, [E5500_SFX0, E5500_SFX1]>], 62*0b57cec5SDimitry Andric [5, 2, 2, 2], // Latency = 1 63*0b57cec5SDimitry Andric [E5500_GPR_Bypass, 64*0b57cec5SDimitry Andric E5500_GPR_Bypass, E5500_GPR_Bypass, 65*0b57cec5SDimitry Andric E5500_CR_Bypass]>, 66*0b57cec5SDimitry Andric InstrItinData<IIC_IntCompare, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 67*0b57cec5SDimitry Andric InstrStage<1, [E5500_SFX0, E5500_SFX1]>], 68*0b57cec5SDimitry Andric [6, 2, 2], // Latency = 1 or 2 69*0b57cec5SDimitry Andric [E5500_CR_Bypass, 70*0b57cec5SDimitry Andric E5500_GPR_Bypass, E5500_GPR_Bypass]>, 71*0b57cec5SDimitry Andric InstrItinData<IIC_IntDivD, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 72*0b57cec5SDimitry Andric InstrStage<1, [E5500_CFX_0], 0>, 73*0b57cec5SDimitry Andric InstrStage<26, [E5500_CFX_DivBypass]>], 74*0b57cec5SDimitry Andric [30, 2, 2], // Latency= 4..26, Repeat rate= 4..26 75*0b57cec5SDimitry Andric [E5500_GPR_Bypass, 76*0b57cec5SDimitry Andric E5500_GPR_Bypass, E5500_GPR_Bypass]>, 77*0b57cec5SDimitry Andric InstrItinData<IIC_IntDivW, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 78*0b57cec5SDimitry Andric InstrStage<1, [E5500_CFX_0], 0>, 79*0b57cec5SDimitry Andric InstrStage<16, [E5500_CFX_DivBypass]>], 80*0b57cec5SDimitry Andric [20, 2, 2], // Latency= 4..16, Repeat rate= 4..16 81*0b57cec5SDimitry Andric [E5500_GPR_Bypass, 82*0b57cec5SDimitry Andric E5500_GPR_Bypass, E5500_GPR_Bypass]>, 83*0b57cec5SDimitry Andric InstrItinData<IIC_IntMFFS, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 84*0b57cec5SDimitry Andric InstrStage<1, [E5500_FPU_0]>], 85*0b57cec5SDimitry Andric [11], // Latency = 7, Repeat rate = 1 86*0b57cec5SDimitry Andric [E5500_FPR_Bypass]>, 87*0b57cec5SDimitry Andric InstrItinData<IIC_IntMTFSB0, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 88*0b57cec5SDimitry Andric InstrStage<7, [E5500_FPU_0]>], 89*0b57cec5SDimitry Andric [11, 2, 2], // Latency = 7, Repeat rate = 7 90*0b57cec5SDimitry Andric [NoBypass, NoBypass, NoBypass]>, 91*0b57cec5SDimitry Andric InstrItinData<IIC_IntMulHD, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 92*0b57cec5SDimitry Andric InstrStage<1, [E5500_CFX_0], 0>, 93*0b57cec5SDimitry Andric InstrStage<2, [E5500_CFX_1]>], 94*0b57cec5SDimitry Andric [9, 2, 2], // Latency = 4..7, Repeat rate = 2..4 95*0b57cec5SDimitry Andric [E5500_GPR_Bypass, 96*0b57cec5SDimitry Andric E5500_GPR_Bypass, E5500_GPR_Bypass]>, 97*0b57cec5SDimitry Andric InstrItinData<IIC_IntMulHW, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 98*0b57cec5SDimitry Andric InstrStage<1, [E5500_CFX_0], 0>, 99*0b57cec5SDimitry Andric InstrStage<1, [E5500_CFX_1]>], 100*0b57cec5SDimitry Andric [8, 2, 2], // Latency = 4, Repeat rate = 1 101*0b57cec5SDimitry Andric [E5500_GPR_Bypass, 102*0b57cec5SDimitry Andric E5500_GPR_Bypass, E5500_GPR_Bypass]>, 103*0b57cec5SDimitry Andric InstrItinData<IIC_IntMulHWU, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 104*0b57cec5SDimitry Andric InstrStage<1, [E5500_CFX_0], 0>, 105*0b57cec5SDimitry Andric InstrStage<1, [E5500_CFX_1]>], 106*0b57cec5SDimitry Andric [8, 2, 2], // Latency = 4, Repeat rate = 1 107*0b57cec5SDimitry Andric [E5500_GPR_Bypass, 108*0b57cec5SDimitry Andric E5500_GPR_Bypass, E5500_GPR_Bypass]>, 109*0b57cec5SDimitry Andric InstrItinData<IIC_IntMulLI, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 110*0b57cec5SDimitry Andric InstrStage<1, [E5500_CFX_0], 0>, 111*0b57cec5SDimitry Andric InstrStage<2, [E5500_CFX_1]>], 112*0b57cec5SDimitry Andric [8, 2, 2], // Latency = 4 or 5, Repeat = 2 113*0b57cec5SDimitry Andric [E5500_GPR_Bypass, 114*0b57cec5SDimitry Andric E5500_GPR_Bypass, E5500_GPR_Bypass]>, 115*0b57cec5SDimitry Andric InstrItinData<IIC_IntRotate, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 116*0b57cec5SDimitry Andric InstrStage<1, [E5500_SFX0, E5500_SFX1]>], 117*0b57cec5SDimitry Andric [5, 2, 2], // Latency = 1 118*0b57cec5SDimitry Andric [E5500_GPR_Bypass, 119*0b57cec5SDimitry Andric E5500_GPR_Bypass, E5500_GPR_Bypass]>, 120*0b57cec5SDimitry Andric InstrItinData<IIC_IntRotateD, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 121*0b57cec5SDimitry Andric InstrStage<2, [E5500_SFX0, E5500_SFX1]>], 122*0b57cec5SDimitry Andric [6, 2, 2], // Latency = 2, Repeat rate = 2 123*0b57cec5SDimitry Andric [E5500_GPR_Bypass, 124*0b57cec5SDimitry Andric E5500_GPR_Bypass, E5500_GPR_Bypass]>, 125*0b57cec5SDimitry Andric InstrItinData<IIC_IntRotateDI, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 126*0b57cec5SDimitry Andric InstrStage<1, [E5500_SFX0, E5500_SFX1]>], 127*0b57cec5SDimitry Andric [5, 2, 2], // Latency = 1, Repeat rate = 1 128*0b57cec5SDimitry Andric [E5500_GPR_Bypass, 129*0b57cec5SDimitry Andric E5500_GPR_Bypass, E5500_GPR_Bypass]>, 130*0b57cec5SDimitry Andric InstrItinData<IIC_IntShift, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 131*0b57cec5SDimitry Andric InstrStage<2, [E5500_SFX0, E5500_SFX1]>], 132*0b57cec5SDimitry Andric [6, 2, 2], // Latency = 2, Repeat rate = 2 133*0b57cec5SDimitry Andric [E5500_GPR_Bypass, 134*0b57cec5SDimitry Andric E5500_GPR_Bypass, E5500_GPR_Bypass]>, 135*0b57cec5SDimitry Andric InstrItinData<IIC_IntTrapW, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 136*0b57cec5SDimitry Andric InstrStage<2, [E5500_SFX0]>], 137*0b57cec5SDimitry Andric [6, 2], // Latency = 2, Repeat rate = 2 138*0b57cec5SDimitry Andric [E5500_GPR_Bypass, E5500_GPR_Bypass]>, 139*0b57cec5SDimitry Andric InstrItinData<IIC_BrB, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 140*0b57cec5SDimitry Andric InstrStage<1, [E5500_BU]>], 141*0b57cec5SDimitry Andric [5, 2], // Latency = 1 142*0b57cec5SDimitry Andric [NoBypass, E5500_GPR_Bypass]>, 143*0b57cec5SDimitry Andric InstrItinData<IIC_BrCR, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 144*0b57cec5SDimitry Andric InstrStage<1, [E5500_BU]>], 145*0b57cec5SDimitry Andric [5, 2, 2], // Latency = 1 146*0b57cec5SDimitry Andric [E5500_CR_Bypass, 147*0b57cec5SDimitry Andric E5500_CR_Bypass, E5500_CR_Bypass]>, 148*0b57cec5SDimitry Andric InstrItinData<IIC_BrMCR, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 149*0b57cec5SDimitry Andric InstrStage<1, [E5500_BU]>], 150*0b57cec5SDimitry Andric [5, 2], // Latency = 1 151*0b57cec5SDimitry Andric [E5500_CR_Bypass, E5500_CR_Bypass]>, 152*0b57cec5SDimitry Andric InstrItinData<IIC_BrMCRX, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 153*0b57cec5SDimitry Andric InstrStage<1, [E5500_CFX_0]>], 154*0b57cec5SDimitry Andric [5, 2, 2], // Latency = 1 155*0b57cec5SDimitry Andric [E5500_CR_Bypass, E5500_GPR_Bypass]>, 156*0b57cec5SDimitry Andric InstrItinData<IIC_LdStDCBA, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 157*0b57cec5SDimitry Andric InstrStage<1, [E5500_LSU_0]>], 158*0b57cec5SDimitry Andric [7, 2], // Latency = 3, Repeat rate = 1 159*0b57cec5SDimitry Andric [E5500_GPR_Bypass, E5500_GPR_Bypass]>, 160*0b57cec5SDimitry Andric InstrItinData<IIC_LdStDCBF, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 161*0b57cec5SDimitry Andric InstrStage<1, [E5500_LSU_0]>], 162*0b57cec5SDimitry Andric [7, 2], // Latency = 3, Repeat rate = 1 163*0b57cec5SDimitry Andric [E5500_GPR_Bypass, E5500_GPR_Bypass]>, 164*0b57cec5SDimitry Andric InstrItinData<IIC_LdStDCBI, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 165*0b57cec5SDimitry Andric InstrStage<1, [E5500_LSU_0]>], 166*0b57cec5SDimitry Andric [7, 2], // Latency = 3, Repeat rate = 1 167*0b57cec5SDimitry Andric [E5500_GPR_Bypass, E5500_GPR_Bypass]>, 168*0b57cec5SDimitry Andric InstrItinData<IIC_LdStLoad, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 169*0b57cec5SDimitry Andric InstrStage<1, [E5500_LSU_0]>], 170*0b57cec5SDimitry Andric [7, 2], // Latency = 3 171*0b57cec5SDimitry Andric [E5500_GPR_Bypass, E5500_GPR_Bypass]>, 172*0b57cec5SDimitry Andric InstrItinData<IIC_LdStLoadUpd, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 173*0b57cec5SDimitry Andric InstrStage<1, [E5500_SFX0, E5500_SFX1], 0>, 174*0b57cec5SDimitry Andric InstrStage<1, [E5500_LSU_0]>], 175*0b57cec5SDimitry Andric [7, 2], // Latency = 3, Repeat rate = 1 176*0b57cec5SDimitry Andric [E5500_GPR_Bypass, E5500_GPR_Bypass], 177*0b57cec5SDimitry Andric 2>, // 2 micro-ops 178*0b57cec5SDimitry Andric InstrItinData<IIC_LdStLoadUpdX,[InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 179*0b57cec5SDimitry Andric InstrStage<1, [E5500_SFX0, E5500_SFX1], 0>, 180*0b57cec5SDimitry Andric InstrStage<1, [E5500_LSU_0]>], 181*0b57cec5SDimitry Andric [7, 2], // Latency = 3, Repeat rate = 1 182*0b57cec5SDimitry Andric [E5500_GPR_Bypass, E5500_GPR_Bypass], 183*0b57cec5SDimitry Andric 2>, // 2 micro-ops 184*0b57cec5SDimitry Andric InstrItinData<IIC_LdStLD, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 185*0b57cec5SDimitry Andric InstrStage<1, [E5500_LSU_0]>], 186*0b57cec5SDimitry Andric [7, 2], // Latency = 3, Repeat rate = 1 187*0b57cec5SDimitry Andric [E5500_GPR_Bypass, E5500_GPR_Bypass]>, 188*0b57cec5SDimitry Andric InstrItinData<IIC_LdStLDARX, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 189*0b57cec5SDimitry Andric InstrStage<3, [E5500_LSU_0]>], 190*0b57cec5SDimitry Andric [7, 2], // Latency = 3, Repeat rate = 3 191*0b57cec5SDimitry Andric [E5500_GPR_Bypass, E5500_GPR_Bypass]>, 192*0b57cec5SDimitry Andric InstrItinData<IIC_LdStLDU, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 193*0b57cec5SDimitry Andric InstrStage<1, [E5500_SFX0, E5500_SFX1], 0>, 194*0b57cec5SDimitry Andric InstrStage<1, [E5500_LSU_0]>], 195*0b57cec5SDimitry Andric [7, 2], // Latency = 3, Repeat rate = 1 196*0b57cec5SDimitry Andric [E5500_GPR_Bypass, E5500_GPR_Bypass], 197*0b57cec5SDimitry Andric 2>, // 2 micro-ops 198*0b57cec5SDimitry Andric InstrItinData<IIC_LdStLDUX, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 199*0b57cec5SDimitry Andric InstrStage<1, [E5500_SFX0, E5500_SFX1], 0>, 200*0b57cec5SDimitry Andric InstrStage<1, [E5500_LSU_0]>], 201*0b57cec5SDimitry Andric [7, 2], // Latency = 3, Repeat rate = 1 202*0b57cec5SDimitry Andric [E5500_GPR_Bypass, E5500_GPR_Bypass], 203*0b57cec5SDimitry Andric 2>, // 2 micro-ops 204*0b57cec5SDimitry Andric InstrItinData<IIC_LdStStore, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 205*0b57cec5SDimitry Andric InstrStage<1, [E5500_LSU_0]>], 206*0b57cec5SDimitry Andric [7, 2], // Latency = 3, Repeat rate = 1 207*0b57cec5SDimitry Andric [NoBypass, E5500_GPR_Bypass]>, 208*0b57cec5SDimitry Andric InstrItinData<IIC_LdStICBI, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 209*0b57cec5SDimitry Andric InstrStage<1, [E5500_LSU_0]>], 210*0b57cec5SDimitry Andric [7, 2], // Latency = 3, Repeat rate = 1 211*0b57cec5SDimitry Andric [NoBypass, E5500_GPR_Bypass]>, 212*0b57cec5SDimitry Andric InstrItinData<IIC_LdStSTFD, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 213*0b57cec5SDimitry Andric InstrStage<1, [E5500_LSU_0]>], 214*0b57cec5SDimitry Andric [7, 2, 2], // Latency = 3, Repeat rate = 1 215*0b57cec5SDimitry Andric [E5500_GPR_Bypass, 216*0b57cec5SDimitry Andric E5500_GPR_Bypass, E5500_GPR_Bypass]>, 217*0b57cec5SDimitry Andric InstrItinData<IIC_LdStSTFDU, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 218*0b57cec5SDimitry Andric InstrStage<1, [E5500_SFX0, E5500_SFX1], 0>, 219*0b57cec5SDimitry Andric InstrStage<1, [E5500_LSU_0]>], 220*0b57cec5SDimitry Andric [7, 2, 2], // Latency = 3, Repeat rate = 1 221*0b57cec5SDimitry Andric [E5500_GPR_Bypass, 222*0b57cec5SDimitry Andric E5500_GPR_Bypass, E5500_GPR_Bypass], 223*0b57cec5SDimitry Andric 2>, // 2 micro-ops 224*0b57cec5SDimitry Andric InstrItinData<IIC_LdStLFD, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 225*0b57cec5SDimitry Andric InstrStage<1, [E5500_LSU_0]>], 226*0b57cec5SDimitry Andric [8, 2, 2], // Latency = 4, Repeat rate = 1 227*0b57cec5SDimitry Andric [E5500_FPR_Bypass, 228*0b57cec5SDimitry Andric E5500_GPR_Bypass, E5500_GPR_Bypass], 229*0b57cec5SDimitry Andric 2>, // 2 micro-ops 230*0b57cec5SDimitry Andric InstrItinData<IIC_LdStLFDU, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 231*0b57cec5SDimitry Andric InstrStage<1, [E5500_SFX0, E5500_SFX1], 0>, 232*0b57cec5SDimitry Andric InstrStage<1, [E5500_LSU_0]>], 233*0b57cec5SDimitry Andric [8, 2, 2], // Latency = 4, Repeat rate = 1 234*0b57cec5SDimitry Andric [E5500_FPR_Bypass, 235*0b57cec5SDimitry Andric E5500_GPR_Bypass, E5500_GPR_Bypass], 236*0b57cec5SDimitry Andric 2>, // 2 micro-ops 237*0b57cec5SDimitry Andric InstrItinData<IIC_LdStLFDUX, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 238*0b57cec5SDimitry Andric InstrStage<1, [E5500_SFX0, E5500_SFX1], 0>, 239*0b57cec5SDimitry Andric InstrStage<1, [E5500_LSU_0]>], 240*0b57cec5SDimitry Andric [8, 2, 2], // Latency = 4, Repeat rate = 1 241*0b57cec5SDimitry Andric [E5500_FPR_Bypass, 242*0b57cec5SDimitry Andric E5500_GPR_Bypass, E5500_GPR_Bypass], 243*0b57cec5SDimitry Andric 2>, // 2 micro-ops 244*0b57cec5SDimitry Andric InstrItinData<IIC_LdStLHA, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 245*0b57cec5SDimitry Andric InstrStage<1, [E5500_LSU_0]>], 246*0b57cec5SDimitry Andric [7, 2], // Latency = 3 247*0b57cec5SDimitry Andric [E5500_GPR_Bypass, E5500_GPR_Bypass]>, 248*0b57cec5SDimitry Andric InstrItinData<IIC_LdStLHAU, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 249*0b57cec5SDimitry Andric InstrStage<1, [E5500_SFX0, E5500_SFX1], 0>, 250*0b57cec5SDimitry Andric InstrStage<1, [E5500_LSU_0]>], 251*0b57cec5SDimitry Andric [7, 2], // Latency = 3, Repeat rate = 1 252*0b57cec5SDimitry Andric [E5500_GPR_Bypass, E5500_GPR_Bypass], 253*0b57cec5SDimitry Andric 2>, // 2 micro-ops 254*0b57cec5SDimitry Andric InstrItinData<IIC_LdStLHAUX, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 255*0b57cec5SDimitry Andric InstrStage<1, [E5500_SFX0, E5500_SFX1], 0>, 256*0b57cec5SDimitry Andric InstrStage<1, [E5500_LSU_0]>], 257*0b57cec5SDimitry Andric [7, 2], // Latency = 3, Repeat rate = 1 258*0b57cec5SDimitry Andric [E5500_GPR_Bypass, E5500_GPR_Bypass], 259*0b57cec5SDimitry Andric 2>, // 2 micro-ops 260*0b57cec5SDimitry Andric InstrItinData<IIC_LdStLMW, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 261*0b57cec5SDimitry Andric InstrStage<4, [E5500_LSU_0]>], 262*0b57cec5SDimitry Andric [8, 2], // Latency = r+3, Repeat rate = r+3 263*0b57cec5SDimitry Andric [NoBypass, E5500_GPR_Bypass]>, 264*0b57cec5SDimitry Andric InstrItinData<IIC_LdStLWARX, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 265*0b57cec5SDimitry Andric InstrStage<3, [E5500_LSU_0]>], 266*0b57cec5SDimitry Andric [7, 2, 2], // Latency = 3, Repeat rate = 3 267*0b57cec5SDimitry Andric [E5500_GPR_Bypass, 268*0b57cec5SDimitry Andric E5500_GPR_Bypass, E5500_GPR_Bypass]>, 269*0b57cec5SDimitry Andric InstrItinData<IIC_LdStSTD, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 270*0b57cec5SDimitry Andric InstrStage<1, [E5500_LSU_0]>], 271*0b57cec5SDimitry Andric [7, 2], // Latency = 3, Repeat rate = 1 272*0b57cec5SDimitry Andric [NoBypass, E5500_GPR_Bypass]>, 273*0b57cec5SDimitry Andric InstrItinData<IIC_LdStSTDCX, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 274*0b57cec5SDimitry Andric InstrStage<1, [E5500_LSU_0]>], 275*0b57cec5SDimitry Andric [7, 2], // Latency = 3, Repeat rate = 1 276*0b57cec5SDimitry Andric [NoBypass, E5500_GPR_Bypass]>, 277*0b57cec5SDimitry Andric InstrItinData<IIC_LdStSTU, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 278*0b57cec5SDimitry Andric InstrStage<1, [E5500_SFX0, E5500_SFX1], 0>, 279*0b57cec5SDimitry Andric InstrStage<1, [E5500_LSU_0]>], 280*0b57cec5SDimitry Andric [7, 2], // Latency = 3, Repeat rate = 1 281*0b57cec5SDimitry Andric [NoBypass, E5500_GPR_Bypass], 282*0b57cec5SDimitry Andric 2>, // 2 micro-ops 283*0b57cec5SDimitry Andric InstrItinData<IIC_LdStSTUX, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 284*0b57cec5SDimitry Andric InstrStage<1, [E5500_SFX0, E5500_SFX1], 0>, 285*0b57cec5SDimitry Andric InstrStage<1, [E5500_LSU_0]>], 286*0b57cec5SDimitry Andric [7, 2], // Latency = 3, Repeat rate = 1 287*0b57cec5SDimitry Andric [NoBypass, E5500_GPR_Bypass], 288*0b57cec5SDimitry Andric 2>, // 2 micro-ops 289*0b57cec5SDimitry Andric InstrItinData<IIC_LdStSTWCX, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 290*0b57cec5SDimitry Andric InstrStage<1, [E5500_LSU_0]>], 291*0b57cec5SDimitry Andric [7, 2], // Latency = 3, Repeat rate = 1 292*0b57cec5SDimitry Andric [NoBypass, E5500_GPR_Bypass]>, 293*0b57cec5SDimitry Andric InstrItinData<IIC_LdStSync, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 294*0b57cec5SDimitry Andric InstrStage<1, [E5500_LSU_0]>]>, 295*0b57cec5SDimitry Andric InstrItinData<IIC_SprMTMSR, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 296*0b57cec5SDimitry Andric InstrStage<2, [E5500_CFX_0]>], 297*0b57cec5SDimitry Andric [6, 2], // Latency = 2, Repeat rate = 4 298*0b57cec5SDimitry Andric [E5500_GPR_Bypass, E5500_GPR_Bypass]>, 299*0b57cec5SDimitry Andric InstrItinData<IIC_SprTLBSYNC, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 300*0b57cec5SDimitry Andric InstrStage<1, [E5500_LSU_0], 0>]>, 301*0b57cec5SDimitry Andric InstrItinData<IIC_SprMFCR, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 302*0b57cec5SDimitry Andric InstrStage<5, [E5500_CFX_0]>], 303*0b57cec5SDimitry Andric [9, 2], // Latency = 5, Repeat rate = 5 304*0b57cec5SDimitry Andric [E5500_GPR_Bypass, E5500_CR_Bypass]>, 305*0b57cec5SDimitry Andric InstrItinData<IIC_SprMFCRF, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 306*0b57cec5SDimitry Andric InstrStage<5, [E5500_CFX_0]>], 307*0b57cec5SDimitry Andric [9, 2], // Latency = 5, Repeat rate = 5 308*0b57cec5SDimitry Andric [E5500_GPR_Bypass, E5500_CR_Bypass]>, 309*0b57cec5SDimitry Andric InstrItinData<IIC_SprMFPMR, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 310*0b57cec5SDimitry Andric InstrStage<4, [E5500_CFX_0]>], 311*0b57cec5SDimitry Andric [8, 2], // Latency = 4, Repeat rate = 4 312*0b57cec5SDimitry Andric [E5500_GPR_Bypass, E5500_GPR_Bypass]>, 313*0b57cec5SDimitry Andric InstrItinData<IIC_SprMFSPR, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 314*0b57cec5SDimitry Andric InstrStage<1, [E5500_CFX_0]>], 315*0b57cec5SDimitry Andric [5], // Latency = 1, Repeat rate = 1 316*0b57cec5SDimitry Andric [E5500_GPR_Bypass]>, 317*0b57cec5SDimitry Andric InstrItinData<IIC_SprMTPMR, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 318*0b57cec5SDimitry Andric InstrStage<1, [E5500_CFX_0]>], 319*0b57cec5SDimitry Andric [5], // Latency = 1, Repeat rate = 1 320*0b57cec5SDimitry Andric [E5500_GPR_Bypass]>, 321*0b57cec5SDimitry Andric InstrItinData<IIC_SprMFTB, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 322*0b57cec5SDimitry Andric InstrStage<4, [E5500_CFX_0]>], 323*0b57cec5SDimitry Andric [8, 2], // Latency = 4, Repeat rate = 4 324*0b57cec5SDimitry Andric [NoBypass, E5500_GPR_Bypass]>, 325*0b57cec5SDimitry Andric InstrItinData<IIC_SprMTSPR, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 326*0b57cec5SDimitry Andric InstrStage<1, [E5500_CFX_0]>], 327*0b57cec5SDimitry Andric [5], // Latency = 1, Repeat rate = 1 328*0b57cec5SDimitry Andric [E5500_GPR_Bypass]>, 329*0b57cec5SDimitry Andric InstrItinData<IIC_FPGeneral, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 330*0b57cec5SDimitry Andric InstrStage<1, [E5500_FPU_0]>], 331*0b57cec5SDimitry Andric [11, 2, 2], // Latency = 7, Repeat rate = 1 332*0b57cec5SDimitry Andric [E5500_FPR_Bypass, 333*0b57cec5SDimitry Andric E5500_FPR_Bypass, E5500_FPR_Bypass]>, 334*0b57cec5SDimitry Andric InstrItinData<IIC_FPAddSub, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 335*0b57cec5SDimitry Andric InstrStage<1, [E5500_FPU_0]>], 336*0b57cec5SDimitry Andric [11, 2, 2], // Latency = 7, Repeat rate = 1 337*0b57cec5SDimitry Andric [E5500_FPR_Bypass, 338*0b57cec5SDimitry Andric E5500_FPR_Bypass, E5500_FPR_Bypass]>, 339*0b57cec5SDimitry Andric InstrItinData<IIC_FPCompare, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 340*0b57cec5SDimitry Andric InstrStage<1, [E5500_FPU_0]>], 341*0b57cec5SDimitry Andric [11, 2, 2], // Latency = 7, Repeat rate = 1 342*0b57cec5SDimitry Andric [E5500_CR_Bypass, 343*0b57cec5SDimitry Andric E5500_FPR_Bypass, E5500_FPR_Bypass]>, 344*0b57cec5SDimitry Andric InstrItinData<IIC_FPDivD, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 345*0b57cec5SDimitry Andric InstrStage<31, [E5500_FPU_0]>], 346*0b57cec5SDimitry Andric [39, 2, 2], // Latency = 35, Repeat rate = 31 347*0b57cec5SDimitry Andric [E5500_FPR_Bypass, 348*0b57cec5SDimitry Andric E5500_FPR_Bypass, E5500_FPR_Bypass]>, 349*0b57cec5SDimitry Andric InstrItinData<IIC_FPDivS, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 350*0b57cec5SDimitry Andric InstrStage<16, [E5500_FPU_0]>], 351*0b57cec5SDimitry Andric [24, 2, 2], // Latency = 20, Repeat rate = 16 352*0b57cec5SDimitry Andric [E5500_FPR_Bypass, 353*0b57cec5SDimitry Andric E5500_FPR_Bypass, E5500_FPR_Bypass]>, 354*0b57cec5SDimitry Andric InstrItinData<IIC_FPFused, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 355*0b57cec5SDimitry Andric InstrStage<1, [E5500_FPU_0]>], 356*0b57cec5SDimitry Andric [11, 2, 2, 2], // Latency = 7, Repeat rate = 1 357*0b57cec5SDimitry Andric [E5500_FPR_Bypass, 358*0b57cec5SDimitry Andric E5500_FPR_Bypass, E5500_FPR_Bypass, 359*0b57cec5SDimitry Andric E5500_FPR_Bypass]>, 360*0b57cec5SDimitry Andric InstrItinData<IIC_FPRes, [InstrStage<1, [E5500_DIS0, E5500_DIS1], 0>, 361*0b57cec5SDimitry Andric InstrStage<2, [E5500_FPU_0]>], 362*0b57cec5SDimitry Andric [12, 2], // Latency = 8, Repeat rate = 2 363*0b57cec5SDimitry Andric [E5500_FPR_Bypass, E5500_FPR_Bypass]> 364*0b57cec5SDimitry Andric]>; 365*0b57cec5SDimitry Andric 366*0b57cec5SDimitry Andric// ===---------------------------------------------------------------------===// 367*0b57cec5SDimitry Andric// e5500 machine model for scheduling and other instruction cost heuristics. 368*0b57cec5SDimitry Andric 369*0b57cec5SDimitry Andricdef PPCE5500Model : SchedMachineModel { 370*0b57cec5SDimitry Andric let IssueWidth = 2; // 2 micro-ops are dispatched per cycle. 371*0b57cec5SDimitry Andric let LoadLatency = 6; // Optimistic load latency assuming bypass. 372*0b57cec5SDimitry Andric // This is overriden by OperandCycles if the 373*0b57cec5SDimitry Andric // Itineraries are queried instead. 374*0b57cec5SDimitry Andric 375*0b57cec5SDimitry Andric let CompleteModel = 0; 376*0b57cec5SDimitry Andric 377*0b57cec5SDimitry Andric let Itineraries = PPCE5500Itineraries; 378*0b57cec5SDimitry Andric} 379