blob: dc12e76f7ff3140806c68077dafc38e651e40a9c [file] [log] [blame]
Jim Laskey076866c2005-10-18 16:23:40 +00001//===- PPCSchedule.td - PowerPC Scheduling Definitions -----*- tablegen -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file was developed by James M. Laskey and is distributed under
6// the University of Illinois Open Source License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10#include "../TargetSchedule.td"
11
12//===----------------------------------------------------------------------===//
13// PowerPC chips sets supported by scheduling (Apple naming)
14//
15def G3 : Processor;
16def G4 : Processor;
17def G4Plus : Processor;
18def G5 : Processor;
19
20//===----------------------------------------------------------------------===//
21// Functional units across PowerPC chips sets
22//
23def NoUnit : FuncUnit; // Instruction not supported on chip set
24def BPU : FuncUnit; // Branch unit
25def SLU : FuncUnit; // Store/load unit
26def SRU : FuncUnit; // special register unit
27def IU1 : FuncUnit; // integer unit 1 (simple)
28def IU2 : FuncUnit; // integer unit 2 (complex)
29def IU3 : FuncUnit; // integer unit 3 (7450 simple)
30def IU4 : FuncUnit; // integer unit 4 (7450 simple)
31def FPU1 : FuncUnit; // floating point unit 1
32def FPU2 : FuncUnit; // floating point unit 2
33def VPU : FuncUnit; // vector permutation unit
34def VIU1 : FuncUnit; // vector integer unit 1 (simple)
35def VIU2 : FuncUnit; // vector integer unit 2 (complex)
36def VFPU : FuncUnit; // vector floating point unit
37
38
39//===----------------------------------------------------------------------===//
40// Instruction Itinerary classes used for PowerPC
41//
42def IntGeneral : InstrItinClass;
43def IntCompare : InstrItinClass;
44def IntDivD : InstrItinClass;
45def IntDivW : InstrItinClass;
46def IntMFFS : InstrItinClass;
47def IntMFVSCR : InstrItinClass;
48def IntMTFSB0 : InstrItinClass;
49def IntMTSRD : InstrItinClass;
50def IntMulHD : InstrItinClass;
51def IntMulHW : InstrItinClass;
52def IntMulHWU : InstrItinClass;
53def IntMulLI : InstrItinClass;
54def IntRFID : InstrItinClass;
55def IntRotateD : InstrItinClass;
56def IntRotate : InstrItinClass;
57def IntShift : InstrItinClass;
58def IntTrapD : InstrItinClass;
59def IntTrapW : InstrItinClass;
60def BrB : InstrItinClass;
61def BrCR : InstrItinClass;
62def BrMCR : InstrItinClass;
63def BrMCRX : InstrItinClass;
64def LdStDCBA : InstrItinClass;
65def LdStDCBF : InstrItinClass;
66def LdStDCBI : InstrItinClass;
67def LdStDCBT : InstrItinClass;
68def LdStDSS : InstrItinClass;
69def LdStICBI : InstrItinClass;
70def LdStLBZUX : InstrItinClass;
71def LdStLD : InstrItinClass;
72def LdStLDARX : InstrItinClass;
73def LdStLFD : InstrItinClass;
74def LdStLFDU : InstrItinClass;
75def LdStLHA : InstrItinClass;
76def LdStLMW : InstrItinClass;
77def LdStLVEBX : InstrItinClass;
78def LdStLWA : InstrItinClass;
79def LdStLWARX : InstrItinClass;
80def LdStSLBIA : InstrItinClass;
81def LdStSLBIE : InstrItinClass;
82def LdStSTD : InstrItinClass;
83def LdStSTDCX : InstrItinClass;
84def LdStSTVEBX : InstrItinClass;
85def LdStSTWCX : InstrItinClass;
86def LdStSync : InstrItinClass;
87def SprISYNC : InstrItinClass;
88def SprMFSR : InstrItinClass;
89def SprMTMSR : InstrItinClass;
90def SprMTSR : InstrItinClass;
91def SprTLBSYNC : InstrItinClass;
92def SprMFCR : InstrItinClass;
93def SprMFMSR : InstrItinClass;
94def SprMFSPR : InstrItinClass;
95def SprMFTB : InstrItinClass;
96def SprMTSPR : InstrItinClass;
97def SprMTSRIN : InstrItinClass;
98def SprRFI : InstrItinClass;
99def SprSC : InstrItinClass;
100def FPGeneral : InstrItinClass;
101def FPCompare : InstrItinClass;
102def FPDivD : InstrItinClass;
103def FPDivS : InstrItinClass;
104def FPFused : InstrItinClass;
105def FPRes : InstrItinClass;
106def FPSqrt : InstrItinClass;
107def VecGeneral : InstrItinClass;
108def VecFP : InstrItinClass;
109def VecFPCompare : InstrItinClass;
110def VecComplex : InstrItinClass;
111def VecPerm : InstrItinClass;
112def VecFPRound : InstrItinClass;
113def VecVSL : InstrItinClass;
114def VecVSR : InstrItinClass;
115
116//===----------------------------------------------------------------------===//
117// Processor instruction itineraries.
118
119#include "PPCScheduleG3.td"
120#include "PPCScheduleG4.td"
121#include "PPCScheduleG4Plus.td"
122#include "PPCScheduleG5.td"
123
124//===----------------------------------------------------------------------===//
125// Instruction to itinerary class map - When add new opcodes to the supported
126// set, refer to the following table to determine which itinerary class the
127// opcode belongs.
128//
129// opcode itinerary class
130// ====== ===============
131// add IntGeneral
132// addc IntGeneral
133// adde IntGeneral
134// addi IntGeneral
135// addic IntGeneral
136// addic. IntGeneral
137// addis IntGeneral
138// addme IntGeneral
139// addze IntGeneral
140// and IntGeneral
141// andc IntGeneral
142// andi. IntGeneral
143// andis. IntGeneral
144// b BrB
145// bc BrB
146// bcctr BrB
147// bclr BrB
148// cmp IntCompare
149// cmpi IntCompare
150// cmpl IntCompare
151// cmpli IntCompare
152// cntlzd IntRotateD
153// cntlzw IntGeneral
154// crand BrCR
155// crandc BrCR
156// creqv BrCR
157// crnand BrCR
158// crnor BrCR
159// cror BrCR
160// crorc BrCR
161// crxor BrCR
162// dcba LdStDCBA
163// dcbf LdStDCBF
164// dcbi LdStDCBI
165// dcbst LdStDCBF
166// dcbt LdStDCBT
167// dcbtst LdStDCBT
168// dcbz LdStDCBF
169// divd IntDivD
170// divdu IntDivD
171// divw IntDivW
172// divwu IntDivW
173// dss LdStDSS
174// dst LdStDSS
175// dstst LdStDSS
176// eciwx LdStDCBT
177// ecowx LdStDCBT
178// eieio LdStDCBT
179// eqv IntGeneral
180// extsb IntGeneral
181// extsh IntGeneral
182// extsw IntRotateD
183// fabs FPGeneral
184// fadd FPGeneral
185// fadds FPGeneral
186// fcfid FPGeneral
187// fcmpo FPCompare
188// fcmpu FPCompare
189// fctid FPGeneral
190// fctidz FPGeneral
191// fctiw FPGeneral
192// fctiwz FPGeneral
193// fdiv FPDivD
194// fdivs FPDivS
195// fmadd FPFused
196// fmadds FPGeneral
197// fmr FPGeneral
198// fmsub FPFused
199// fmsubs FPGeneral
200// fmul FPFused
201// fmuls FPGeneral
202// fnabs FPGeneral
203// fneg FPGeneral
204// fnmadd FPFused
205// fnmadds FPGeneral
206// fnmsub FPFused
207// fnmsubs FPGeneral
208// fres FPRes
209// frsp FPGeneral
210// frsqrte FPGeneral
211// fsel FPGeneral
212// fsqrt FPSqrt
213// fsqrts FPSqrt
214// fsub FPGeneral
215// fsubs FPGeneral
216// icbi LdStICBI
217// isync SprISYNC
218// lbz LdStDCBT
219// lbzu LdStDCBT
220// lbzux LdStLBZUX
221// lbzx LdStDCBT
222// ld LdStLD
223// ldarx LdStLDARX
224// ldu LdStLD
225// ldux LdStLD
226// ldx LdStLD
227// lfd LdStLFD
228// lfdu LdStLFDU
229// lfdux LdStLFDU
230// lfdx LdStLFDU
231// lfs LdStLFDU
232// lfsu LdStLFDU
233// lfsux LdStLFDU
234// lfsx LdStLFDU
235// lha LdStLHA
236// lhau LdStLHA
237// lhaux LdStLHA
238// lhax LdStLHA
239// lhbrx LdStDCBT
240// lhz LdStDCBT
241// lhzu LdStDCBT
242// lhzux LdStLBZUX
243// lhzx LdStDCBT
244// lmw LdStLMW
245// lswi LdStLMW
246// lswx LdStLMW
247// lvebx LdStLVEBX
248// lvehx LdStLVEBX
249// lvewx LdStLVEBX
250// lvsl LdStLVEBX
251// lvsr LdStLVEBX
252// lvx LdStLVEBX
253// lvxl LdStLVEBX
254// lwa LdStLWA
255// lwarx LdStLWARX
256// lwaux LdStLHA
257// lwax LdStLHA
258// lwbrx LdStDCBT
259// lwz LdStDCBT
260// lwzu LdStDCBT
261// lwzux LdStLBZUX
262// lwzx LdStDCBT
263// mcrf BrMCR
264// mcrfs FPGeneral
265// mcrxr BrMCRX
266// mfcr SprMFCR
267// mffs IntMFFS
268// mfmsr SprMFMSR
269// mfspr SprMFSPR
270// mfsr SprMFSR
271// mfsrin SprMFSR
272// mftb SprMFTB
273// mfvscr IntMFVSCR
274// mtcrf BrMCRX
275// mtfsb0 IntMTFSB0
276// mtfsb1 IntMTFSB0
277// mtfsf IntMTFSB0
278// mtfsfi IntMTFSB0
279// mtmsr SprMTMSR
280// mtmsrd LdStLD
281// mtspr SprMTSPR
282// mtsr SprMTSR
283// mtsrd IntMTSRD
284// mtsrdin IntMTSRD
285// mtsrin SprMTSRIN
286// mtvscr IntMFVSCR
287// mulhd IntMulHD
288// mulhdu IntMulHD
289// mulhw IntMulHW
290// mulhwu IntMulHWU
291// mulld IntMulHD
292// mulli IntMulLI
293// mullw IntMulHW
294// nand IntGeneral
295// neg IntGeneral
296// nor IntGeneral
297// or IntGeneral
298// orc IntGeneral
299// ori IntGeneral
300// oris IntGeneral
301// rfi SprRFI
302// rfid IntRFID
303// rldcl IntRotateD
304// rldcr IntRotateD
305// rldic IntRotateD
306// rldicl IntRotateD
307// rldicr IntRotateD
308// rldimi IntRotateD
309// rlwimi IntRotate
310// rlwinm IntGeneral
311// rlwnm IntGeneral
312// sc SprSC
313// slbia LdStSLBIA
314// slbie LdStSLBIE
315// sld IntRotateD
316// slw IntGeneral
317// srad IntRotateD
318// sradi IntRotateD
319// sraw IntShift
320// srawi IntShift
321// srd IntRotateD
322// srw IntGeneral
323// stb LdStDCBT
324// stbu LdStDCBT
325// stbux LdStDCBT
326// stbx LdStDCBT
327// std LdStSTD
328// stdcx. LdStSTDCX
329// stdu LdStSTD
330// stdux LdStSTD
331// stdx LdStSTD
332// stfd LdStLBZUX
333// stfdu LdStLBZUX
334// stfdux LdStLBZUX
335// stfdx LdStLBZUX
336// stfiwx LdStLBZUX
337// stfs LdStLBZUX
338// stfsu LdStLBZUX
339// stfsux LdStLBZUX
340// stfsx LdStLBZUX
341// sth LdStDCBT
342// sthbrx LdStDCBT
343// sthu LdStDCBT
344// sthux LdStDCBT
345// sthx LdStDCBT
346// stmw LdStLMW
347// stswi LdStLMW
348// stswx LdStLMW
349// stvebx LdStSTVEBX
350// stvehx LdStSTVEBX
351// stvewx LdStSTVEBX
352// stvx LdStSTVEBX
353// stvxl LdStSTVEBX
354// stw LdStDCBT
355// stwbrx LdStDCBT
356// stwcx. LdStSTWCX
357// stwu LdStDCBT
358// stwux LdStDCBT
359// stwx LdStDCBT
360// subf IntGeneral
361// subfc IntGeneral
362// subfe IntGeneral
363// subfic IntGeneral
364// subfme IntGeneral
365// subfze IntGeneral
366// sync LdStSync
367// td IntTrapD
368// tdi IntTrapD
369// tlbia LdStSLBIA
370// tlbie LdStDCBF
371// tlbsync SprTLBSYNC
372// tw IntTrapW
373// twi IntTrapW
374// vaddcuw VecGeneral
375// vaddfp VecFP
376// vaddsbs VecGeneral
377// vaddshs VecGeneral
378// vaddsws VecGeneral
379// vaddubm VecGeneral
380// vaddubs VecGeneral
381// vadduhm VecGeneral
382// vadduhs VecGeneral
383// vadduwm VecGeneral
384// vadduws VecGeneral
385// vand VecGeneral
386// vandc VecGeneral
387// vavgsb VecGeneral
388// vavgsh VecGeneral
389// vavgsw VecGeneral
390// vavgub VecGeneral
391// vavguh VecGeneral
392// vavguw VecGeneral
393// vcfsx VecFP
394// vcfux VecFP
395// vcmpbfp VecFPCompare
396// vcmpeqfp VecFPCompare
397// vcmpequb VecGeneral
398// vcmpequh VecGeneral
399// vcmpequw VecGeneral
400// vcmpgefp VecFPCompare
401// vcmpgtfp VecFPCompare
402// vcmpgtsb VecGeneral
403// vcmpgtsh VecGeneral
404// vcmpgtsw VecGeneral
405// vcmpgtub VecGeneral
406// vcmpgtuh VecGeneral
407// vcmpgtuw VecGeneral
408// vctsxs VecFP
409// vctuxs VecFP
410// vexptefp VecFP
411// vlogefp VecFP
412// vmaddfp VecFP
413// vmaxfp VecFPCompare
414// vmaxsb VecGeneral
415// vmaxsh VecGeneral
416// vmaxsw VecGeneral
417// vmaxub VecGeneral
418// vmaxuh VecGeneral
419// vmaxuw VecGeneral
420// vmhaddshs VecComplex
421// vmhraddshs VecComplex
422// vminfp VecFPCompare
423// vminsb VecGeneral
424// vminsh VecGeneral
425// vminsw VecGeneral
426// vminub VecGeneral
427// vminuh VecGeneral
428// vminuw VecGeneral
429// vmladduhm VecComplex
430// vmrghb VecPerm
431// vmrghh VecPerm
432// vmrghw VecPerm
433// vmrglb VecPerm
434// vmrglh VecPerm
435// vmrglw VecPerm
436// vmsubfp VecFP
437// vmsummbm VecComplex
438// vmsumshm VecComplex
439// vmsumshs VecComplex
440// vmsumubm VecComplex
441// vmsumuhm VecComplex
442// vmsumuhs VecComplex
443// vmulesb VecComplex
444// vmulesh VecComplex
445// vmuleub VecComplex
446// vmuleuh VecComplex
447// vmulosb VecComplex
448// vmulosh VecComplex
449// vmuloub VecComplex
450// vmulouh VecComplex
451// vnor VecGeneral
452// vor VecGeneral
453// vperm VecPerm
454// vpkpx VecPerm
455// vpkshss VecPerm
456// vpkshus VecPerm
457// vpkswss VecPerm
458// vpkswus VecPerm
459// vpkuhum VecPerm
460// vpkuhus VecPerm
461// vpkuwum VecPerm
462// vpkuwus VecPerm
463// vrefp VecFPRound
464// vrfim VecFPRound
465// vrfin VecFPRound
466// vrfip VecFPRound
467// vrfiz VecFPRound
468// vrlb VecGeneral
469// vrlh VecGeneral
470// vrlw VecGeneral
471// vrsqrtefp VecFP
472// vsel VecGeneral
473// vsl VecVSL
474// vslb VecGeneral
475// vsldoi VecPerm
476// vslh VecGeneral
477// vslo VecPerm
478// vslw VecGeneral
479// vspltb VecPerm
480// vsplth VecPerm
481// vspltisb VecPerm
482// vspltish VecPerm
483// vspltisw VecPerm
484// vspltw VecPerm
485// vsr VecVSR
486// vsrab VecGeneral
487// vsrah VecGeneral
488// vsraw VecGeneral
489// vsrb VecGeneral
490// vsrh VecGeneral
491// vsro VecPerm
492// vsrw VecGeneral
493// vsubcuw VecGeneral
494// vsubfp VecFP
495// vsubsbs VecGeneral
496// vsubshs VecGeneral
497// vsubsws VecGeneral
498// vsububm VecGeneral
499// vsububs VecGeneral
500// vsubuhm VecGeneral
501// vsubuhs VecGeneral
502// vsubuwm VecGeneral
503// vsubuws VecGeneral
504// vsum2sws VecComplex
505// vsum4sbs VecComplex
506// vsum4shs VecComplex
507// vsum4ubs VecComplex
508// vsumsws VecComplex
509// vupkhpx VecPerm
510// vupkhsb VecPerm
511// vupkhsh VecPerm
512// vupklpx VecPerm
513// vupklsb VecPerm
514// vupklsh VecPerm
515// vxor VecGeneral
516// xor IntGeneral
517// xori IntGeneral
518// xoris IntGeneral
519//
520