1 //===-- PPCSchedule.td - PowerPC Scheduling Definitions ----*- tablegen -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 //===----------------------------------------------------------------------===//
11 // Functional units across PowerPC chips sets
13 def BPU : FuncUnit; // Branch unit
14 def SLU : FuncUnit; // Store/load unit
15 def SRU : FuncUnit; // special register unit
16 def IU1 : FuncUnit; // integer unit 1 (simple)
17 def IU2 : FuncUnit; // integer unit 2 (complex)
18 def FPU1 : FuncUnit; // floating point unit 1
19 def FPU2 : FuncUnit; // floating point unit 2
20 def VPU : FuncUnit; // vector permutation unit
21 def VIU1 : FuncUnit; // vector integer unit 1 (simple)
22 def VIU2 : FuncUnit; // vector integer unit 2 (complex)
23 def VFPU : FuncUnit; // vector floating point unit
25 //===----------------------------------------------------------------------===//
26 // Instruction Itinerary classes used for PowerPC
28 def IntSimple : InstrItinClass;
29 def IntGeneral : InstrItinClass;
30 def IntCompare : InstrItinClass;
31 def IntDivD : InstrItinClass;
32 def IntDivW : InstrItinClass;
33 def IntMFFS : InstrItinClass;
34 def IntMFVSCR : InstrItinClass;
35 def IntMTFSB0 : InstrItinClass;
36 def IntMTSRD : InstrItinClass;
37 def IntMulHD : InstrItinClass;
38 def IntMulHW : InstrItinClass;
39 def IntMulHWU : InstrItinClass;
40 def IntMulLI : InstrItinClass;
41 def IntRFID : InstrItinClass;
42 def IntRotateD : InstrItinClass;
43 def IntRotateDI : InstrItinClass;
44 def IntRotate : InstrItinClass;
45 def IntShift : InstrItinClass;
46 def IntTrapD : InstrItinClass;
47 def IntTrapW : InstrItinClass;
48 def BrB : InstrItinClass;
49 def BrCR : InstrItinClass;
50 def BrMCR : InstrItinClass;
51 def BrMCRX : InstrItinClass;
52 def LdStDCBA : InstrItinClass;
53 def LdStDCBF : InstrItinClass;
54 def LdStDCBI : InstrItinClass;
55 def LdStLoad : InstrItinClass;
56 def LdStLoadUpd : InstrItinClass;
57 def LdStStore : InstrItinClass;
58 def LdStStoreUpd : InstrItinClass;
59 def LdStDSS : InstrItinClass;
60 def LdStICBI : InstrItinClass;
61 def LdStLD : InstrItinClass;
62 def LdStLDU : InstrItinClass;
63 def LdStLDARX : InstrItinClass;
64 def LdStLFD : InstrItinClass;
65 def LdStLFDU : InstrItinClass;
66 def LdStLHA : InstrItinClass;
67 def LdStLHAU : InstrItinClass;
68 def LdStLMW : InstrItinClass;
69 def LdStLVecX : InstrItinClass;
70 def LdStLWA : InstrItinClass;
71 def LdStLWARX : InstrItinClass;
72 def LdStSLBIA : InstrItinClass;
73 def LdStSLBIE : InstrItinClass;
74 def LdStSTD : InstrItinClass;
75 def LdStSTDCX : InstrItinClass;
76 def LdStSTDU : InstrItinClass;
77 def LdStSTFD : InstrItinClass;
78 def LdStSTFDU : InstrItinClass;
79 def LdStSTVEBX : InstrItinClass;
80 def LdStSTWCX : InstrItinClass;
81 def LdStSync : InstrItinClass;
82 def SprISYNC : InstrItinClass;
83 def SprMFSR : InstrItinClass;
84 def SprMTMSR : InstrItinClass;
85 def SprMTSR : InstrItinClass;
86 def SprTLBSYNC : InstrItinClass;
87 def SprMFCR : InstrItinClass;
88 def SprMFMSR : InstrItinClass;
89 def SprMFSPR : InstrItinClass;
90 def SprMFTB : InstrItinClass;
91 def SprMTSPR : InstrItinClass;
92 def SprMTSRIN : InstrItinClass;
93 def SprRFI : InstrItinClass;
94 def SprSC : InstrItinClass;
95 def FPGeneral : InstrItinClass;
96 def FPAddSub : InstrItinClass;
97 def FPCompare : InstrItinClass;
98 def FPDivD : InstrItinClass;
99 def FPDivS : InstrItinClass;
100 def FPFused : InstrItinClass;
101 def FPRes : InstrItinClass;
102 def FPSqrt : InstrItinClass;
103 def VecGeneral : InstrItinClass;
104 def VecFP : InstrItinClass;
105 def VecFPCompare : InstrItinClass;
106 def VecComplex : InstrItinClass;
107 def VecPerm : InstrItinClass;
108 def VecFPRound : InstrItinClass;
109 def VecVSL : InstrItinClass;
110 def VecVSR : InstrItinClass;
112 //===----------------------------------------------------------------------===//
113 // Processor instruction itineraries.
115 include "PPCScheduleG3.td"
116 include "PPCSchedule440.td"
117 include "PPCScheduleG4.td"
118 include "PPCScheduleG4Plus.td"
119 include "PPCScheduleG5.td"
120 include "PPCScheduleA2.td"
122 //===----------------------------------------------------------------------===//
123 // Instruction to itinerary class map - When add new opcodes to the supported
124 // set, refer to the following table to determine which itinerary class the
127 // opcode itinerary class
128 // ====== ===============
304 // rldicl IntRotateDI
305 // rldicr IntRotateDI
306 // rldimi IntRotateDI
323 // stbux LdStStoreUpd
342 // sthux LdStStoreUpd
356 // stwux LdStStoreUpd
369 // tlbsync SprTLBSYNC
372 // vaddcuw VecGeneral
374 // vaddsbs VecGeneral
375 // vaddshs VecGeneral
376 // vaddsws VecGeneral
377 // vaddubm VecGeneral
378 // vaddubs VecGeneral
379 // vadduhm VecGeneral
380 // vadduhs VecGeneral
381 // vadduwm VecGeneral
382 // vadduws VecGeneral
393 // vcmpbfp VecFPCompare
394 // vcmpeqfp VecFPCompare
395 // vcmpequb VecGeneral
396 // vcmpequh VecGeneral
397 // vcmpequw VecGeneral
398 // vcmpgefp VecFPCompare
399 // vcmpgtfp VecFPCompare
400 // vcmpgtsb VecGeneral
401 // vcmpgtsh VecGeneral
402 // vcmpgtsw VecGeneral
403 // vcmpgtub VecGeneral
404 // vcmpgtuh VecGeneral
405 // vcmpgtuw VecGeneral
411 // vmaxfp VecFPCompare
418 // vmhaddshs VecComplex
419 // vmhraddshs VecComplex
420 // vminfp VecFPCompare
427 // vmladduhm VecComplex
435 // vmsummbm VecComplex
436 // vmsumshm VecComplex
437 // vmsumshs VecComplex
438 // vmsumubm VecComplex
439 // vmsumuhm VecComplex
440 // vmsumuhs VecComplex
441 // vmulesb VecComplex
442 // vmulesh VecComplex
443 // vmuleub VecComplex
444 // vmuleuh VecComplex
445 // vmulosb VecComplex
446 // vmulosh VecComplex
447 // vmuloub VecComplex
448 // vmulouh VecComplex
491 // vsubcuw VecGeneral
493 // vsubsbs VecGeneral
494 // vsubshs VecGeneral
495 // vsubsws VecGeneral
496 // vsububm VecGeneral
497 // vsububs VecGeneral
498 // vsubuhm VecGeneral
499 // vsubuhs VecGeneral
500 // vsubuwm VecGeneral
501 // vsubuws VecGeneral
502 // vsum2sws VecComplex
503 // vsum4sbs VecComplex
504 // vsum4shs VecComplex
505 // vsum4ubs VecComplex
506 // vsumsws VecComplex