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 IntGeneral : InstrItinClass;
29 def IntCompare : InstrItinClass;
30 def IntDivD : InstrItinClass;
31 def IntDivW : InstrItinClass;
32 def IntMFFS : InstrItinClass;
33 def IntMFVSCR : InstrItinClass;
34 def IntMTFSB0 : InstrItinClass;
35 def IntMTSRD : InstrItinClass;
36 def IntMulHD : InstrItinClass;
37 def IntMulHW : InstrItinClass;
38 def IntMulHWU : InstrItinClass;
39 def IntMulLI : InstrItinClass;
40 def IntRFID : InstrItinClass;
41 def IntRotateD : InstrItinClass;
42 def IntRotate : InstrItinClass;
43 def IntShift : InstrItinClass;
44 def IntTrapD : InstrItinClass;
45 def IntTrapW : InstrItinClass;
46 def BrB : InstrItinClass;
47 def BrCR : InstrItinClass;
48 def BrMCR : InstrItinClass;
49 def BrMCRX : InstrItinClass;
50 def LdStDCBA : InstrItinClass;
51 def LdStDCBF : InstrItinClass;
52 def LdStDCBI : InstrItinClass;
53 def LdStGeneral : InstrItinClass;
54 def LdStDSS : InstrItinClass;
55 def LdStICBI : InstrItinClass;
56 def LdStUX : InstrItinClass;
57 def LdStLD : InstrItinClass;
58 def LdStLDARX : InstrItinClass;
59 def LdStLFD : InstrItinClass;
60 def LdStLFDU : InstrItinClass;
61 def LdStLHA : InstrItinClass;
62 def LdStLMW : InstrItinClass;
63 def LdStLVecX : InstrItinClass;
64 def LdStLWA : InstrItinClass;
65 def LdStLWARX : InstrItinClass;
66 def LdStSLBIA : InstrItinClass;
67 def LdStSLBIE : InstrItinClass;
68 def LdStSTD : InstrItinClass;
69 def LdStSTDCX : InstrItinClass;
70 def LdStSTVEBX : InstrItinClass;
71 def LdStSTWCX : InstrItinClass;
72 def LdStSync : InstrItinClass;
73 def SprISYNC : InstrItinClass;
74 def SprMFSR : InstrItinClass;
75 def SprMTMSR : InstrItinClass;
76 def SprMTSR : InstrItinClass;
77 def SprTLBSYNC : InstrItinClass;
78 def SprMFCR : InstrItinClass;
79 def SprMFMSR : InstrItinClass;
80 def SprMFSPR : InstrItinClass;
81 def SprMFTB : InstrItinClass;
82 def SprMTSPR : InstrItinClass;
83 def SprMTSRIN : InstrItinClass;
84 def SprRFI : InstrItinClass;
85 def SprSC : InstrItinClass;
86 def FPGeneral : InstrItinClass;
87 def FPCompare : InstrItinClass;
88 def FPDivD : InstrItinClass;
89 def FPDivS : InstrItinClass;
90 def FPFused : InstrItinClass;
91 def FPRes : InstrItinClass;
92 def FPSqrt : InstrItinClass;
93 def VecGeneral : InstrItinClass;
94 def VecFP : InstrItinClass;
95 def VecFPCompare : InstrItinClass;
96 def VecComplex : InstrItinClass;
97 def VecPerm : InstrItinClass;
98 def VecFPRound : InstrItinClass;
99 def VecVSL : InstrItinClass;
100 def VecVSR : InstrItinClass;
102 //===----------------------------------------------------------------------===//
103 // Processor instruction itineraries.
105 include "PPCScheduleG3.td"
106 include "PPCScheduleG4.td"
107 include "PPCScheduleG4Plus.td"
108 include "PPCScheduleG5.td"
110 //===----------------------------------------------------------------------===//
111 // Instruction to itinerary class map - When add new opcodes to the supported
112 // set, refer to the following table to determine which itinerary class the
115 // opcode itinerary class
116 // ====== ===============
153 // dcbtst LdStGeneral
328 // sthbrx LdStGeneral
341 // stwbrx LdStGeneral
357 // tlbsync SprTLBSYNC
360 // vaddcuw VecGeneral
362 // vaddsbs VecGeneral
363 // vaddshs VecGeneral
364 // vaddsws VecGeneral
365 // vaddubm VecGeneral
366 // vaddubs VecGeneral
367 // vadduhm VecGeneral
368 // vadduhs VecGeneral
369 // vadduwm VecGeneral
370 // vadduws VecGeneral
381 // vcmpbfp VecFPCompare
382 // vcmpeqfp VecFPCompare
383 // vcmpequb VecGeneral
384 // vcmpequh VecGeneral
385 // vcmpequw VecGeneral
386 // vcmpgefp VecFPCompare
387 // vcmpgtfp VecFPCompare
388 // vcmpgtsb VecGeneral
389 // vcmpgtsh VecGeneral
390 // vcmpgtsw VecGeneral
391 // vcmpgtub VecGeneral
392 // vcmpgtuh VecGeneral
393 // vcmpgtuw VecGeneral
399 // vmaxfp VecFPCompare
406 // vmhaddshs VecComplex
407 // vmhraddshs VecComplex
408 // vminfp VecFPCompare
415 // vmladduhm VecComplex
423 // vmsummbm VecComplex
424 // vmsumshm VecComplex
425 // vmsumshs VecComplex
426 // vmsumubm VecComplex
427 // vmsumuhm VecComplex
428 // vmsumuhs VecComplex
429 // vmulesb VecComplex
430 // vmulesh VecComplex
431 // vmuleub VecComplex
432 // vmuleuh VecComplex
433 // vmulosb VecComplex
434 // vmulosh VecComplex
435 // vmuloub VecComplex
436 // vmulouh VecComplex
479 // vsubcuw VecGeneral
481 // vsubsbs VecGeneral
482 // vsubshs VecGeneral
483 // vsubsws VecGeneral
484 // vsububm VecGeneral
485 // vsububs VecGeneral
486 // vsubuhm VecGeneral
487 // vsubuhs VecGeneral
488 // vsubuwm VecGeneral
489 // vsubuws VecGeneral
490 // vsum2sws VecComplex
491 // vsum4sbs VecComplex
492 // vsum4shs VecComplex
493 // vsum4ubs VecComplex
494 // vsumsws VecComplex