2012-04-02 03:22:40 +08:00
|
|
|
//===- PPCScheduleA2.td - PPC A2 Scheduling Definitions --*- tablegen -*-===//
|
2016-04-25 09:40:54 +08:00
|
|
|
//
|
2019-01-19 16:50:56 +08:00
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
2016-04-25 09:40:54 +08:00
|
|
|
//
|
2012-04-02 03:22:40 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
// Primary reference:
|
|
|
|
// A2 Processor User's Manual.
|
|
|
|
// IBM (as updated in) 2010.
|
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Functional units on the PowerPC A2 chip sets
|
|
|
|
//
|
2013-11-28 14:05:59 +08:00
|
|
|
def A2_XU : FuncUnit; // A2_XU pipeline
|
|
|
|
def A2_FU : FuncUnit; // FI pipeline
|
2012-04-02 03:22:40 +08:00
|
|
|
|
|
|
|
//
|
|
|
|
// This file defines the itinerary class data for the PPC A2 processor.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
|
|
|
|
def PPCA2Itineraries : ProcessorItineraries<
|
2013-11-28 14:05:59 +08:00
|
|
|
[A2_XU, A2_FU], [], [
|
|
|
|
InstrItinData<IIC_IntSimple, [InstrStage<1, [A2_XU]>],
|
2013-11-29 15:04:59 +08:00
|
|
|
[1, 0, 0]>,
|
2013-11-28 14:05:59 +08:00
|
|
|
InstrItinData<IIC_IntGeneral, [InstrStage<1, [A2_XU]>],
|
2013-11-29 15:04:59 +08:00
|
|
|
[2, 0, 0]>,
|
2015-02-02 01:52:16 +08:00
|
|
|
InstrItinData<IIC_IntISEL, [InstrStage<1, [A2_XU]>],
|
|
|
|
[2, 0, 0, 0]>,
|
2013-11-28 14:05:59 +08:00
|
|
|
InstrItinData<IIC_IntCompare, [InstrStage<1, [A2_XU]>],
|
2013-11-29 15:04:59 +08:00
|
|
|
[2, 0, 0]>,
|
2013-11-28 14:05:59 +08:00
|
|
|
InstrItinData<IIC_IntDivW, [InstrStage<1, [A2_XU]>],
|
2013-11-29 15:04:59 +08:00
|
|
|
[39, 0, 0]>,
|
2013-11-28 14:05:59 +08:00
|
|
|
InstrItinData<IIC_IntDivD, [InstrStage<1, [A2_XU]>],
|
2013-11-29 15:04:59 +08:00
|
|
|
[71, 0, 0]>,
|
2013-11-28 14:05:59 +08:00
|
|
|
InstrItinData<IIC_IntMulHW, [InstrStage<1, [A2_XU]>],
|
2013-11-29 15:04:59 +08:00
|
|
|
[5, 0, 0]>,
|
2013-11-28 14:05:59 +08:00
|
|
|
InstrItinData<IIC_IntMulHWU, [InstrStage<1, [A2_XU]>],
|
2013-11-29 15:04:59 +08:00
|
|
|
[5, 0, 0]>,
|
2013-11-28 14:05:59 +08:00
|
|
|
InstrItinData<IIC_IntMulLI, [InstrStage<1, [A2_XU]>],
|
2013-11-29 15:04:59 +08:00
|
|
|
[6, 0, 0]>,
|
2013-11-28 14:05:59 +08:00
|
|
|
InstrItinData<IIC_IntRotate, [InstrStage<1, [A2_XU]>],
|
2013-11-29 15:04:59 +08:00
|
|
|
[2, 0, 0]>,
|
2013-11-28 14:05:59 +08:00
|
|
|
InstrItinData<IIC_IntRotateD, [InstrStage<1, [A2_XU]>],
|
2013-11-29 15:04:59 +08:00
|
|
|
[2, 0, 0]>,
|
2013-11-28 14:05:59 +08:00
|
|
|
InstrItinData<IIC_IntRotateDI, [InstrStage<1, [A2_XU]>],
|
2013-11-29 15:04:59 +08:00
|
|
|
[2, 0, 0]>,
|
2013-11-28 14:05:59 +08:00
|
|
|
InstrItinData<IIC_IntShift, [InstrStage<1, [A2_XU]>],
|
2013-11-29 15:04:59 +08:00
|
|
|
[2, 0, 0]>,
|
2013-11-28 14:05:59 +08:00
|
|
|
InstrItinData<IIC_IntTrapW, [InstrStage<1, [A2_XU]>],
|
2013-11-29 15:04:59 +08:00
|
|
|
[2, 0]>,
|
2013-11-28 14:05:59 +08:00
|
|
|
InstrItinData<IIC_IntTrapD, [InstrStage<1, [A2_XU]>],
|
2013-11-29 15:04:59 +08:00
|
|
|
[2, 0]>,
|
2013-11-28 14:05:59 +08:00
|
|
|
InstrItinData<IIC_BrB, [InstrStage<1, [A2_XU]>],
|
2013-11-29 15:04:59 +08:00
|
|
|
[6, 0, 0]>,
|
2013-11-28 14:05:59 +08:00
|
|
|
InstrItinData<IIC_BrCR, [InstrStage<1, [A2_XU]>],
|
2013-11-29 15:04:59 +08:00
|
|
|
[1, 0, 0]>,
|
2013-11-28 14:05:59 +08:00
|
|
|
InstrItinData<IIC_BrMCR, [InstrStage<1, [A2_XU]>],
|
2013-11-29 15:04:59 +08:00
|
|
|
[5, 0, 0]>,
|
2013-11-28 14:05:59 +08:00
|
|
|
InstrItinData<IIC_BrMCRX, [InstrStage<1, [A2_XU]>],
|
2013-11-29 15:04:59 +08:00
|
|
|
[1, 0, 0]>,
|
2013-11-28 14:05:59 +08:00
|
|
|
InstrItinData<IIC_LdStDCBA, [InstrStage<1, [A2_XU]>],
|
2013-11-29 15:04:59 +08:00
|
|
|
[1, 0, 0]>,
|
2013-11-28 14:05:59 +08:00
|
|
|
InstrItinData<IIC_LdStDCBF, [InstrStage<1, [A2_XU]>],
|
2013-11-29 15:04:59 +08:00
|
|
|
[1, 0, 0]>,
|
2013-11-28 14:05:59 +08:00
|
|
|
InstrItinData<IIC_LdStDCBI, [InstrStage<1, [A2_XU]>],
|
2013-11-29 15:04:59 +08:00
|
|
|
[1, 0, 0]>,
|
2013-11-28 14:05:59 +08:00
|
|
|
InstrItinData<IIC_LdStLoad, [InstrStage<1, [A2_XU]>],
|
2013-11-29 15:04:59 +08:00
|
|
|
[6, 0, 0]>,
|
2013-11-28 14:05:59 +08:00
|
|
|
InstrItinData<IIC_LdStLoadUpd, [InstrStage<1, [A2_XU]>],
|
2013-11-29 15:04:59 +08:00
|
|
|
[6, 8, 0, 0]>,
|
2013-12-01 04:41:13 +08:00
|
|
|
InstrItinData<IIC_LdStLoadUpdX,[InstrStage<1, [A2_XU]>],
|
|
|
|
[6, 8, 0, 0]>,
|
2013-11-28 14:05:59 +08:00
|
|
|
InstrItinData<IIC_LdStLDU, [InstrStage<1, [A2_XU]>],
|
2013-11-29 15:04:59 +08:00
|
|
|
[6, 0, 0]>,
|
2013-12-01 04:41:13 +08:00
|
|
|
InstrItinData<IIC_LdStLDUX, [InstrStage<1, [A2_XU]>],
|
|
|
|
[6, 0, 0]>,
|
2013-11-28 14:05:59 +08:00
|
|
|
InstrItinData<IIC_LdStStore, [InstrStage<1, [A2_XU]>],
|
2013-11-29 15:04:59 +08:00
|
|
|
[0, 0, 0]>,
|
2013-11-28 14:05:59 +08:00
|
|
|
InstrItinData<IIC_LdStICBI, [InstrStage<1, [A2_XU]>],
|
2013-11-29 15:04:59 +08:00
|
|
|
[16, 0, 0]>,
|
2013-11-28 14:05:59 +08:00
|
|
|
InstrItinData<IIC_LdStSTFD, [InstrStage<1, [A2_XU]>],
|
2013-11-29 15:04:59 +08:00
|
|
|
[0, 0, 0]>,
|
2013-11-28 14:05:59 +08:00
|
|
|
InstrItinData<IIC_LdStSTFDU, [InstrStage<1, [A2_XU]>],
|
2013-11-29 15:04:59 +08:00
|
|
|
[2, 0, 0, 0]>,
|
2013-11-28 14:05:59 +08:00
|
|
|
InstrItinData<IIC_LdStLFD, [InstrStage<1, [A2_XU]>],
|
2013-11-29 15:04:59 +08:00
|
|
|
[7, 0, 0]>,
|
2013-11-28 14:05:59 +08:00
|
|
|
InstrItinData<IIC_LdStLFDU, [InstrStage<1, [A2_XU]>],
|
2013-11-29 15:04:59 +08:00
|
|
|
[7, 9, 0, 0]>,
|
2013-12-01 04:41:13 +08:00
|
|
|
InstrItinData<IIC_LdStLFDUX, [InstrStage<1, [A2_XU]>],
|
|
|
|
[7, 9, 0, 0]>,
|
2013-11-28 14:05:59 +08:00
|
|
|
InstrItinData<IIC_LdStLHA, [InstrStage<1, [A2_XU]>],
|
2013-11-29 15:04:59 +08:00
|
|
|
[6, 0, 0]>,
|
2013-11-28 14:05:59 +08:00
|
|
|
InstrItinData<IIC_LdStLHAU, [InstrStage<1, [A2_XU]>],
|
2013-11-29 15:04:59 +08:00
|
|
|
[6, 8, 0, 0]>,
|
2013-12-01 04:41:13 +08:00
|
|
|
InstrItinData<IIC_LdStLHAUX, [InstrStage<1, [A2_XU]>],
|
|
|
|
[6, 8, 0, 0]>,
|
2013-11-28 14:05:59 +08:00
|
|
|
InstrItinData<IIC_LdStLWARX, [InstrStage<1, [A2_XU]>],
|
2013-11-29 15:04:59 +08:00
|
|
|
[82, 0, 0]>, // L2 latency
|
2013-11-28 14:05:59 +08:00
|
|
|
InstrItinData<IIC_LdStSTD, [InstrStage<1, [A2_XU]>],
|
2013-11-29 15:04:59 +08:00
|
|
|
[0, 0, 0]>,
|
2018-11-20 23:11:42 +08:00
|
|
|
InstrItinData<IIC_LdStSTU, [InstrStage<1, [A2_XU]>],
|
2013-11-29 15:04:59 +08:00
|
|
|
[2, 0, 0, 0]>,
|
2018-11-20 23:11:42 +08:00
|
|
|
InstrItinData<IIC_LdStSTUX, [InstrStage<1, [A2_XU]>],
|
2013-12-01 04:41:13 +08:00
|
|
|
[2, 0, 0, 0]>,
|
2013-11-28 14:05:59 +08:00
|
|
|
InstrItinData<IIC_LdStSTDCX, [InstrStage<1, [A2_XU]>],
|
2013-11-29 15:04:59 +08:00
|
|
|
[82, 0, 0]>, // L2 latency
|
2013-11-28 14:05:59 +08:00
|
|
|
InstrItinData<IIC_LdStSTWCX, [InstrStage<1, [A2_XU]>],
|
2013-11-29 15:04:59 +08:00
|
|
|
[82, 0, 0]>, // L2 latency
|
2013-11-28 14:05:59 +08:00
|
|
|
InstrItinData<IIC_LdStSync, [InstrStage<1, [A2_XU]>],
|
2013-11-28 07:26:09 +08:00
|
|
|
[6]>,
|
2013-11-28 14:05:59 +08:00
|
|
|
InstrItinData<IIC_SprISYNC, [InstrStage<1, [A2_XU]>],
|
2013-11-28 07:26:09 +08:00
|
|
|
[16]>,
|
2013-11-28 14:05:59 +08:00
|
|
|
InstrItinData<IIC_SprMTMSR, [InstrStage<1, [A2_XU]>],
|
2013-11-29 15:04:59 +08:00
|
|
|
[16, 0]>,
|
2013-11-28 14:05:59 +08:00
|
|
|
InstrItinData<IIC_SprMFCR, [InstrStage<1, [A2_XU]>],
|
2013-11-29 15:04:59 +08:00
|
|
|
[6, 0]>,
|
2013-12-01 04:41:13 +08:00
|
|
|
InstrItinData<IIC_SprMFCRF, [InstrStage<1, [A2_XU]>],
|
|
|
|
[1, 0]>,
|
2013-11-28 14:05:59 +08:00
|
|
|
InstrItinData<IIC_SprMFMSR, [InstrStage<1, [A2_XU]>],
|
2013-11-29 15:04:59 +08:00
|
|
|
[4, 0]>,
|
2013-11-28 14:05:59 +08:00
|
|
|
InstrItinData<IIC_SprMFSPR, [InstrStage<1, [A2_XU]>],
|
2013-11-29 15:04:59 +08:00
|
|
|
[6, 0]>,
|
2013-11-28 14:05:59 +08:00
|
|
|
InstrItinData<IIC_SprMFTB, [InstrStage<1, [A2_XU]>],
|
2013-11-29 15:04:59 +08:00
|
|
|
[4, 0]>,
|
2013-11-28 14:05:59 +08:00
|
|
|
InstrItinData<IIC_SprMTSPR, [InstrStage<1, [A2_XU]>],
|
2013-11-29 15:04:59 +08:00
|
|
|
[6, 0]>,
|
2013-11-28 14:05:59 +08:00
|
|
|
InstrItinData<IIC_SprRFI, [InstrStage<1, [A2_XU]>],
|
2013-11-28 07:26:09 +08:00
|
|
|
[16]>,
|
2013-11-28 14:05:59 +08:00
|
|
|
InstrItinData<IIC_SprSC, [InstrStage<1, [A2_XU]>],
|
2013-11-28 07:26:09 +08:00
|
|
|
[16]>,
|
2013-11-28 14:05:59 +08:00
|
|
|
InstrItinData<IIC_FPGeneral, [InstrStage<1, [A2_FU]>],
|
2013-11-29 15:04:59 +08:00
|
|
|
[6, 0, 0]>,
|
2013-11-28 14:05:59 +08:00
|
|
|
InstrItinData<IIC_FPAddSub, [InstrStage<1, [A2_FU]>],
|
2013-11-29 15:04:59 +08:00
|
|
|
[6, 0, 0]>,
|
2013-11-28 14:05:59 +08:00
|
|
|
InstrItinData<IIC_FPCompare, [InstrStage<1, [A2_FU]>],
|
2013-11-29 15:04:59 +08:00
|
|
|
[5, 0, 0]>,
|
2013-11-28 14:05:59 +08:00
|
|
|
InstrItinData<IIC_FPDivD, [InstrStage<1, [A2_FU]>],
|
2013-11-29 15:04:59 +08:00
|
|
|
[72, 0, 0]>,
|
2013-11-28 14:05:59 +08:00
|
|
|
InstrItinData<IIC_FPDivS, [InstrStage<1, [A2_FU]>],
|
2013-11-29 15:04:59 +08:00
|
|
|
[59, 0, 0]>,
|
2013-12-01 04:41:13 +08:00
|
|
|
InstrItinData<IIC_FPSqrtD, [InstrStage<1, [A2_FU]>],
|
2013-11-29 15:04:59 +08:00
|
|
|
[69, 0, 0]>,
|
2013-12-01 04:41:13 +08:00
|
|
|
InstrItinData<IIC_FPSqrtS, [InstrStage<1, [A2_FU]>],
|
|
|
|
[65, 0, 0]>,
|
2013-11-28 14:05:59 +08:00
|
|
|
InstrItinData<IIC_FPFused, [InstrStage<1, [A2_FU]>],
|
2013-11-29 15:04:59 +08:00
|
|
|
[6, 0, 0, 0]>,
|
2013-11-28 14:05:59 +08:00
|
|
|
InstrItinData<IIC_FPRes, [InstrStage<1, [A2_FU]>],
|
2013-11-29 15:04:59 +08:00
|
|
|
[6, 0]>
|
2012-04-02 03:22:40 +08:00
|
|
|
]>;
|
2013-04-05 13:34:08 +08:00
|
|
|
|
|
|
|
// ===---------------------------------------------------------------------===//
|
|
|
|
// A2 machine model for scheduling and other instruction cost heuristics.
|
|
|
|
|
|
|
|
def PPCA2Model : SchedMachineModel {
|
2013-11-27 11:12:56 +08:00
|
|
|
let IssueWidth = 1; // 1 instruction is dispatched per cycle.
|
2013-04-05 13:34:08 +08:00
|
|
|
let LoadLatency = 6; // Optimistic load latency assuming bypass.
|
|
|
|
// This is overriden by OperandCycles if the
|
|
|
|
// Itineraries are queried instead.
|
2013-04-06 07:28:58 +08:00
|
|
|
let MispredictPenalty = 13;
|
2013-04-05 13:34:08 +08:00
|
|
|
|
2016-03-02 04:03:21 +08:00
|
|
|
let CompleteModel = 0;
|
|
|
|
|
2013-04-05 13:34:08 +08:00
|
|
|
let Itineraries = PPCA2Itineraries;
|
|
|
|
}
|
|
|
|
|