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