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