xref: /freebsd-src/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCScheduleE500mc.td (revision 0b57cec536236d46e3dba9bd041533462f33dbb7)
1*0b57cec5SDimitry Andric//===-- PPCScheduleE500mc.td - e500mc 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 e500mc 32-bit
10*0b57cec5SDimitry Andric// Power processor.
11*0b57cec5SDimitry Andric//
12*0b57cec5SDimitry Andric// All information is derived from the "e500mc Core Reference Manual",
13*0b57cec5SDimitry Andric// Freescale Document Number E500MCRM, Rev. 1, 03/2012.
14*0b57cec5SDimitry Andric//
15*0b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
16*0b57cec5SDimitry Andric// Relevant functional units in the Freescale e500mc core:
17*0b57cec5SDimitry Andric//
18*0b57cec5SDimitry Andric//  * Decode & Dispatch
19*0b57cec5SDimitry Andric//    Can dispatch up to 2 instructions per clock cycle to either the GPR Issue
20*0b57cec5SDimitry Andric//    queues (GIQx), FP Issue Queue (FIQ), or Branch issue queue (BIQ).
21*0b57cec5SDimitry Andricdef E500mc_DIS0 : FuncUnit; // Dispatch stage - insn 1
22*0b57cec5SDimitry Andricdef E500mc_DIS1 : FuncUnit; // Dispatch stage - insn 2
23*0b57cec5SDimitry Andric
24*0b57cec5SDimitry Andric//  * Execute
25*0b57cec5SDimitry Andric//    6 pipelined execution units: SFX0, SFX1, BU, FPU, LSU, CFX.
26*0b57cec5SDimitry Andric//    Some instructions can only execute in SFX0 but not SFX1.
27*0b57cec5SDimitry Andric//    The CFX has a bypass path, allowing non-divide instructions to execute
28*0b57cec5SDimitry Andric//    while a divide instruction is executed.
29*0b57cec5SDimitry Andricdef E500mc_SFX0  : FuncUnit; // Simple unit 0
30*0b57cec5SDimitry Andricdef E500mc_SFX1  : FuncUnit; // Simple unit 1
31*0b57cec5SDimitry Andricdef E500mc_BU    : FuncUnit; // Branch unit
32*0b57cec5SDimitry Andricdef E500mc_CFX_DivBypass
33*0b57cec5SDimitry Andric               : FuncUnit; // CFX divide bypass path
34*0b57cec5SDimitry Andricdef E500mc_CFX_0 : FuncUnit; // CFX pipeline
35*0b57cec5SDimitry Andricdef E500mc_LSU_0 : FuncUnit; // LSU pipeline
36*0b57cec5SDimitry Andricdef E500mc_FPU_0 : FuncUnit; // FPU pipeline
37*0b57cec5SDimitry Andric
38*0b57cec5SDimitry Andricdef E500mc_GPR_Bypass : Bypass;
39*0b57cec5SDimitry Andricdef E500mc_FPR_Bypass : Bypass;
40*0b57cec5SDimitry Andricdef E500mc_CR_Bypass  : Bypass;
41*0b57cec5SDimitry Andric
42*0b57cec5SDimitry Andricdef PPCE500mcItineraries : ProcessorItineraries<
43*0b57cec5SDimitry Andric  [E500mc_DIS0, E500mc_DIS1, E500mc_SFX0, E500mc_SFX1, E500mc_BU, E500mc_CFX_DivBypass,
44*0b57cec5SDimitry Andric   E500mc_CFX_0, E500mc_LSU_0, E500mc_FPU_0],
45*0b57cec5SDimitry Andric  [E500mc_CR_Bypass, E500mc_GPR_Bypass, E500mc_FPR_Bypass], [
46*0b57cec5SDimitry Andric  InstrItinData<IIC_IntSimple,   [InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
47*0b57cec5SDimitry Andric                                  InstrStage<1, [E500mc_SFX0, E500mc_SFX1]>],
48*0b57cec5SDimitry Andric                                 [4, 1, 1], // Latency = 1
49*0b57cec5SDimitry Andric                                 [E500mc_GPR_Bypass,
50*0b57cec5SDimitry Andric                                  E500mc_GPR_Bypass, E500mc_GPR_Bypass]>,
51*0b57cec5SDimitry Andric  InstrItinData<IIC_IntGeneral,  [InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
52*0b57cec5SDimitry Andric                                  InstrStage<1, [E500mc_SFX0, E500mc_SFX1]>],
53*0b57cec5SDimitry Andric                                 [4, 1, 1], // Latency = 1
54*0b57cec5SDimitry Andric                                 [E500mc_GPR_Bypass,
55*0b57cec5SDimitry Andric                                  E500mc_GPR_Bypass, E500mc_GPR_Bypass]>,
56*0b57cec5SDimitry Andric  InstrItinData<IIC_IntISEL,     [InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
57*0b57cec5SDimitry Andric                                  InstrStage<1, [E500mc_SFX0, E500mc_SFX1]>],
58*0b57cec5SDimitry Andric                                 [4, 1, 1, 1], // Latency = 1
59*0b57cec5SDimitry Andric                                 [E500mc_GPR_Bypass,
60*0b57cec5SDimitry Andric                                  E500mc_GPR_Bypass, E500mc_GPR_Bypass,
61*0b57cec5SDimitry Andric                                  E500mc_CR_Bypass]>,
62*0b57cec5SDimitry Andric  InstrItinData<IIC_IntCompare,  [InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
63*0b57cec5SDimitry Andric                                  InstrStage<1, [E500mc_SFX0, E500mc_SFX1]>],
64*0b57cec5SDimitry Andric                                 [5, 1, 1], // Latency = 1 or 2
65*0b57cec5SDimitry Andric                                 [E500mc_CR_Bypass,
66*0b57cec5SDimitry Andric                                  E500mc_GPR_Bypass, E500mc_GPR_Bypass]>,
67*0b57cec5SDimitry Andric  InstrItinData<IIC_IntDivW,     [InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
68*0b57cec5SDimitry Andric                                  InstrStage<1, [E500mc_CFX_0], 0>,
69*0b57cec5SDimitry Andric                                  InstrStage<14, [E500mc_CFX_DivBypass]>],
70*0b57cec5SDimitry Andric                                 [17, 1, 1], // Latency=4..35, Repeat= 4..35
71*0b57cec5SDimitry Andric                                 [E500mc_GPR_Bypass,
72*0b57cec5SDimitry Andric                                  E500mc_GPR_Bypass, E500mc_GPR_Bypass]>,
73*0b57cec5SDimitry Andric  InstrItinData<IIC_IntMFFS,     [InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
74*0b57cec5SDimitry Andric                                  InstrStage<8, [E500mc_FPU_0]>],
75*0b57cec5SDimitry Andric                                 [11], // Latency = 8
76*0b57cec5SDimitry Andric                                 [E500mc_FPR_Bypass]>,
77*0b57cec5SDimitry Andric  InstrItinData<IIC_IntMTFSB0,   [InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
78*0b57cec5SDimitry Andric                                  InstrStage<8, [E500mc_FPU_0]>],
79*0b57cec5SDimitry Andric                                 [11, 1, 1], // Latency = 8
80*0b57cec5SDimitry Andric                                 [NoBypass, NoBypass, NoBypass]>,
81*0b57cec5SDimitry Andric  InstrItinData<IIC_IntMulHW,    [InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
82*0b57cec5SDimitry Andric                                  InstrStage<1, [E500mc_CFX_0]>],
83*0b57cec5SDimitry Andric                                 [7, 1, 1], // Latency = 4, Repeat rate = 1
84*0b57cec5SDimitry Andric                                 [E500mc_GPR_Bypass,
85*0b57cec5SDimitry Andric                                  E500mc_GPR_Bypass, E500mc_GPR_Bypass]>,
86*0b57cec5SDimitry Andric  InstrItinData<IIC_IntMulHWU,   [InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
87*0b57cec5SDimitry Andric                                  InstrStage<1, [E500mc_CFX_0]>],
88*0b57cec5SDimitry Andric                                 [7, 1, 1], // Latency = 4, Repeat rate = 1
89*0b57cec5SDimitry Andric                                 [E500mc_GPR_Bypass,
90*0b57cec5SDimitry Andric                                  E500mc_GPR_Bypass, E500mc_GPR_Bypass]>,
91*0b57cec5SDimitry Andric  InstrItinData<IIC_IntMulLI,    [InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
92*0b57cec5SDimitry Andric                                  InstrStage<1, [E500mc_CFX_0]>],
93*0b57cec5SDimitry Andric                                 [7, 1, 1], // Latency = 4, Repeat rate = 1
94*0b57cec5SDimitry Andric                                 [E500mc_GPR_Bypass,
95*0b57cec5SDimitry Andric                                  E500mc_GPR_Bypass, E500mc_GPR_Bypass]>,
96*0b57cec5SDimitry Andric  InstrItinData<IIC_IntRotate,   [InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
97*0b57cec5SDimitry Andric                                  InstrStage<1, [E500mc_SFX0, E500mc_SFX1]>],
98*0b57cec5SDimitry Andric                                 [4, 1, 1], // Latency = 1
99*0b57cec5SDimitry Andric                                 [E500mc_GPR_Bypass,
100*0b57cec5SDimitry Andric                                  E500mc_GPR_Bypass, E500mc_GPR_Bypass]>,
101*0b57cec5SDimitry Andric  InstrItinData<IIC_IntShift,    [InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
102*0b57cec5SDimitry Andric                                  InstrStage<1, [E500mc_SFX0, E500mc_SFX1]>],
103*0b57cec5SDimitry Andric                                 [4, 1, 1], // Latency = 1
104*0b57cec5SDimitry Andric                                 [E500mc_GPR_Bypass,
105*0b57cec5SDimitry Andric                                  E500mc_GPR_Bypass, E500mc_GPR_Bypass]>,
106*0b57cec5SDimitry Andric  InstrItinData<IIC_IntTrapW,    [InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
107*0b57cec5SDimitry Andric                                  InstrStage<2, [E500mc_SFX0]>],
108*0b57cec5SDimitry Andric                                 [5, 1], // Latency = 2, Repeat rate = 2
109*0b57cec5SDimitry Andric                                 [E500mc_GPR_Bypass, E500mc_GPR_Bypass]>,
110*0b57cec5SDimitry Andric  InstrItinData<IIC_BrB,         [InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
111*0b57cec5SDimitry Andric                                  InstrStage<1, [E500mc_BU]>],
112*0b57cec5SDimitry Andric                                 [4, 1], // Latency = 1
113*0b57cec5SDimitry Andric                                 [NoBypass, E500mc_GPR_Bypass]>,
114*0b57cec5SDimitry Andric  InstrItinData<IIC_BrCR,        [InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
115*0b57cec5SDimitry Andric                                  InstrStage<1, [E500mc_BU]>],
116*0b57cec5SDimitry Andric                                 [4, 1, 1], // Latency = 1
117*0b57cec5SDimitry Andric                                 [E500mc_CR_Bypass,
118*0b57cec5SDimitry Andric                                  E500mc_CR_Bypass, E500mc_CR_Bypass]>,
119*0b57cec5SDimitry Andric  InstrItinData<IIC_BrMCR,       [InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
120*0b57cec5SDimitry Andric                                  InstrStage<1, [E500mc_BU]>],
121*0b57cec5SDimitry Andric                                 [4, 1], // Latency = 1
122*0b57cec5SDimitry Andric                                 [E500mc_CR_Bypass, E500mc_CR_Bypass]>,
123*0b57cec5SDimitry Andric  InstrItinData<IIC_BrMCRX,      [InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
124*0b57cec5SDimitry Andric                                  InstrStage<1, [E500mc_SFX0, E500mc_SFX1]>],
125*0b57cec5SDimitry Andric                                 [4, 1, 1], // Latency = 1
126*0b57cec5SDimitry Andric                                 [E500mc_CR_Bypass, E500mc_GPR_Bypass]>,
127*0b57cec5SDimitry Andric  InstrItinData<IIC_LdStDCBA,    [InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
128*0b57cec5SDimitry Andric                                  InstrStage<1, [E500mc_LSU_0]>],
129*0b57cec5SDimitry Andric                                 [6, 1], // Latency = 3, Repeat rate = 1
130*0b57cec5SDimitry Andric                                 [E500mc_GPR_Bypass, E500mc_GPR_Bypass]>,
131*0b57cec5SDimitry Andric  InstrItinData<IIC_LdStDCBF,    [InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
132*0b57cec5SDimitry Andric                                  InstrStage<1, [E500mc_LSU_0]>],
133*0b57cec5SDimitry Andric                                 [6, 1], // Latency = 3
134*0b57cec5SDimitry Andric                                 [E500mc_GPR_Bypass, E500mc_GPR_Bypass]>,
135*0b57cec5SDimitry Andric  InstrItinData<IIC_LdStDCBI,    [InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
136*0b57cec5SDimitry Andric                                  InstrStage<1, [E500mc_LSU_0]>],
137*0b57cec5SDimitry Andric                                 [6, 1], // Latency = 3
138*0b57cec5SDimitry Andric                                 [E500mc_GPR_Bypass, E500mc_GPR_Bypass]>,
139*0b57cec5SDimitry Andric  InstrItinData<IIC_LdStLoad,    [InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
140*0b57cec5SDimitry Andric                                  InstrStage<1, [E500mc_LSU_0]>],
141*0b57cec5SDimitry Andric                                 [6, 1], // Latency = 3
142*0b57cec5SDimitry Andric                                 [E500mc_GPR_Bypass, E500mc_GPR_Bypass]>,
143*0b57cec5SDimitry Andric  InstrItinData<IIC_LdStLoadUpd, [InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
144*0b57cec5SDimitry Andric                                  InstrStage<1, [E500mc_SFX0, E500mc_SFX1], 0>,
145*0b57cec5SDimitry Andric                                  InstrStage<1, [E500mc_LSU_0]>],
146*0b57cec5SDimitry Andric                                 [6, 1], // Latency = 3
147*0b57cec5SDimitry Andric                                 [E500mc_GPR_Bypass, E500mc_GPR_Bypass],
148*0b57cec5SDimitry Andric                                 2>, // 2 micro-ops
149*0b57cec5SDimitry Andric  InstrItinData<IIC_LdStLoadUpdX,[InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
150*0b57cec5SDimitry Andric                                  InstrStage<1, [E500mc_SFX0, E500mc_SFX1], 0>,
151*0b57cec5SDimitry Andric                                  InstrStage<1, [E500mc_LSU_0]>],
152*0b57cec5SDimitry Andric                                 [6, 1], // Latency = 3
153*0b57cec5SDimitry Andric                                 [E500mc_GPR_Bypass, E500mc_GPR_Bypass],
154*0b57cec5SDimitry Andric                                 2>, // 2 micro-ops
155*0b57cec5SDimitry Andric  InstrItinData<IIC_LdStStore,   [InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
156*0b57cec5SDimitry Andric                                  InstrStage<1, [E500mc_LSU_0]>],
157*0b57cec5SDimitry Andric                                 [6, 1], // Latency = 3
158*0b57cec5SDimitry Andric                                 [NoBypass, E500mc_GPR_Bypass]>,
159*0b57cec5SDimitry Andric  InstrItinData<IIC_LdStSTU,     [InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
160*0b57cec5SDimitry Andric                                  InstrStage<1, [E500mc_SFX0, E500mc_SFX1], 0>,
161*0b57cec5SDimitry Andric                                  InstrStage<1, [E500mc_LSU_0]>],
162*0b57cec5SDimitry Andric                                 [6, 1], // Latency = 3
163*0b57cec5SDimitry Andric                                 [NoBypass, E500mc_GPR_Bypass],
164*0b57cec5SDimitry Andric                                 2>, // 2 micro-ops
165*0b57cec5SDimitry Andric  InstrItinData<IIC_LdStSTUX,    [InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
166*0b57cec5SDimitry Andric                                  InstrStage<1, [E500mc_SFX0, E500mc_SFX1], 0>,
167*0b57cec5SDimitry Andric                                  InstrStage<1, [E500mc_LSU_0]>],
168*0b57cec5SDimitry Andric                                 [6, 1], // Latency = 3
169*0b57cec5SDimitry Andric                                 [NoBypass, E500mc_GPR_Bypass],
170*0b57cec5SDimitry Andric                                 2>, // 2 micro-ops
171*0b57cec5SDimitry Andric  InstrItinData<IIC_LdStICBI,    [InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
172*0b57cec5SDimitry Andric                                  InstrStage<1, [E500mc_LSU_0]>],
173*0b57cec5SDimitry Andric                                 [6, 1], // Latency = 3
174*0b57cec5SDimitry Andric                                 [NoBypass, E500mc_GPR_Bypass]>,
175*0b57cec5SDimitry Andric  InstrItinData<IIC_LdStSTFD,    [InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
176*0b57cec5SDimitry Andric                                  InstrStage<1, [E500mc_LSU_0]>],
177*0b57cec5SDimitry Andric                                 [6, 1, 1], // Latency = 3
178*0b57cec5SDimitry Andric                                 [E500mc_GPR_Bypass,
179*0b57cec5SDimitry Andric                                  E500mc_GPR_Bypass, E500mc_GPR_Bypass]>,
180*0b57cec5SDimitry Andric  InstrItinData<IIC_LdStSTFDU,   [InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
181*0b57cec5SDimitry Andric                                  InstrStage<1, [E500mc_SFX0, E500mc_SFX1], 0>,
182*0b57cec5SDimitry Andric                                  InstrStage<1, [E500mc_LSU_0]>],
183*0b57cec5SDimitry Andric                                 [6, 1, 1], // Latency = 3
184*0b57cec5SDimitry Andric                                 [E500mc_GPR_Bypass,
185*0b57cec5SDimitry Andric                                  E500mc_GPR_Bypass, E500mc_GPR_Bypass],
186*0b57cec5SDimitry Andric                                 2>, // 2 micro-ops
187*0b57cec5SDimitry Andric  InstrItinData<IIC_LdStLFD,     [InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
188*0b57cec5SDimitry Andric                                  InstrStage<1, [E500mc_LSU_0]>],
189*0b57cec5SDimitry Andric                                 [7, 1, 1], // Latency = 4
190*0b57cec5SDimitry Andric                                 [E500mc_FPR_Bypass,
191*0b57cec5SDimitry Andric                                  E500mc_GPR_Bypass, E500mc_GPR_Bypass]>,
192*0b57cec5SDimitry Andric  InstrItinData<IIC_LdStLFDU,    [InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
193*0b57cec5SDimitry Andric                                  InstrStage<1, [E500mc_SFX0, E500mc_SFX1], 0>,
194*0b57cec5SDimitry Andric                                  InstrStage<1, [E500mc_LSU_0]>],
195*0b57cec5SDimitry Andric                                 [7, 1, 1], // Latency = 4
196*0b57cec5SDimitry Andric                                 [E500mc_FPR_Bypass,
197*0b57cec5SDimitry Andric                                  E500mc_GPR_Bypass, E500mc_GPR_Bypass],
198*0b57cec5SDimitry Andric                                 2>, // 2 micro-ops
199*0b57cec5SDimitry Andric  InstrItinData<IIC_LdStLFDUX,   [InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
200*0b57cec5SDimitry Andric                                  InstrStage<1, [E500mc_SFX0, E500mc_SFX1], 0>,
201*0b57cec5SDimitry Andric                                  InstrStage<1, [E500mc_LSU_0]>],
202*0b57cec5SDimitry Andric                                 [7, 1, 1], // Latency = 4
203*0b57cec5SDimitry Andric                                 [E500mc_FPR_Bypass,
204*0b57cec5SDimitry Andric                                  E500mc_GPR_Bypass, E500mc_GPR_Bypass],
205*0b57cec5SDimitry Andric                                 2>, // 2 micro-ops
206*0b57cec5SDimitry Andric  InstrItinData<IIC_LdStLHA,     [InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
207*0b57cec5SDimitry Andric                                  InstrStage<1, [E500mc_LSU_0]>],
208*0b57cec5SDimitry Andric                                 [6, 1], // Latency = 3
209*0b57cec5SDimitry Andric                                 [E500mc_GPR_Bypass, E500mc_GPR_Bypass]>,
210*0b57cec5SDimitry Andric  InstrItinData<IIC_LdStLHAU,    [InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
211*0b57cec5SDimitry Andric                                  InstrStage<1, [E500mc_SFX0, E500mc_SFX1], 0>,
212*0b57cec5SDimitry Andric                                  InstrStage<1, [E500mc_LSU_0]>],
213*0b57cec5SDimitry Andric                                 [6, 1], // Latency = 3
214*0b57cec5SDimitry Andric                                 [E500mc_GPR_Bypass, E500mc_GPR_Bypass]>,
215*0b57cec5SDimitry Andric  InstrItinData<IIC_LdStLHAUX,   [InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
216*0b57cec5SDimitry Andric                                  InstrStage<1, [E500mc_SFX0, E500mc_SFX1], 0>,
217*0b57cec5SDimitry Andric                                  InstrStage<1, [E500mc_LSU_0]>],
218*0b57cec5SDimitry Andric                                 [6, 1], // Latency = 3
219*0b57cec5SDimitry Andric                                 [E500mc_GPR_Bypass, E500mc_GPR_Bypass]>,
220*0b57cec5SDimitry Andric  InstrItinData<IIC_LdStLMW,     [InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
221*0b57cec5SDimitry Andric                                  InstrStage<1, [E500mc_LSU_0]>],
222*0b57cec5SDimitry Andric                                 [7, 1], // Latency = r+3
223*0b57cec5SDimitry Andric                                 [NoBypass, E500mc_GPR_Bypass]>,
224*0b57cec5SDimitry Andric  InstrItinData<IIC_LdStLWARX,   [InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
225*0b57cec5SDimitry Andric                                  InstrStage<3, [E500mc_LSU_0]>],
226*0b57cec5SDimitry Andric                                 [6, 1, 1], // Latency = 3, Repeat rate = 3
227*0b57cec5SDimitry Andric                                 [E500mc_GPR_Bypass,
228*0b57cec5SDimitry Andric                                  E500mc_GPR_Bypass, E500mc_GPR_Bypass]>,
229*0b57cec5SDimitry Andric  InstrItinData<IIC_LdStSTWCX,   [InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
230*0b57cec5SDimitry Andric                                  InstrStage<1, [E500mc_LSU_0]>],
231*0b57cec5SDimitry Andric                                 [6, 1], // Latency = 3
232*0b57cec5SDimitry Andric                                 [NoBypass, E500mc_GPR_Bypass]>,
233*0b57cec5SDimitry Andric  InstrItinData<IIC_LdStSync,    [InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
234*0b57cec5SDimitry Andric                                  InstrStage<1, [E500mc_LSU_0]>]>,
235*0b57cec5SDimitry Andric  InstrItinData<IIC_SprMFSR,     [InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
236*0b57cec5SDimitry Andric                                  InstrStage<4, [E500mc_SFX0]>],
237*0b57cec5SDimitry Andric                                 [7, 1],
238*0b57cec5SDimitry Andric                                 [E500mc_GPR_Bypass, E500mc_GPR_Bypass]>,
239*0b57cec5SDimitry Andric  InstrItinData<IIC_SprMTMSR,    [InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
240*0b57cec5SDimitry Andric                                  InstrStage<2, [E500mc_SFX0, E500mc_SFX1]>],
241*0b57cec5SDimitry Andric                                 [5, 1], // Latency = 2, Repeat rate = 4
242*0b57cec5SDimitry Andric                                 [E500mc_GPR_Bypass, E500mc_GPR_Bypass]>,
243*0b57cec5SDimitry Andric  InstrItinData<IIC_SprMTSR,     [InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
244*0b57cec5SDimitry Andric                                  InstrStage<1, [E500mc_SFX0]>],
245*0b57cec5SDimitry Andric                                 [5, 1],
246*0b57cec5SDimitry Andric                                 [NoBypass, E500mc_GPR_Bypass]>,
247*0b57cec5SDimitry Andric  InstrItinData<IIC_SprTLBSYNC,  [InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
248*0b57cec5SDimitry Andric                                  InstrStage<1, [E500mc_LSU_0], 0>]>,
249*0b57cec5SDimitry Andric  InstrItinData<IIC_SprMFCR,     [InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
250*0b57cec5SDimitry Andric                                  InstrStage<5, [E500mc_SFX0]>],
251*0b57cec5SDimitry Andric                                 [8, 1],
252*0b57cec5SDimitry Andric                                 [E500mc_GPR_Bypass, E500mc_CR_Bypass]>,
253*0b57cec5SDimitry Andric  InstrItinData<IIC_SprMFCRF,    [InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
254*0b57cec5SDimitry Andric                                  InstrStage<5, [E500mc_SFX0]>],
255*0b57cec5SDimitry Andric                                 [8, 1],
256*0b57cec5SDimitry Andric                                 [E500mc_GPR_Bypass, E500mc_CR_Bypass]>,
257*0b57cec5SDimitry Andric  InstrItinData<IIC_SprMFPMR,    [InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
258*0b57cec5SDimitry Andric                                  InstrStage<4, [E500mc_SFX0]>],
259*0b57cec5SDimitry Andric                                 [7, 1], // Latency = 4, Repeat rate = 4
260*0b57cec5SDimitry Andric                                 [E500mc_GPR_Bypass, E500mc_GPR_Bypass]>,
261*0b57cec5SDimitry Andric  InstrItinData<IIC_SprMFMSR,    [InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
262*0b57cec5SDimitry Andric                                  InstrStage<4, [E500mc_SFX0]>],
263*0b57cec5SDimitry Andric                                 [7, 1], // Latency = 4, Repeat rate = 4
264*0b57cec5SDimitry Andric                                 [E500mc_GPR_Bypass, E500mc_GPR_Bypass]>,
265*0b57cec5SDimitry Andric  InstrItinData<IIC_SprMFSPR,    [InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
266*0b57cec5SDimitry Andric                                  InstrStage<1, [E500mc_SFX0, E500mc_SFX1]>],
267*0b57cec5SDimitry Andric                                 [4, 1], // Latency = 1, Repeat rate = 1
268*0b57cec5SDimitry Andric                                 [E500mc_GPR_Bypass, E500mc_CR_Bypass]>,
269*0b57cec5SDimitry Andric  InstrItinData<IIC_SprMTPMR,    [InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
270*0b57cec5SDimitry Andric                                  InstrStage<1, [E500mc_SFX0]>],
271*0b57cec5SDimitry Andric                                 [4, 1], // Latency = 1, Repeat rate = 1
272*0b57cec5SDimitry Andric                                 [E500mc_CR_Bypass, E500mc_GPR_Bypass]>,
273*0b57cec5SDimitry Andric  InstrItinData<IIC_SprMFTB,     [InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
274*0b57cec5SDimitry Andric                                  InstrStage<4, [E500mc_SFX0]>],
275*0b57cec5SDimitry Andric                                 [7, 1], // Latency = 4, Repeat rate = 4
276*0b57cec5SDimitry Andric                                 [NoBypass, E500mc_GPR_Bypass]>,
277*0b57cec5SDimitry Andric  InstrItinData<IIC_SprMTSPR,    [InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
278*0b57cec5SDimitry Andric                                  InstrStage<1, [E500mc_SFX0, E500mc_SFX1]>],
279*0b57cec5SDimitry Andric                                 [4, 1], // Latency = 1, Repeat rate = 1
280*0b57cec5SDimitry Andric                                 [E500mc_CR_Bypass, E500mc_GPR_Bypass]>,
281*0b57cec5SDimitry Andric  InstrItinData<IIC_SprMTSRIN,   [InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
282*0b57cec5SDimitry Andric                                  InstrStage<1, [E500mc_SFX0]>],
283*0b57cec5SDimitry Andric                                 [4, 1],
284*0b57cec5SDimitry Andric                                 [NoBypass, E500mc_GPR_Bypass]>,
285*0b57cec5SDimitry Andric  InstrItinData<IIC_FPGeneral,   [InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
286*0b57cec5SDimitry Andric                                  InstrStage<2, [E500mc_FPU_0]>],
287*0b57cec5SDimitry Andric                                 [11, 1, 1], // Latency = 8, Repeat rate = 2
288*0b57cec5SDimitry Andric                                 [E500mc_FPR_Bypass,
289*0b57cec5SDimitry Andric                                  E500mc_FPR_Bypass, E500mc_FPR_Bypass]>,
290*0b57cec5SDimitry Andric  InstrItinData<IIC_FPAddSub,    [InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
291*0b57cec5SDimitry Andric                                  InstrStage<4, [E500mc_FPU_0]>],
292*0b57cec5SDimitry Andric                                 [13, 1, 1], // Latency = 10, Repeat rate = 4
293*0b57cec5SDimitry Andric                                 [E500mc_FPR_Bypass,
294*0b57cec5SDimitry Andric                                  E500mc_FPR_Bypass, E500mc_FPR_Bypass]>,
295*0b57cec5SDimitry Andric  InstrItinData<IIC_FPCompare,   [InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
296*0b57cec5SDimitry Andric                                  InstrStage<2, [E500mc_FPU_0]>],
297*0b57cec5SDimitry Andric                                 [11, 1, 1], // Latency = 8, Repeat rate = 2
298*0b57cec5SDimitry Andric                                 [E500mc_CR_Bypass,
299*0b57cec5SDimitry Andric                                  E500mc_FPR_Bypass, E500mc_FPR_Bypass]>,
300*0b57cec5SDimitry Andric  InstrItinData<IIC_FPDivD,      [InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
301*0b57cec5SDimitry Andric                                  InstrStage<68, [E500mc_FPU_0]>],
302*0b57cec5SDimitry Andric                                 [71, 1, 1], // Latency = 68, Repeat rate = 68
303*0b57cec5SDimitry Andric                                 [E500mc_FPR_Bypass,
304*0b57cec5SDimitry Andric                                  E500mc_FPR_Bypass, E500mc_FPR_Bypass]>,
305*0b57cec5SDimitry Andric  InstrItinData<IIC_FPDivS,      [InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
306*0b57cec5SDimitry Andric                                  InstrStage<38, [E500mc_FPU_0]>],
307*0b57cec5SDimitry Andric                                 [41, 1, 1], // Latency = 38, Repeat rate = 38
308*0b57cec5SDimitry Andric                                 [E500mc_FPR_Bypass,
309*0b57cec5SDimitry Andric                                  E500mc_FPR_Bypass, E500mc_FPR_Bypass]>,
310*0b57cec5SDimitry Andric  InstrItinData<IIC_FPFused,     [InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
311*0b57cec5SDimitry Andric                                  InstrStage<4, [E500mc_FPU_0]>],
312*0b57cec5SDimitry Andric                                 [13, 1, 1, 1], // Latency = 10, Repeat rate = 4
313*0b57cec5SDimitry Andric                                 [E500mc_FPR_Bypass,
314*0b57cec5SDimitry Andric                                  E500mc_FPR_Bypass, E500mc_FPR_Bypass,
315*0b57cec5SDimitry Andric                                  E500mc_FPR_Bypass]>,
316*0b57cec5SDimitry Andric  InstrItinData<IIC_FPRes,       [InstrStage<1, [E500mc_DIS0, E500mc_DIS1], 0>,
317*0b57cec5SDimitry Andric                                  InstrStage<38, [E500mc_FPU_0]>],
318*0b57cec5SDimitry Andric                                 [41, 1], // Latency = 38, Repeat rate = 38
319*0b57cec5SDimitry Andric                                 [E500mc_FPR_Bypass, E500mc_FPR_Bypass]>
320*0b57cec5SDimitry Andric]>;
321*0b57cec5SDimitry Andric
322*0b57cec5SDimitry Andric// ===---------------------------------------------------------------------===//
323*0b57cec5SDimitry Andric// e500mc machine model for scheduling and other instruction cost heuristics.
324*0b57cec5SDimitry Andric
325*0b57cec5SDimitry Andricdef PPCE500mcModel : SchedMachineModel {
326*0b57cec5SDimitry Andric  let IssueWidth = 2;  // 2 micro-ops are dispatched per cycle.
327*0b57cec5SDimitry Andric  let LoadLatency = 5; // Optimistic load latency assuming bypass.
328*0b57cec5SDimitry Andric                       // This is overriden by OperandCycles if the
329*0b57cec5SDimitry Andric                       // Itineraries are queried instead.
330*0b57cec5SDimitry Andric
331*0b57cec5SDimitry Andric  let CompleteModel = 0;
332*0b57cec5SDimitry Andric
333*0b57cec5SDimitry Andric  let Itineraries = PPCE500mcItineraries;
334*0b57cec5SDimitry Andric}
335