Emacs-tag and some comment fix for all ARM, CellSPU, Hexagon, MBlaze, MSP430, PPC...
[oota-llvm.git] / lib / Target / PowerPC / PPCSchedule.td
1 //===-- PPCSchedule.td - PowerPC Scheduling Definitions ----*- tablegen -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 //===----------------------------------------------------------------------===//
11 // Functional units across PowerPC chips sets
12 //
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
24
25 //===----------------------------------------------------------------------===//
26 // Instruction Itinerary classes used for PowerPC
27 //
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;
101
102 //===----------------------------------------------------------------------===//
103 // Processor instruction itineraries.
104
105 include "PPCScheduleG3.td"
106 include "PPCSchedule440.td"
107 include "PPCScheduleG4.td"
108 include "PPCScheduleG4Plus.td"
109 include "PPCScheduleG5.td"
110
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
114 // opcode belongs.
115 //
116 //    opcode     itinerary class
117 //    ======     ===============
118 //    add        IntGeneral
119 //    addc       IntGeneral
120 //    adde       IntGeneral
121 //    addi       IntGeneral
122 //    addic      IntGeneral
123 //    addic.     IntGeneral
124 //    addis      IntGeneral
125 //    addme      IntGeneral
126 //    addze      IntGeneral
127 //    and        IntGeneral
128 //    andc       IntGeneral
129 //    andi.      IntGeneral
130 //    andis.     IntGeneral
131 //    b          BrB
132 //    bc         BrB
133 //    bcctr      BrB
134 //    bclr       BrB
135 //    cmp        IntCompare
136 //    cmpi       IntCompare
137 //    cmpl       IntCompare
138 //    cmpli      IntCompare
139 //    cntlzd     IntRotateD
140 //    cntlzw     IntGeneral
141 //    crand      BrCR
142 //    crandc     BrCR
143 //    creqv      BrCR
144 //    crnand     BrCR
145 //    crnor      BrCR
146 //    cror       BrCR
147 //    crorc      BrCR
148 //    crxor      BrCR
149 //    dcba       LdStDCBA
150 //    dcbf       LdStDCBF
151 //    dcbi       LdStDCBI
152 //    dcbst      LdStDCBF
153 //    dcbt       LdStGeneral
154 //    dcbtst     LdStGeneral
155 //    dcbz       LdStDCBF
156 //    divd       IntDivD
157 //    divdu      IntDivD
158 //    divw       IntDivW
159 //    divwu      IntDivW
160 //    dss        LdStDSS
161 //    dst        LdStDSS
162 //    dstst      LdStDSS
163 //    eciwx      LdStGeneral
164 //    ecowx      LdStGeneral
165 //    eieio      LdStGeneral
166 //    eqv        IntGeneral
167 //    extsb      IntGeneral
168 //    extsh      IntGeneral
169 //    extsw      IntRotateD
170 //    fabs       FPGeneral
171 //    fadd       FPGeneral
172 //    fadds      FPGeneral
173 //    fcfid      FPGeneral
174 //    fcmpo      FPCompare
175 //    fcmpu      FPCompare
176 //    fctid      FPGeneral
177 //    fctidz     FPGeneral
178 //    fctiw      FPGeneral
179 //    fctiwz     FPGeneral
180 //    fdiv       FPDivD
181 //    fdivs      FPDivS
182 //    fmadd      FPFused
183 //    fmadds     FPGeneral
184 //    fmr        FPGeneral
185 //    fmsub      FPFused
186 //    fmsubs     FPGeneral
187 //    fmul       FPFused
188 //    fmuls      FPGeneral
189 //    fnabs      FPGeneral
190 //    fneg       FPGeneral
191 //    fnmadd     FPFused
192 //    fnmadds    FPGeneral
193 //    fnmsub     FPFused
194 //    fnmsubs    FPGeneral
195 //    fres       FPRes
196 //    frsp       FPGeneral
197 //    frsqrte    FPGeneral
198 //    fsel       FPGeneral
199 //    fsqrt      FPSqrt
200 //    fsqrts     FPSqrt
201 //    fsub       FPGeneral
202 //    fsubs      FPGeneral
203 //    icbi       LdStICBI
204 //    isync      SprISYNC
205 //    lbz        LdStGeneral
206 //    lbzu       LdStGeneral
207 //    lbzux      LdStUX
208 //    lbzx       LdStGeneral
209 //    ld         LdStLD
210 //    ldarx      LdStLDARX
211 //    ldu        LdStLD
212 //    ldux       LdStLD
213 //    ldx        LdStLD
214 //    lfd        LdStLFD
215 //    lfdu       LdStLFDU
216 //    lfdux      LdStLFDU
217 //    lfdx       LdStLFDU
218 //    lfs        LdStLFDU
219 //    lfsu       LdStLFDU
220 //    lfsux      LdStLFDU
221 //    lfsx       LdStLFDU
222 //    lha        LdStLHA
223 //    lhau       LdStLHA
224 //    lhaux      LdStLHA
225 //    lhax       LdStLHA
226 //    lhbrx      LdStGeneral
227 //    lhz        LdStGeneral
228 //    lhzu       LdStGeneral
229 //    lhzux      LdStUX
230 //    lhzx       LdStGeneral
231 //    lmw        LdStLMW
232 //    lswi       LdStLMW
233 //    lswx       LdStLMW
234 //    lvebx      LdStLVecX
235 //    lvehx      LdStLVecX
236 //    lvewx      LdStLVecX
237 //    lvsl       LdStLVecX
238 //    lvsr       LdStLVecX
239 //    lvx        LdStLVecX
240 //    lvxl       LdStLVecX
241 //    lwa        LdStLWA
242 //    lwarx      LdStLWARX
243 //    lwaux      LdStLHA
244 //    lwax       LdStLHA
245 //    lwbrx      LdStGeneral
246 //    lwz        LdStGeneral
247 //    lwzu       LdStGeneral
248 //    lwzux      LdStUX
249 //    lwzx       LdStGeneral
250 //    mcrf       BrMCR
251 //    mcrfs      FPGeneral
252 //    mcrxr      BrMCRX
253 //    mfcr       SprMFCR
254 //    mffs       IntMFFS
255 //    mfmsr      SprMFMSR
256 //    mfspr      SprMFSPR
257 //    mfsr       SprMFSR
258 //    mfsrin     SprMFSR
259 //    mftb       SprMFTB
260 //    mfvscr     IntMFVSCR
261 //    mtcrf      BrMCRX
262 //    mtfsb0     IntMTFSB0
263 //    mtfsb1     IntMTFSB0
264 //    mtfsf      IntMTFSB0
265 //    mtfsfi     IntMTFSB0
266 //    mtmsr      SprMTMSR
267 //    mtmsrd     LdStLD
268 //    mtspr      SprMTSPR
269 //    mtsr       SprMTSR
270 //    mtsrd      IntMTSRD
271 //    mtsrdin    IntMTSRD
272 //    mtsrin     SprMTSRIN
273 //    mtvscr     IntMFVSCR
274 //    mulhd      IntMulHD
275 //    mulhdu     IntMulHD
276 //    mulhw      IntMulHW
277 //    mulhwu     IntMulHWU
278 //    mulld      IntMulHD
279 //    mulli      IntMulLI
280 //    mullw      IntMulHW
281 //    nand       IntGeneral
282 //    neg        IntGeneral
283 //    nor        IntGeneral
284 //    or         IntGeneral
285 //    orc        IntGeneral
286 //    ori        IntGeneral
287 //    oris       IntGeneral
288 //    rfi        SprRFI
289 //    rfid       IntRFID
290 //    rldcl      IntRotateD
291 //    rldcr      IntRotateD
292 //    rldic      IntRotateD
293 //    rldicl     IntRotateD
294 //    rldicr     IntRotateD
295 //    rldimi     IntRotateD
296 //    rlwimi     IntRotate
297 //    rlwinm     IntGeneral
298 //    rlwnm      IntGeneral
299 //    sc         SprSC
300 //    slbia      LdStSLBIA
301 //    slbie      LdStSLBIE
302 //    sld        IntRotateD
303 //    slw        IntGeneral
304 //    srad       IntRotateD
305 //    sradi      IntRotateD
306 //    sraw       IntShift
307 //    srawi      IntShift
308 //    srd        IntRotateD
309 //    srw        IntGeneral
310 //    stb        LdStGeneral
311 //    stbu       LdStGeneral
312 //    stbux      LdStGeneral
313 //    stbx       LdStGeneral
314 //    std        LdStSTD
315 //    stdcx.     LdStSTDCX
316 //    stdu       LdStSTD
317 //    stdux      LdStSTD
318 //    stdx       LdStSTD
319 //    stfd       LdStUX
320 //    stfdu      LdStUX
321 //    stfdux     LdStUX
322 //    stfdx      LdStUX
323 //    stfiwx     LdStUX
324 //    stfs       LdStUX
325 //    stfsu      LdStUX
326 //    stfsux     LdStUX
327 //    stfsx      LdStUX
328 //    sth        LdStGeneral
329 //    sthbrx     LdStGeneral
330 //    sthu       LdStGeneral
331 //    sthux      LdStGeneral
332 //    sthx       LdStGeneral
333 //    stmw       LdStLMW
334 //    stswi      LdStLMW
335 //    stswx      LdStLMW
336 //    stvebx     LdStSTVEBX
337 //    stvehx     LdStSTVEBX
338 //    stvewx     LdStSTVEBX
339 //    stvx       LdStSTVEBX
340 //    stvxl      LdStSTVEBX
341 //    stw        LdStGeneral
342 //    stwbrx     LdStGeneral
343 //    stwcx.     LdStSTWCX
344 //    stwu       LdStGeneral
345 //    stwux      LdStGeneral
346 //    stwx       LdStGeneral
347 //    subf       IntGeneral
348 //    subfc      IntGeneral
349 //    subfe      IntGeneral
350 //    subfic     IntGeneral
351 //    subfme     IntGeneral
352 //    subfze     IntGeneral
353 //    sync       LdStSync
354 //    td         IntTrapD
355 //    tdi        IntTrapD
356 //    tlbia      LdStSLBIA
357 //    tlbie      LdStDCBF
358 //    tlbsync    SprTLBSYNC
359 //    tw         IntTrapW
360 //    twi        IntTrapW
361 //    vaddcuw    VecGeneral
362 //    vaddfp     VecFP
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
372 //    vand       VecGeneral
373 //    vandc      VecGeneral
374 //    vavgsb     VecGeneral
375 //    vavgsh     VecGeneral
376 //    vavgsw     VecGeneral
377 //    vavgub     VecGeneral
378 //    vavguh     VecGeneral
379 //    vavguw     VecGeneral
380 //    vcfsx      VecFP
381 //    vcfux      VecFP
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
395 //    vctsxs     VecFP
396 //    vctuxs     VecFP
397 //    vexptefp   VecFP
398 //    vlogefp    VecFP
399 //    vmaddfp    VecFP
400 //    vmaxfp     VecFPCompare
401 //    vmaxsb     VecGeneral
402 //    vmaxsh     VecGeneral
403 //    vmaxsw     VecGeneral
404 //    vmaxub     VecGeneral
405 //    vmaxuh     VecGeneral
406 //    vmaxuw     VecGeneral
407 //    vmhaddshs  VecComplex
408 //    vmhraddshs VecComplex
409 //    vminfp     VecFPCompare
410 //    vminsb     VecGeneral
411 //    vminsh     VecGeneral
412 //    vminsw     VecGeneral
413 //    vminub     VecGeneral
414 //    vminuh     VecGeneral
415 //    vminuw     VecGeneral
416 //    vmladduhm  VecComplex
417 //    vmrghb     VecPerm
418 //    vmrghh     VecPerm
419 //    vmrghw     VecPerm
420 //    vmrglb     VecPerm
421 //    vmrglh     VecPerm
422 //    vmrglw     VecPerm
423 //    vmsubfp    VecFP
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
438 //    vnor       VecGeneral
439 //    vor        VecGeneral
440 //    vperm      VecPerm
441 //    vpkpx      VecPerm
442 //    vpkshss    VecPerm
443 //    vpkshus    VecPerm
444 //    vpkswss    VecPerm
445 //    vpkswus    VecPerm
446 //    vpkuhum    VecPerm
447 //    vpkuhus    VecPerm
448 //    vpkuwum    VecPerm
449 //    vpkuwus    VecPerm
450 //    vrefp      VecFPRound
451 //    vrfim      VecFPRound
452 //    vrfin      VecFPRound
453 //    vrfip      VecFPRound
454 //    vrfiz      VecFPRound
455 //    vrlb       VecGeneral
456 //    vrlh       VecGeneral
457 //    vrlw       VecGeneral
458 //    vrsqrtefp  VecFP
459 //    vsel       VecGeneral
460 //    vsl        VecVSL
461 //    vslb       VecGeneral
462 //    vsldoi     VecPerm
463 //    vslh       VecGeneral
464 //    vslo       VecPerm
465 //    vslw       VecGeneral
466 //    vspltb     VecPerm
467 //    vsplth     VecPerm
468 //    vspltisb   VecPerm
469 //    vspltish   VecPerm
470 //    vspltisw   VecPerm
471 //    vspltw     VecPerm
472 //    vsr        VecVSR
473 //    vsrab      VecGeneral
474 //    vsrah      VecGeneral
475 //    vsraw      VecGeneral
476 //    vsrb       VecGeneral
477 //    vsrh       VecGeneral
478 //    vsro       VecPerm
479 //    vsrw       VecGeneral
480 //    vsubcuw    VecGeneral
481 //    vsubfp     VecFP
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
496 //    vupkhpx    VecPerm
497 //    vupkhsb    VecPerm
498 //    vupkhsh    VecPerm
499 //    vupklpx    VecPerm
500 //    vupklsb    VecPerm
501 //    vupklsh    VecPerm
502 //    vxor       VecGeneral
503 //    xor        IntGeneral
504 //    xori       IntGeneral
505 //    xoris      IntGeneral
506 //