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;
111 def SprMTMSRD : InstrItinClass;
112 def SprSLIE : InstrItinClass;
113 def SprSLBIE : InstrItinClass;
114 def SprSLBMTE : InstrItinClass;
115 def SprSLBMFEE : InstrItinClass;
116 def SprSLBIA : InstrItinClass;
117 def SprTLBIEL : InstrItinClass;
118 def SprTLBIE : InstrItinClass;
120 //===----------------------------------------------------------------------===//
121 // Processor instruction itineraries.
123 include "PPCScheduleG3.td"
124 include "PPCSchedule440.td"
125 include "PPCScheduleG4.td"
126 include "PPCScheduleG4Plus.td"
127 include "PPCScheduleG5.td"
128 include "PPCScheduleA2.td"
129 include "PPCScheduleE500mc.td"
130 include "PPCScheduleE5500.td"
132 //===----------------------------------------------------------------------===//
133 // Instruction to itinerary class map - When add new opcodes to the supported
134 // set, refer to the following table to determine which itinerary class the
137 // opcode itinerary class
138 // ====== ===============
314 // rldicl IntRotateDI
315 // rldicr IntRotateDI
316 // rldimi IntRotateDI
333 // stbux LdStStoreUpd
352 // sthux LdStStoreUpd
366 // stwux LdStStoreUpd
379 // tlbsync SprTLBSYNC
382 // vaddcuw VecGeneral
384 // vaddsbs VecGeneral
385 // vaddshs VecGeneral
386 // vaddsws VecGeneral
387 // vaddubm VecGeneral
388 // vaddubs VecGeneral
389 // vadduhm VecGeneral
390 // vadduhs VecGeneral
391 // vadduwm VecGeneral
392 // vadduws VecGeneral
403 // vcmpbfp VecFPCompare
404 // vcmpeqfp VecFPCompare
405 // vcmpequb VecGeneral
406 // vcmpequh VecGeneral
407 // vcmpequw VecGeneral
408 // vcmpgefp VecFPCompare
409 // vcmpgtfp VecFPCompare
410 // vcmpgtsb VecGeneral
411 // vcmpgtsh VecGeneral
412 // vcmpgtsw VecGeneral
413 // vcmpgtub VecGeneral
414 // vcmpgtuh VecGeneral
415 // vcmpgtuw VecGeneral
421 // vmaxfp VecFPCompare
428 // vmhaddshs VecComplex
429 // vmhraddshs VecComplex
430 // vminfp VecFPCompare
437 // vmladduhm VecComplex
445 // vmsummbm VecComplex
446 // vmsumshm VecComplex
447 // vmsumshs VecComplex
448 // vmsumubm VecComplex
449 // vmsumuhm VecComplex
450 // vmsumuhs VecComplex
451 // vmulesb VecComplex
452 // vmulesh VecComplex
453 // vmuleub VecComplex
454 // vmuleuh VecComplex
455 // vmulosb VecComplex
456 // vmulosh VecComplex
457 // vmuloub VecComplex
458 // vmulouh VecComplex
501 // vsubcuw VecGeneral
503 // vsubsbs VecGeneral
504 // vsubshs VecGeneral
505 // vsubsws VecGeneral
506 // vsububm VecGeneral
507 // vsububs VecGeneral
508 // vsubuhm VecGeneral
509 // vsubuhs VecGeneral
510 // vsubuwm VecGeneral
511 // vsubuws VecGeneral
512 // vsum2sws VecComplex
513 // vsum4sbs VecComplex
514 // vsum4shs VecComplex
515 // vsum4ubs VecComplex
516 // vsumsws VecComplex