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