1 //===- PPCScheduleA2.td - PPC A2 Scheduling Definitions --*- tablegen -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
10 // A2 Processor User's Manual.
11 // IBM (as updated in) 2010.
13 //===----------------------------------------------------------------------===//
14 // Functional units on the PowerPC A2 chip sets
16 def A2_XU : FuncUnit; // A2_XU pipeline
17 def A2_FU : FuncUnit; // FI pipeline
20 // This file defines the itinerary class data for the PPC A2 processor.
22 //===----------------------------------------------------------------------===//
25 def PPCA2Itineraries : ProcessorItineraries<
27 InstrItinData<IIC_IntSimple, [InstrStage<1, [A2_XU]>],
29 InstrItinData<IIC_IntGeneral, [InstrStage<1, [A2_XU]>],
31 InstrItinData<IIC_IntISEL, [InstrStage<1, [A2_XU]>],
33 InstrItinData<IIC_IntCompare, [InstrStage<1, [A2_XU]>],
35 InstrItinData<IIC_IntDivW, [InstrStage<1, [A2_XU]>],
37 InstrItinData<IIC_IntDivD, [InstrStage<1, [A2_XU]>],
39 InstrItinData<IIC_IntMulHW, [InstrStage<1, [A2_XU]>],
41 InstrItinData<IIC_IntMulHWU, [InstrStage<1, [A2_XU]>],
43 InstrItinData<IIC_IntMulLI, [InstrStage<1, [A2_XU]>],
45 InstrItinData<IIC_IntRotate, [InstrStage<1, [A2_XU]>],
47 InstrItinData<IIC_IntRotateD, [InstrStage<1, [A2_XU]>],
49 InstrItinData<IIC_IntRotateDI, [InstrStage<1, [A2_XU]>],
51 InstrItinData<IIC_IntShift, [InstrStage<1, [A2_XU]>],
53 InstrItinData<IIC_IntTrapW, [InstrStage<1, [A2_XU]>],
55 InstrItinData<IIC_IntTrapD, [InstrStage<1, [A2_XU]>],
57 InstrItinData<IIC_BrB, [InstrStage<1, [A2_XU]>],
59 InstrItinData<IIC_BrCR, [InstrStage<1, [A2_XU]>],
61 InstrItinData<IIC_BrMCR, [InstrStage<1, [A2_XU]>],
63 InstrItinData<IIC_BrMCRX, [InstrStage<1, [A2_XU]>],
65 InstrItinData<IIC_LdStDCBA, [InstrStage<1, [A2_XU]>],
67 InstrItinData<IIC_LdStDCBF, [InstrStage<1, [A2_XU]>],
69 InstrItinData<IIC_LdStDCBI, [InstrStage<1, [A2_XU]>],
71 InstrItinData<IIC_LdStLoad, [InstrStage<1, [A2_XU]>],
73 InstrItinData<IIC_LdStLoadUpd, [InstrStage<1, [A2_XU]>],
75 InstrItinData<IIC_LdStLoadUpdX,[InstrStage<1, [A2_XU]>],
77 InstrItinData<IIC_LdStLDU, [InstrStage<1, [A2_XU]>],
79 InstrItinData<IIC_LdStLDUX, [InstrStage<1, [A2_XU]>],
81 InstrItinData<IIC_LdStStore, [InstrStage<1, [A2_XU]>],
83 InstrItinData<IIC_LdStICBI, [InstrStage<1, [A2_XU]>],
85 InstrItinData<IIC_LdStSTFD, [InstrStage<1, [A2_XU]>],
87 InstrItinData<IIC_LdStSTFDU, [InstrStage<1, [A2_XU]>],
89 InstrItinData<IIC_LdStLFD, [InstrStage<1, [A2_XU]>],
91 InstrItinData<IIC_LdStLFDU, [InstrStage<1, [A2_XU]>],
93 InstrItinData<IIC_LdStLFDUX, [InstrStage<1, [A2_XU]>],
95 InstrItinData<IIC_LdStLHA, [InstrStage<1, [A2_XU]>],
97 InstrItinData<IIC_LdStLHAU, [InstrStage<1, [A2_XU]>],
99 InstrItinData<IIC_LdStLHAUX, [InstrStage<1, [A2_XU]>],
101 InstrItinData<IIC_LdStLWARX, [InstrStage<1, [A2_XU]>],
102 [82, 0, 0]>, // L2 latency
103 InstrItinData<IIC_LdStSTD, [InstrStage<1, [A2_XU]>],
105 InstrItinData<IIC_LdStSTU, [InstrStage<1, [A2_XU]>],
107 InstrItinData<IIC_LdStSTUX, [InstrStage<1, [A2_XU]>],
109 InstrItinData<IIC_LdStSTDCX, [InstrStage<1, [A2_XU]>],
110 [82, 0, 0]>, // L2 latency
111 InstrItinData<IIC_LdStSTWCX, [InstrStage<1, [A2_XU]>],
112 [82, 0, 0]>, // L2 latency
113 InstrItinData<IIC_LdStSync, [InstrStage<1, [A2_XU]>],
115 InstrItinData<IIC_SprISYNC, [InstrStage<1, [A2_XU]>],
117 InstrItinData<IIC_SprMTMSR, [InstrStage<1, [A2_XU]>],
119 InstrItinData<IIC_SprMFCR, [InstrStage<1, [A2_XU]>],
121 InstrItinData<IIC_SprMFCRF, [InstrStage<1, [A2_XU]>],
123 InstrItinData<IIC_SprMFMSR, [InstrStage<1, [A2_XU]>],
125 InstrItinData<IIC_SprMFSPR, [InstrStage<1, [A2_XU]>],
127 InstrItinData<IIC_SprMFTB, [InstrStage<1, [A2_XU]>],
129 InstrItinData<IIC_SprMTSPR, [InstrStage<1, [A2_XU]>],
131 InstrItinData<IIC_SprRFI, [InstrStage<1, [A2_XU]>],
133 InstrItinData<IIC_SprSC, [InstrStage<1, [A2_XU]>],
135 InstrItinData<IIC_FPGeneral, [InstrStage<1, [A2_FU]>],
137 InstrItinData<IIC_FPAddSub, [InstrStage<1, [A2_FU]>],
139 InstrItinData<IIC_FPCompare, [InstrStage<1, [A2_FU]>],
141 InstrItinData<IIC_FPDivD, [InstrStage<1, [A2_FU]>],
143 InstrItinData<IIC_FPDivS, [InstrStage<1, [A2_FU]>],
145 InstrItinData<IIC_FPSqrtD, [InstrStage<1, [A2_FU]>],
147 InstrItinData<IIC_FPSqrtS, [InstrStage<1, [A2_FU]>],
149 InstrItinData<IIC_FPFused, [InstrStage<1, [A2_FU]>],
151 InstrItinData<IIC_FPRes, [InstrStage<1, [A2_FU]>],
155 // ===---------------------------------------------------------------------===//
156 // A2 machine model for scheduling and other instruction cost heuristics.
158 def PPCA2Model : SchedMachineModel {
159 let IssueWidth = 1; // 1 instruction is dispatched per cycle.
160 let LoadLatency = 6; // Optimistic load latency assuming bypass.
161 // This is overriden by OperandCycles if the
162 // Itineraries are queried instead.
163 let MispredictPenalty = 13;
165 let CompleteModel = 0;
167 let Itineraries = PPCA2Itineraries;