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 "PPCSchedule440.td"
107 include "PPCScheduleG4.td"
108 include "PPCScheduleG4Plus.td"
109 include "PPCScheduleG5.td"
111 //===----------------------------------------------------------------------===//
112 // Instruction to itinerary class map - When add new opcodes to the supported
113 // set, refer to the following table to determine which itinerary class the
116 // opcode itinerary class
117 // ====== ===============
154 // dcbtst LdStGeneral
329 // sthbrx LdStGeneral
342 // stwbrx LdStGeneral
358 // tlbsync SprTLBSYNC
361 // vaddcuw VecGeneral
363 // vaddsbs VecGeneral
364 // vaddshs VecGeneral
365 // vaddsws VecGeneral
366 // vaddubm VecGeneral
367 // vaddubs VecGeneral
368 // vadduhm VecGeneral
369 // vadduhs VecGeneral
370 // vadduwm VecGeneral
371 // vadduws VecGeneral
382 // vcmpbfp VecFPCompare
383 // vcmpeqfp VecFPCompare
384 // vcmpequb VecGeneral
385 // vcmpequh VecGeneral
386 // vcmpequw VecGeneral
387 // vcmpgefp VecFPCompare
388 // vcmpgtfp VecFPCompare
389 // vcmpgtsb VecGeneral
390 // vcmpgtsh VecGeneral
391 // vcmpgtsw VecGeneral
392 // vcmpgtub VecGeneral
393 // vcmpgtuh VecGeneral
394 // vcmpgtuw VecGeneral
400 // vmaxfp VecFPCompare
407 // vmhaddshs VecComplex
408 // vmhraddshs VecComplex
409 // vminfp VecFPCompare
416 // vmladduhm VecComplex
424 // vmsummbm VecComplex
425 // vmsumshm VecComplex
426 // vmsumshs VecComplex
427 // vmsumubm VecComplex
428 // vmsumuhm VecComplex
429 // vmsumuhs VecComplex
430 // vmulesb VecComplex
431 // vmulesh VecComplex
432 // vmuleub VecComplex
433 // vmuleuh VecComplex
434 // vmulosb VecComplex
435 // vmulosh VecComplex
436 // vmuloub VecComplex
437 // vmulouh VecComplex
480 // vsubcuw VecGeneral
482 // vsubsbs VecGeneral
483 // vsubshs VecGeneral
484 // vsubsws VecGeneral
485 // vsububm VecGeneral
486 // vsububs VecGeneral
487 // vsubuhm VecGeneral
488 // vsubuhs VecGeneral
489 // vsubuwm VecGeneral
490 // vsubuws VecGeneral
491 // vsum2sws VecComplex
492 // vsum4sbs VecComplex
493 // vsum4shs VecComplex
494 // vsum4ubs VecComplex
495 // vsumsws VecComplex