xref: /llvm-project/llvm/lib/Target/PowerPC/PPCScheduleE500.td (revision 2946cd701067404b99c39fb29dc9c74bd7193eb3)
1ceb3cd96SJustin Hibbits//===-- PPCScheduleE500.td - e500 Scheduling Defs ------*- tablegen -*-===//
2ceb3cd96SJustin Hibbits//
3*2946cd70SChandler Carruth// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4*2946cd70SChandler Carruth// See https://llvm.org/LICENSE.txt for license information.
5*2946cd70SChandler Carruth// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6ceb3cd96SJustin Hibbits//
7ceb3cd96SJustin Hibbits//===----------------------------------------------------------------------===//
8ceb3cd96SJustin Hibbits//
9ceb3cd96SJustin Hibbits// This file defines the itinerary class data for the Freescale e500 32-bit
10ceb3cd96SJustin Hibbits// Power processor.
11ceb3cd96SJustin Hibbits//
12ceb3cd96SJustin Hibbits// All information is derived from the "e500 Core Reference Manual",
13ceb3cd96SJustin Hibbits// Freescale Document Number E500MCRM, Rev. 1, 03/2012.
14ceb3cd96SJustin Hibbits//
15ceb3cd96SJustin Hibbits//===----------------------------------------------------------------------===//
16ceb3cd96SJustin Hibbits// Relevant functional units in the Freescale e500 core:
17ceb3cd96SJustin Hibbits//
18ceb3cd96SJustin Hibbits//  * Decode & Dispatch
19ceb3cd96SJustin Hibbits//    Can dispatch up to 2 instructions per clock cycle to either the GPR Issue
20ceb3cd96SJustin Hibbits//    queues (GIQx) or Branch issue queue (BIQ).
21ceb3cd96SJustin Hibbitsdef E500_DIS0 : FuncUnit; // Dispatch stage - insn 1
22ceb3cd96SJustin Hibbitsdef E500_DIS1 : FuncUnit; // Dispatch stage - insn 2
23ceb3cd96SJustin Hibbits
24ceb3cd96SJustin Hibbits//  * Execute
25ceb3cd96SJustin Hibbits//    6 pipelined execution units: SU0, SU1, BU, LSU, MU.
26ceb3cd96SJustin Hibbits//    Some instructions can only execute in SU0 but not SU1.
27ceb3cd96SJustin Hibbitsdef E500_SU0  : FuncUnit; // Simple unit 0
28ceb3cd96SJustin Hibbitsdef E500_SU1  : FuncUnit; // Simple unit 1
29ceb3cd96SJustin Hibbitsdef E500_BU    : FuncUnit; // Branch unit
30ceb3cd96SJustin Hibbitsdef E500_MU    : FuncUnit; // MU pipeline
31ceb3cd96SJustin Hibbitsdef E500_LSU_0 : FuncUnit; // LSU pipeline
32ceb3cd96SJustin Hibbits
33ceb3cd96SJustin Hibbitsdef E500_GPR_Bypass : Bypass;
34ceb3cd96SJustin Hibbitsdef E500_CR_Bypass  : Bypass;
35ceb3cd96SJustin Hibbitsdef E500_DivBypass  : Bypass;
36ceb3cd96SJustin Hibbits
37ceb3cd96SJustin Hibbitsdef PPCE500Itineraries : ProcessorItineraries<
38ceb3cd96SJustin Hibbits  [E500_DIS0, E500_DIS1, E500_SU0, E500_SU1, E500_BU,
39ceb3cd96SJustin Hibbits   E500_MU, E500_LSU_0],
40ceb3cd96SJustin Hibbits  [E500_CR_Bypass, E500_GPR_Bypass, E500_DivBypass], [
41ceb3cd96SJustin Hibbits  InstrItinData<IIC_IntSimple,   [InstrStage<1, [E500_DIS0, E500_DIS1], 0>,
42ceb3cd96SJustin Hibbits                                  InstrStage<1, [E500_SU0, E500_SU1]>],
43ceb3cd96SJustin Hibbits                                 [4, 1, 1], // Latency = 1
44ceb3cd96SJustin Hibbits                                 [E500_GPR_Bypass,
45ceb3cd96SJustin Hibbits                                  E500_GPR_Bypass, E500_GPR_Bypass]>,
46ceb3cd96SJustin Hibbits  InstrItinData<IIC_IntGeneral,  [InstrStage<1, [E500_DIS0, E500_DIS1], 0>,
47ceb3cd96SJustin Hibbits                                  InstrStage<1, [E500_SU0, E500_SU1]>],
48ceb3cd96SJustin Hibbits                                 [4, 1, 1], // Latency = 1
49ceb3cd96SJustin Hibbits                                 [E500_GPR_Bypass,
50ceb3cd96SJustin Hibbits                                  E500_GPR_Bypass, E500_GPR_Bypass]>,
51ceb3cd96SJustin Hibbits  InstrItinData<IIC_IntISEL,     [InstrStage<1, [E500_DIS0, E500_DIS1], 0>,
52ceb3cd96SJustin Hibbits                                  InstrStage<1, [E500_SU0, E500_SU1]>],
53ceb3cd96SJustin Hibbits                                 [4, 1, 1, 1], // Latency = 1
54ceb3cd96SJustin Hibbits                                 [E500_GPR_Bypass,
55ceb3cd96SJustin Hibbits                                  E500_GPR_Bypass, E500_GPR_Bypass,
56ceb3cd96SJustin Hibbits                                  E500_CR_Bypass]>,
57ceb3cd96SJustin Hibbits  InstrItinData<IIC_IntCompare,  [InstrStage<1, [E500_DIS0, E500_DIS1], 0>,
58ceb3cd96SJustin Hibbits                                  InstrStage<1, [E500_SU0, E500_SU1]>],
59ceb3cd96SJustin Hibbits                                 [5, 1, 1], // Latency = 1 or 2
60ceb3cd96SJustin Hibbits                                 [E500_CR_Bypass,
61ceb3cd96SJustin Hibbits                                  E500_GPR_Bypass, E500_GPR_Bypass]>,
62ceb3cd96SJustin Hibbits  InstrItinData<IIC_IntDivW,     [InstrStage<1, [E500_DIS0, E500_DIS1], 0>,
63ceb3cd96SJustin Hibbits                                  InstrStage<1, [E500_MU], 0>,
64ceb3cd96SJustin Hibbits                                  InstrStage<14, [E500_MU]>],
65ceb3cd96SJustin Hibbits                                 [17, 1, 1], // Latency=4..35, Repeat= 4..35
66ceb3cd96SJustin Hibbits                                 [E500_GPR_Bypass,
67ceb3cd96SJustin Hibbits                                  E500_GPR_Bypass, E500_GPR_Bypass]>,
68ceb3cd96SJustin Hibbits  InstrItinData<IIC_IntMulHW,    [InstrStage<1, [E500_DIS0, E500_DIS1], 0>,
69ceb3cd96SJustin Hibbits                                  InstrStage<4, [E500_MU]>],
70ceb3cd96SJustin Hibbits                                 [7, 1, 1], // Latency = 4, Repeat rate = 1
71ceb3cd96SJustin Hibbits                                 [E500_GPR_Bypass,
72ceb3cd96SJustin Hibbits                                  E500_GPR_Bypass, E500_GPR_Bypass]>,
73ceb3cd96SJustin Hibbits  InstrItinData<IIC_IntMulHWU,   [InstrStage<1, [E500_DIS0, E500_DIS1], 0>,
74ceb3cd96SJustin Hibbits                                  InstrStage<4, [E500_MU]>],
75ceb3cd96SJustin Hibbits                                 [7, 1, 1], // Latency = 4, Repeat rate = 1
76ceb3cd96SJustin Hibbits                                 [E500_GPR_Bypass,
77ceb3cd96SJustin Hibbits                                  E500_GPR_Bypass, E500_GPR_Bypass]>,
78ceb3cd96SJustin Hibbits  InstrItinData<IIC_IntMulLI,    [InstrStage<1, [E500_DIS0, E500_DIS1], 0>,
79ceb3cd96SJustin Hibbits                                  InstrStage<4, [E500_MU]>],
80ceb3cd96SJustin Hibbits                                 [7, 1, 1], // Latency = 4, Repeat rate = 1
81ceb3cd96SJustin Hibbits                                 [E500_GPR_Bypass,
82ceb3cd96SJustin Hibbits                                  E500_GPR_Bypass, E500_GPR_Bypass]>,
83ceb3cd96SJustin Hibbits  InstrItinData<IIC_IntRotate,   [InstrStage<1, [E500_DIS0, E500_DIS1], 0>,
84ceb3cd96SJustin Hibbits                                  InstrStage<1, [E500_SU0, E500_SU1]>],
85ceb3cd96SJustin Hibbits                                 [4, 1, 1], // Latency = 1
86ceb3cd96SJustin Hibbits                                 [E500_GPR_Bypass,
87ceb3cd96SJustin Hibbits                                  E500_GPR_Bypass, E500_GPR_Bypass]>,
88ceb3cd96SJustin Hibbits  InstrItinData<IIC_IntShift,    [InstrStage<1, [E500_DIS0, E500_DIS1], 0>,
89ceb3cd96SJustin Hibbits                                  InstrStage<1, [E500_SU0, E500_SU1]>],
90ceb3cd96SJustin Hibbits                                 [4, 1, 1], // Latency = 1
91ceb3cd96SJustin Hibbits                                 [E500_GPR_Bypass,
92ceb3cd96SJustin Hibbits                                  E500_GPR_Bypass, E500_GPR_Bypass]>,
93ceb3cd96SJustin Hibbits  InstrItinData<IIC_IntTrapW,    [InstrStage<1, [E500_DIS0, E500_DIS1], 0>,
94ceb3cd96SJustin Hibbits                                  InstrStage<2, [E500_SU0]>],
95ceb3cd96SJustin Hibbits                                 [5, 1], // Latency = 2, Repeat rate = 2
96ceb3cd96SJustin Hibbits                                 [E500_GPR_Bypass, E500_GPR_Bypass]>,
97ceb3cd96SJustin Hibbits  InstrItinData<IIC_BrB,         [InstrStage<1, [E500_DIS0, E500_DIS1], 0>,
98ceb3cd96SJustin Hibbits                                  InstrStage<1, [E500_BU]>],
99ceb3cd96SJustin Hibbits                                 [4, 1], // Latency = 1
100ceb3cd96SJustin Hibbits                                 [NoBypass, E500_GPR_Bypass]>,
101ceb3cd96SJustin Hibbits  InstrItinData<IIC_BrCR,        [InstrStage<1, [E500_DIS0, E500_DIS1], 0>,
102ceb3cd96SJustin Hibbits                                  InstrStage<1, [E500_BU]>],
103ceb3cd96SJustin Hibbits                                 [4, 1, 1], // Latency = 1
104ceb3cd96SJustin Hibbits                                 [E500_CR_Bypass,
105ceb3cd96SJustin Hibbits                                  E500_CR_Bypass, E500_CR_Bypass]>,
106ceb3cd96SJustin Hibbits  InstrItinData<IIC_BrMCR,       [InstrStage<1, [E500_DIS0, E500_DIS1], 0>,
107ceb3cd96SJustin Hibbits                                  InstrStage<1, [E500_BU]>],
108ceb3cd96SJustin Hibbits                                 [4, 1], // Latency = 1
109ceb3cd96SJustin Hibbits                                 [E500_CR_Bypass, E500_CR_Bypass]>,
110ceb3cd96SJustin Hibbits  InstrItinData<IIC_BrMCRX,      [InstrStage<1, [E500_DIS0, E500_DIS1], 0>,
111ceb3cd96SJustin Hibbits                                  InstrStage<1, [E500_SU0, E500_SU1]>],
112ceb3cd96SJustin Hibbits                                 [4, 1, 1], // Latency = 1
113ceb3cd96SJustin Hibbits                                 [E500_CR_Bypass, E500_GPR_Bypass]>,
114ceb3cd96SJustin Hibbits  InstrItinData<IIC_LdStDCBA,    [InstrStage<1, [E500_DIS0, E500_DIS1], 0>,
115ceb3cd96SJustin Hibbits                                  InstrStage<1, [E500_LSU_0]>],
116ceb3cd96SJustin Hibbits                                 [6, 1], // Latency = 3, Repeat rate = 1
117ceb3cd96SJustin Hibbits                                 [E500_GPR_Bypass, E500_GPR_Bypass]>,
118ceb3cd96SJustin Hibbits  InstrItinData<IIC_LdStDCBF,    [InstrStage<1, [E500_DIS0, E500_DIS1], 0>,
119ceb3cd96SJustin Hibbits                                  InstrStage<1, [E500_LSU_0]>],
120ceb3cd96SJustin Hibbits                                 [6, 1], // Latency = 3
121ceb3cd96SJustin Hibbits                                 [E500_GPR_Bypass, E500_GPR_Bypass]>,
122ceb3cd96SJustin Hibbits  InstrItinData<IIC_LdStDCBI,    [InstrStage<1, [E500_DIS0, E500_DIS1], 0>,
123ceb3cd96SJustin Hibbits                                  InstrStage<1, [E500_LSU_0]>],
124ceb3cd96SJustin Hibbits                                 [6, 1], // Latency = 3
125ceb3cd96SJustin Hibbits                                 [E500_GPR_Bypass, E500_GPR_Bypass]>,
126ceb3cd96SJustin Hibbits  InstrItinData<IIC_LdStLoad,    [InstrStage<1, [E500_DIS0, E500_DIS1], 0>,
127ceb3cd96SJustin Hibbits                                  InstrStage<1, [E500_LSU_0]>],
128ceb3cd96SJustin Hibbits                                 [6, 1], // Latency = 3
129ceb3cd96SJustin Hibbits                                 [E500_GPR_Bypass, E500_GPR_Bypass]>,
130ceb3cd96SJustin Hibbits  InstrItinData<IIC_LdStLoadUpd, [InstrStage<1, [E500_DIS0, E500_DIS1], 0>,
131ceb3cd96SJustin Hibbits                                  InstrStage<1, [E500_SU0, E500_SU1], 0>,
132ceb3cd96SJustin Hibbits                                  InstrStage<1, [E500_LSU_0]>],
133ceb3cd96SJustin Hibbits                                 [6, 1], // Latency = 3
134ceb3cd96SJustin Hibbits                                 [E500_GPR_Bypass, E500_GPR_Bypass],
135ceb3cd96SJustin Hibbits                                 2>, // 2 micro-ops
136ceb3cd96SJustin Hibbits  InstrItinData<IIC_LdStLoadUpdX,[InstrStage<1, [E500_DIS0, E500_DIS1], 0>,
137ceb3cd96SJustin Hibbits                                  InstrStage<1, [E500_SU0, E500_SU1], 0>,
138ceb3cd96SJustin Hibbits                                  InstrStage<1, [E500_LSU_0]>],
139ceb3cd96SJustin Hibbits                                 [6, 1], // Latency = 3
140ceb3cd96SJustin Hibbits                                 [E500_GPR_Bypass, E500_GPR_Bypass],
141ceb3cd96SJustin Hibbits                                 2>, // 2 micro-ops
142ceb3cd96SJustin Hibbits  InstrItinData<IIC_LdStStore,   [InstrStage<1, [E500_DIS0, E500_DIS1], 0>,
143ceb3cd96SJustin Hibbits                                  InstrStage<1, [E500_LSU_0]>],
144ceb3cd96SJustin Hibbits                                 [6, 1], // Latency = 3
145ceb3cd96SJustin Hibbits                                 [NoBypass, E500_GPR_Bypass]>,
1469a0ed200SJinsong Ji  InstrItinData<IIC_LdStSTU,     [InstrStage<1, [E500_DIS0, E500_DIS1], 0>,
1479a0ed200SJinsong Ji                                  InstrStage<1, [E500_SU0, E500_SU1], 0>,
1489a0ed200SJinsong Ji                                  InstrStage<1, [E500_LSU_0]>],
1499a0ed200SJinsong Ji                                 [6, 1], // Latency = 3
1509a0ed200SJinsong Ji                                 [NoBypass, E500_GPR_Bypass],
1519a0ed200SJinsong Ji                                 2>, // 2 micro-ops
1529a0ed200SJinsong Ji  InstrItinData<IIC_LdStSTUX,    [InstrStage<1, [E500_DIS0, E500_DIS1], 0>,
153ceb3cd96SJustin Hibbits                                  InstrStage<1, [E500_SU0, E500_SU1], 0>,
154ceb3cd96SJustin Hibbits                                  InstrStage<1, [E500_LSU_0]>],
155ceb3cd96SJustin Hibbits                                 [6, 1], // Latency = 3
156ceb3cd96SJustin Hibbits                                 [NoBypass, E500_GPR_Bypass],
157ceb3cd96SJustin Hibbits                                 2>, // 2 micro-ops
158ceb3cd96SJustin Hibbits  InstrItinData<IIC_LdStICBI,    [InstrStage<1, [E500_DIS0, E500_DIS1], 0>,
159ceb3cd96SJustin Hibbits                                  InstrStage<1, [E500_LSU_0]>],
160ceb3cd96SJustin Hibbits                                 [6, 1], // Latency = 3
161ceb3cd96SJustin Hibbits                                 [NoBypass, E500_GPR_Bypass]>,
162ceb3cd96SJustin Hibbits  InstrItinData<IIC_LdStLHA,     [InstrStage<1, [E500_DIS0, E500_DIS1], 0>,
163ceb3cd96SJustin Hibbits                                  InstrStage<1, [E500_LSU_0]>],
164ceb3cd96SJustin Hibbits                                 [6, 1], // Latency = 3
165ceb3cd96SJustin Hibbits                                 [E500_GPR_Bypass, E500_GPR_Bypass]>,
166ceb3cd96SJustin Hibbits  InstrItinData<IIC_LdStLHAU,    [InstrStage<1, [E500_DIS0, E500_DIS1], 0>,
167ceb3cd96SJustin Hibbits                                  InstrStage<1, [E500_SU0, E500_SU1], 0>,
168ceb3cd96SJustin Hibbits                                  InstrStage<1, [E500_LSU_0]>],
169ceb3cd96SJustin Hibbits                                 [6, 1], // Latency = 3
170ceb3cd96SJustin Hibbits                                 [E500_GPR_Bypass, E500_GPR_Bypass]>,
171ceb3cd96SJustin Hibbits  InstrItinData<IIC_LdStLHAUX,   [InstrStage<1, [E500_DIS0, E500_DIS1], 0>,
172ceb3cd96SJustin Hibbits                                  InstrStage<1, [E500_SU0, E500_SU1], 0>,
173ceb3cd96SJustin Hibbits                                  InstrStage<1, [E500_LSU_0]>],
174ceb3cd96SJustin Hibbits                                 [6, 1], // Latency = 3
175ceb3cd96SJustin Hibbits                                 [E500_GPR_Bypass, E500_GPR_Bypass]>,
176ceb3cd96SJustin Hibbits  InstrItinData<IIC_LdStLMW,     [InstrStage<1, [E500_DIS0, E500_DIS1], 0>,
177ceb3cd96SJustin Hibbits                                  InstrStage<1, [E500_LSU_0]>],
178ceb3cd96SJustin Hibbits                                 [7, 1], // Latency = r+3
179ceb3cd96SJustin Hibbits                                 [NoBypass, E500_GPR_Bypass]>,
180ceb3cd96SJustin Hibbits  InstrItinData<IIC_LdStLWARX,   [InstrStage<1, [E500_DIS0, E500_DIS1], 0>,
181ceb3cd96SJustin Hibbits                                  InstrStage<3, [E500_LSU_0]>],
182ceb3cd96SJustin Hibbits                                 [6, 1, 1], // Latency = 3, Repeat rate = 3
183ceb3cd96SJustin Hibbits                                 [E500_GPR_Bypass,
184ceb3cd96SJustin Hibbits                                  E500_GPR_Bypass, E500_GPR_Bypass]>,
185ceb3cd96SJustin Hibbits  InstrItinData<IIC_LdStSTWCX,   [InstrStage<1, [E500_DIS0, E500_DIS1], 0>,
186ceb3cd96SJustin Hibbits                                  InstrStage<1, [E500_LSU_0]>],
187ceb3cd96SJustin Hibbits                                 [6, 1], // Latency = 3
188ceb3cd96SJustin Hibbits                                 [NoBypass, E500_GPR_Bypass]>,
189ceb3cd96SJustin Hibbits  InstrItinData<IIC_LdStSync,    [InstrStage<1, [E500_DIS0, E500_DIS1], 0>,
190ceb3cd96SJustin Hibbits                                  InstrStage<1, [E500_LSU_0]>]>,
191ceb3cd96SJustin Hibbits  InstrItinData<IIC_SprMFSR,     [InstrStage<1, [E500_DIS0, E500_DIS1], 0>,
192ceb3cd96SJustin Hibbits                                  InstrStage<4, [E500_SU0]>],
193ceb3cd96SJustin Hibbits                                 [7, 1],
194ceb3cd96SJustin Hibbits                                 [E500_GPR_Bypass, E500_GPR_Bypass]>,
195ceb3cd96SJustin Hibbits  InstrItinData<IIC_SprMTMSR,    [InstrStage<1, [E500_DIS0, E500_DIS1], 0>,
196ceb3cd96SJustin Hibbits                                  InstrStage<2, [E500_SU0, E500_SU1]>],
197ceb3cd96SJustin Hibbits                                 [5, 1], // Latency = 2, Repeat rate = 4
198ceb3cd96SJustin Hibbits                                 [E500_GPR_Bypass, E500_GPR_Bypass]>,
199ceb3cd96SJustin Hibbits  InstrItinData<IIC_SprMTSR,     [InstrStage<1, [E500_DIS0, E500_DIS1], 0>,
200ceb3cd96SJustin Hibbits                                  InstrStage<1, [E500_SU0]>],
201ceb3cd96SJustin Hibbits                                 [5, 1],
202ceb3cd96SJustin Hibbits                                 [NoBypass, E500_GPR_Bypass]>,
203ceb3cd96SJustin Hibbits  InstrItinData<IIC_SprTLBSYNC,  [InstrStage<1, [E500_DIS0, E500_DIS1], 0>,
204ceb3cd96SJustin Hibbits                                  InstrStage<1, [E500_LSU_0], 0>]>,
205ceb3cd96SJustin Hibbits  InstrItinData<IIC_SprMFCR,     [InstrStage<1, [E500_DIS0, E500_DIS1], 0>,
206ceb3cd96SJustin Hibbits                                  InstrStage<5, [E500_SU0]>],
207ceb3cd96SJustin Hibbits                                 [8, 1],
208ceb3cd96SJustin Hibbits                                 [E500_GPR_Bypass, E500_CR_Bypass]>,
209ceb3cd96SJustin Hibbits  InstrItinData<IIC_SprMFCRF,    [InstrStage<1, [E500_DIS0, E500_DIS1], 0>,
210ceb3cd96SJustin Hibbits                                  InstrStage<5, [E500_SU0]>],
211ceb3cd96SJustin Hibbits                                 [8, 1],
212ceb3cd96SJustin Hibbits                                 [E500_GPR_Bypass, E500_CR_Bypass]>,
213ceb3cd96SJustin Hibbits  InstrItinData<IIC_SprMFPMR,    [InstrStage<1, [E500_DIS0, E500_DIS1], 0>,
214ceb3cd96SJustin Hibbits                                  InstrStage<4, [E500_SU0]>],
215ceb3cd96SJustin Hibbits                                 [7, 1], // Latency = 4, Repeat rate = 4
216ceb3cd96SJustin Hibbits                                 [E500_GPR_Bypass, E500_GPR_Bypass]>,
217ceb3cd96SJustin Hibbits  InstrItinData<IIC_SprMFMSR,    [InstrStage<1, [E500_DIS0, E500_DIS1], 0>,
218ceb3cd96SJustin Hibbits                                  InstrStage<4, [E500_SU0]>],
219ceb3cd96SJustin Hibbits                                 [7, 1], // Latency = 4, Repeat rate = 4
220ceb3cd96SJustin Hibbits                                 [E500_GPR_Bypass, E500_GPR_Bypass]>,
221ceb3cd96SJustin Hibbits  InstrItinData<IIC_SprMFSPR,    [InstrStage<1, [E500_DIS0, E500_DIS1], 0>,
222ceb3cd96SJustin Hibbits                                  InstrStage<1, [E500_SU0, E500_SU1]>],
223ceb3cd96SJustin Hibbits                                 [4, 1], // Latency = 1, Repeat rate = 1
224ceb3cd96SJustin Hibbits                                 [E500_GPR_Bypass, E500_CR_Bypass]>,
225ceb3cd96SJustin Hibbits  InstrItinData<IIC_SprMTPMR,    [InstrStage<1, [E500_DIS0, E500_DIS1], 0>,
226ceb3cd96SJustin Hibbits                                  InstrStage<1, [E500_SU0]>],
227ceb3cd96SJustin Hibbits                                 [4, 1], // Latency = 1, Repeat rate = 1
228ceb3cd96SJustin Hibbits                                 [E500_CR_Bypass, E500_GPR_Bypass]>,
229ceb3cd96SJustin Hibbits  InstrItinData<IIC_SprMFTB,     [InstrStage<1, [E500_DIS0, E500_DIS1], 0>,
230ceb3cd96SJustin Hibbits                                  InstrStage<4, [E500_SU0]>],
231ceb3cd96SJustin Hibbits                                 [7, 1], // Latency = 4, Repeat rate = 4
232ceb3cd96SJustin Hibbits                                 [NoBypass, E500_GPR_Bypass]>,
233ceb3cd96SJustin Hibbits  InstrItinData<IIC_SprMTSPR,    [InstrStage<1, [E500_DIS0, E500_DIS1], 0>,
234ceb3cd96SJustin Hibbits                                  InstrStage<1, [E500_SU0, E500_SU1]>],
235ceb3cd96SJustin Hibbits                                 [4, 1], // Latency = 1, Repeat rate = 1
236ceb3cd96SJustin Hibbits                                 [E500_CR_Bypass, E500_GPR_Bypass]>,
237ceb3cd96SJustin Hibbits  InstrItinData<IIC_SprMTSRIN,   [InstrStage<1, [E500_DIS0, E500_DIS1], 0>,
238ceb3cd96SJustin Hibbits                                  InstrStage<1, [E500_SU0]>],
239ceb3cd96SJustin Hibbits                                 [4, 1],
240ceb3cd96SJustin Hibbits                                 [NoBypass, E500_GPR_Bypass]>,
2414fa4fa6aSJustin Hibbits  InstrItinData<IIC_FPDGeneral,  [InstrStage<1, [E500_DIS0, E500_DIS1], 0>,
2424fa4fa6aSJustin Hibbits                                  InstrStage<6, [E500_MU]>],
2434fa4fa6aSJustin Hibbits                                 [9, 1, 1],  // Latency = 6, Repeat rate = 1
2444fa4fa6aSJustin Hibbits                                 [NoBypass]>,
2454fa4fa6aSJustin Hibbits  InstrItinData<IIC_FPSGeneral,  [InstrStage<1, [E500_DIS0, E500_DIS1], 0>,
2464fa4fa6aSJustin Hibbits                                  InstrStage<4, [E500_MU]>],
2474fa4fa6aSJustin Hibbits                                 [7, 1, 1],  // Latency = 4, Repeat rate = 1
2484fa4fa6aSJustin Hibbits                                 [NoBypass]>,
249ceb3cd96SJustin Hibbits  InstrItinData<IIC_FPDivD,      [InstrStage<1, [E500_DIS0, E500_DIS1], 0>,
250ceb3cd96SJustin Hibbits                                  InstrStage<32, [E500_MU]>],
251ceb3cd96SJustin Hibbits                                 [35, 1, 1], // Latency = 32, Repeat rate = 32
252ceb3cd96SJustin Hibbits                                 [E500_DivBypass]>,
253ceb3cd96SJustin Hibbits  InstrItinData<IIC_FPDivS,      [InstrStage<1, [E500_DIS0, E500_DIS1], 0>,
254ceb3cd96SJustin Hibbits                                  InstrStage<29, [E500_MU]>],
255ceb3cd96SJustin Hibbits                                 [32, 1, 1], // Latency = 29, Repeat rate = 29
256ceb3cd96SJustin Hibbits                                 [E500_DivBypass]>,
257ceb3cd96SJustin Hibbits  InstrItinData<IIC_VecGeneral,  [InstrStage<1, [E500_DIS0, E500_DIS1], 0>,
258ceb3cd96SJustin Hibbits                                  InstrStage<1, [E500_SU0]>],
259ceb3cd96SJustin Hibbits                                 [4, 1, 1], // Latency = 1, Repeat rate = 1
260ceb3cd96SJustin Hibbits                                 [NoBypass]>,
261ceb3cd96SJustin Hibbits  InstrItinData<IIC_VecComplex,  [InstrStage<1, [E500_DIS0, E500_DIS1], 0>,
262ceb3cd96SJustin Hibbits                                  InstrStage<4, [E500_MU]>],
263ceb3cd96SJustin Hibbits                                 [7, 1, 1], // Latency = 4, Repeat rate = 1
264ceb3cd96SJustin Hibbits                                 [NoBypass]>
265ceb3cd96SJustin Hibbits]>;
266ceb3cd96SJustin Hibbits
267ceb3cd96SJustin Hibbits// ===---------------------------------------------------------------------===//
268ceb3cd96SJustin Hibbits// e500 machine model for scheduling and other instruction cost heuristics.
269ceb3cd96SJustin Hibbits
270ceb3cd96SJustin Hibbitsdef PPCE500Model : SchedMachineModel {
271ceb3cd96SJustin Hibbits  let IssueWidth = 2;  // 2 micro-ops are dispatched per cycle.
272ceb3cd96SJustin Hibbits  let LoadLatency = 5; // Optimistic load latency assuming bypass.
273ceb3cd96SJustin Hibbits                       // This is overriden by OperandCycles if the
274ceb3cd96SJustin Hibbits                       // Itineraries are queried instead.
275ceb3cd96SJustin Hibbits
276ceb3cd96SJustin Hibbits  let CompleteModel = 0;
277ceb3cd96SJustin Hibbits
278ceb3cd96SJustin Hibbits  let Itineraries = PPCE500Itineraries;
279ceb3cd96SJustin Hibbits}
280