1//===-- PPC.td - Describe the PowerPC Target Machine -------*- 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// This is the top level entry point for the PowerPC target. 11// 12//===----------------------------------------------------------------------===// 13 14// Get the target-independent interfaces which we are implementing. 15// 16include "llvm/Target/Target.td" 17 18//===----------------------------------------------------------------------===// 19// PowerPC Subtarget features. 20// 21 22//===----------------------------------------------------------------------===// 23// CPU Directives // 24//===----------------------------------------------------------------------===// 25 26def Directive440 : SubtargetFeature<"", "DarwinDirective", "PPC::DIR_440", "">; 27def Directive601 : SubtargetFeature<"", "DarwinDirective", "PPC::DIR_601", "">; 28def Directive602 : SubtargetFeature<"", "DarwinDirective", "PPC::DIR_602", "">; 29def Directive603 : SubtargetFeature<"", "DarwinDirective", "PPC::DIR_603", "">; 30def Directive604 : SubtargetFeature<"", "DarwinDirective", "PPC::DIR_603", "">; 31def Directive620 : SubtargetFeature<"", "DarwinDirective", "PPC::DIR_603", "">; 32def Directive7400: SubtargetFeature<"", "DarwinDirective", "PPC::DIR_7400", "">; 33def Directive750 : SubtargetFeature<"", "DarwinDirective", "PPC::DIR_750", "">; 34def Directive970 : SubtargetFeature<"", "DarwinDirective", "PPC::DIR_970", "">; 35def Directive32 : SubtargetFeature<"", "DarwinDirective", "PPC::DIR_32", "">; 36def Directive64 : SubtargetFeature<"", "DarwinDirective", "PPC::DIR_64", "">; 37def DirectiveA2 : SubtargetFeature<"", "DarwinDirective", "PPC::DIR_A2", "">; 38def DirectiveE500mc : SubtargetFeature<"", "DarwinDirective", 39 "PPC::DIR_E500mc", "">; 40def DirectiveE5500 : SubtargetFeature<"", "DarwinDirective", 41 "PPC::DIR_E5500", "">; 42def DirectivePwr3: SubtargetFeature<"", "DarwinDirective", "PPC::DIR_PWR3", "">; 43def DirectivePwr4: SubtargetFeature<"", "DarwinDirective", "PPC::DIR_PWR4", "">; 44def DirectivePwr5: SubtargetFeature<"", "DarwinDirective", "PPC::DIR_PWR5", "">; 45def DirectivePwr5x 46 : SubtargetFeature<"", "DarwinDirective", "PPC::DIR_PWR5X", "">; 47def DirectivePwr6: SubtargetFeature<"", "DarwinDirective", "PPC::DIR_PWR6", "">; 48def DirectivePwr6x 49 : SubtargetFeature<"", "DarwinDirective", "PPC::DIR_PWR6X", "">; 50def DirectivePwr7: SubtargetFeature<"", "DarwinDirective", "PPC::DIR_PWR7", "">; 51def DirectivePwr8: SubtargetFeature<"", "DarwinDirective", "PPC::DIR_PWR8", "">; 52def DirectivePwr9: SubtargetFeature<"", "DarwinDirective", "PPC::DIR_PWR9", "">; 53 54def Feature64Bit : SubtargetFeature<"64bit","Has64BitSupport", "true", 55 "Enable 64-bit instructions">; 56def FeatureHardFloat : SubtargetFeature<"hard-float", "HasHardFloat", "true", 57 "Enable floating-point instructions">; 58def Feature64BitRegs : SubtargetFeature<"64bitregs","Use64BitRegs", "true", 59 "Enable 64-bit registers usage for ppc32 [beta]">; 60def FeatureCRBits : SubtargetFeature<"crbits", "UseCRBits", "true", 61 "Use condition-register bits individually">; 62def FeatureAltivec : SubtargetFeature<"altivec","HasAltivec", "true", 63 "Enable Altivec instructions", 64 [FeatureHardFloat]>; 65def FeatureSPE : SubtargetFeature<"spe","HasSPE", "true", 66 "Enable SPE instructions", 67 [FeatureHardFloat]>; 68def FeatureMFOCRF : SubtargetFeature<"mfocrf","HasMFOCRF", "true", 69 "Enable the MFOCRF instruction">; 70def FeatureFSqrt : SubtargetFeature<"fsqrt","HasFSQRT", "true", 71 "Enable the fsqrt instruction", 72 [FeatureHardFloat]>; 73def FeatureFCPSGN : SubtargetFeature<"fcpsgn", "HasFCPSGN", "true", 74 "Enable the fcpsgn instruction", 75 [FeatureHardFloat]>; 76def FeatureFRE : SubtargetFeature<"fre", "HasFRE", "true", 77 "Enable the fre instruction", 78 [FeatureHardFloat]>; 79def FeatureFRES : SubtargetFeature<"fres", "HasFRES", "true", 80 "Enable the fres instruction", 81 [FeatureHardFloat]>; 82def FeatureFRSQRTE : SubtargetFeature<"frsqrte", "HasFRSQRTE", "true", 83 "Enable the frsqrte instruction", 84 [FeatureHardFloat]>; 85def FeatureFRSQRTES : SubtargetFeature<"frsqrtes", "HasFRSQRTES", "true", 86 "Enable the frsqrtes instruction", 87 [FeatureHardFloat]>; 88def FeatureRecipPrec : SubtargetFeature<"recipprec", "HasRecipPrec", "true", 89 "Assume higher precision reciprocal estimates">; 90def FeatureSTFIWX : SubtargetFeature<"stfiwx","HasSTFIWX", "true", 91 "Enable the stfiwx instruction", 92 [FeatureHardFloat]>; 93def FeatureLFIWAX : SubtargetFeature<"lfiwax","HasLFIWAX", "true", 94 "Enable the lfiwax instruction", 95 [FeatureHardFloat]>; 96def FeatureFPRND : SubtargetFeature<"fprnd", "HasFPRND", "true", 97 "Enable the fri[mnpz] instructions", 98 [FeatureHardFloat]>; 99def FeatureFPCVT : SubtargetFeature<"fpcvt", "HasFPCVT", "true", 100 "Enable fc[ft]* (unsigned and single-precision) and lfiwzx instructions", 101 [FeatureHardFloat]>; 102def FeatureISEL : SubtargetFeature<"isel","HasISEL", "true", 103 "Enable the isel instruction">; 104def FeatureBPERMD : SubtargetFeature<"bpermd", "HasBPERMD", "true", 105 "Enable the bpermd instruction">; 106def FeatureExtDiv : SubtargetFeature<"extdiv", "HasExtDiv", "true", 107 "Enable extended divide instructions">; 108def FeatureLDBRX : SubtargetFeature<"ldbrx","HasLDBRX", "true", 109 "Enable the ldbrx instruction">; 110def FeatureCMPB : SubtargetFeature<"cmpb", "HasCMPB", "true", 111 "Enable the cmpb instruction">; 112def FeatureICBT : SubtargetFeature<"icbt","HasICBT", "true", 113 "Enable icbt instruction">; 114def FeatureBookE : SubtargetFeature<"booke", "IsBookE", "true", 115 "Enable Book E instructions", 116 [FeatureICBT]>; 117def FeatureMSYNC : SubtargetFeature<"msync", "HasOnlyMSYNC", "true", 118 "Has only the msync instruction instead of sync", 119 [FeatureBookE]>; 120def FeatureE500 : SubtargetFeature<"e500", "IsE500", "true", 121 "Enable E500/E500mc instructions">; 122def FeaturePPC4xx : SubtargetFeature<"ppc4xx", "IsPPC4xx", "true", 123 "Enable PPC 4xx instructions">; 124def FeaturePPC6xx : SubtargetFeature<"ppc6xx", "IsPPC6xx", "true", 125 "Enable PPC 6xx instructions">; 126def FeatureQPX : SubtargetFeature<"qpx","HasQPX", "true", 127 "Enable QPX instructions", 128 [FeatureHardFloat]>; 129def FeatureVSX : SubtargetFeature<"vsx","HasVSX", "true", 130 "Enable VSX instructions", 131 [FeatureAltivec]>; 132def FeatureP8Altivec : SubtargetFeature<"power8-altivec", "HasP8Altivec", "true", 133 "Enable POWER8 Altivec instructions", 134 [FeatureAltivec]>; 135def FeatureP8Crypto : SubtargetFeature<"crypto", "HasP8Crypto", "true", 136 "Enable POWER8 Crypto instructions", 137 [FeatureP8Altivec]>; 138def FeatureP8Vector : SubtargetFeature<"power8-vector", "HasP8Vector", "true", 139 "Enable POWER8 vector instructions", 140 [FeatureVSX, FeatureP8Altivec]>; 141def FeatureDirectMove : 142 SubtargetFeature<"direct-move", "HasDirectMove", "true", 143 "Enable Power8 direct move instructions", 144 [FeatureVSX]>; 145def FeaturePartwordAtomic : SubtargetFeature<"partword-atomics", 146 "HasPartwordAtomics", "true", 147 "Enable l[bh]arx and st[bh]cx.">; 148def FeatureInvariantFunctionDescriptors : 149 SubtargetFeature<"invariant-function-descriptors", 150 "HasInvariantFunctionDescriptors", "true", 151 "Assume function descriptors are invariant">; 152def FeatureLongCall : SubtargetFeature<"longcall", "UseLongCalls", "true", 153 "Always use indirect calls">; 154def FeatureHTM : SubtargetFeature<"htm", "HasHTM", "true", 155 "Enable Hardware Transactional Memory instructions">; 156def FeatureMFTB : SubtargetFeature<"", "FeatureMFTB", "true", 157 "Implement mftb using the mfspr instruction">; 158def FeatureFusion : SubtargetFeature<"fusion", "HasFusion", "true", 159 "Target supports add/load integer fusion.">; 160def FeatureFloat128 : 161 SubtargetFeature<"float128", "HasFloat128", "true", 162 "Enable the __float128 data type for IEEE-754R Binary128.", 163 [FeatureVSX]>; 164def FeaturePOPCNTD : SubtargetFeature<"popcntd","HasPOPCNTD", 165 "POPCNTD_Fast", 166 "Enable the popcnt[dw] instructions">; 167// Note that for the a2/a2q processor models we should not use popcnt[dw] by 168// default. These processors do support the instructions, but they're 169// microcoded, and the software emulation is about twice as fast. 170def FeatureSlowPOPCNTD : SubtargetFeature<"slow-popcntd","HasPOPCNTD", 171 "POPCNTD_Slow", 172 "Has slow popcnt[dw] instructions">; 173 174def DeprecatedDST : SubtargetFeature<"", "DeprecatedDST", "true", 175 "Treat vector data stream cache control instructions as deprecated">; 176 177def FeatureISA3_0 : SubtargetFeature<"isa-v30-instructions", "IsISA3_0", 178 "true", 179 "Enable instructions added in ISA 3.0.">; 180def FeatureP9Altivec : SubtargetFeature<"power9-altivec", "HasP9Altivec", "true", 181 "Enable POWER9 Altivec instructions", 182 [FeatureISA3_0, FeatureP8Altivec]>; 183def FeatureP9Vector : SubtargetFeature<"power9-vector", "HasP9Vector", "true", 184 "Enable POWER9 vector instructions", 185 [FeatureISA3_0, FeatureP8Vector, 186 FeatureP9Altivec]>; 187 188// Since new processors generally contain a superset of features of those that 189// came before them, the idea is to make implementations of new processors 190// less error prone and easier to read. 191// Namely: 192// list<SubtargetFeature> Power8FeatureList = ... 193// list<SubtargetFeature> FutureProcessorSpecificFeatureList = 194// [ features that Power8 does not support ] 195// list<SubtargetFeature> FutureProcessorFeatureList = 196// !listconcat(Power8FeatureList, FutureProcessorSpecificFeatureList) 197 198// Makes it explicit and obvious what is new in FutureProcesor vs. Power8 as 199// well as providing a single point of definition if the feature set will be 200// used elsewhere. 201def ProcessorFeatures { 202 list<SubtargetFeature> Power7FeatureList = 203 [DirectivePwr7, FeatureAltivec, FeatureVSX, 204 FeatureMFOCRF, FeatureFCPSGN, FeatureFSqrt, FeatureFRE, 205 FeatureFRES, FeatureFRSQRTE, FeatureFRSQRTES, 206 FeatureRecipPrec, FeatureSTFIWX, FeatureLFIWAX, 207 FeatureFPRND, FeatureFPCVT, FeatureISEL, 208 FeaturePOPCNTD, FeatureCMPB, FeatureLDBRX, 209 Feature64Bit /*, Feature64BitRegs */, 210 FeatureBPERMD, FeatureExtDiv, 211 FeatureMFTB, DeprecatedDST]; 212 list<SubtargetFeature> Power8SpecificFeatures = 213 [DirectivePwr8, FeatureP8Altivec, FeatureP8Vector, FeatureP8Crypto, 214 FeatureHTM, FeatureDirectMove, FeatureICBT, FeaturePartwordAtomic, 215 FeatureFusion]; 216 list<SubtargetFeature> Power8FeatureList = 217 !listconcat(Power7FeatureList, Power8SpecificFeatures); 218 list<SubtargetFeature> Power9SpecificFeatures = 219 [DirectivePwr9, FeatureP9Altivec, FeatureP9Vector, FeatureISA3_0]; 220 list<SubtargetFeature> Power9FeatureList = 221 !listconcat(Power8FeatureList, Power9SpecificFeatures); 222} 223 224// Note: Future features to add when support is extended to more 225// recent ISA levels: 226// 227// DFP p6, p6x, p7 decimal floating-point instructions 228// POPCNTB p5 through p7 popcntb and related instructions 229 230//===----------------------------------------------------------------------===// 231// Classes used for relation maps. 232//===----------------------------------------------------------------------===// 233// RecFormRel - Filter class used to relate non-record-form instructions with 234// their record-form variants. 235class RecFormRel; 236 237// AltVSXFMARel - Filter class used to relate the primary addend-killing VSX 238// FMA instruction forms with their corresponding factor-killing forms. 239class AltVSXFMARel { 240 bit IsVSXFMAAlt = 0; 241} 242 243//===----------------------------------------------------------------------===// 244// Relation Map Definitions. 245//===----------------------------------------------------------------------===// 246 247def getRecordFormOpcode : InstrMapping { 248 let FilterClass = "RecFormRel"; 249 // Instructions with the same BaseName and Interpretation64Bit values 250 // form a row. 251 let RowFields = ["BaseName", "Interpretation64Bit"]; 252 // Instructions with the same RC value form a column. 253 let ColFields = ["RC"]; 254 // The key column are the non-record-form instructions. 255 let KeyCol = ["0"]; 256 // Value columns RC=1 257 let ValueCols = [["1"]]; 258} 259 260def getNonRecordFormOpcode : InstrMapping { 261 let FilterClass = "RecFormRel"; 262 // Instructions with the same BaseName and Interpretation64Bit values 263 // form a row. 264 let RowFields = ["BaseName", "Interpretation64Bit"]; 265 // Instructions with the same RC value form a column. 266 let ColFields = ["RC"]; 267 // The key column are the record-form instructions. 268 let KeyCol = ["1"]; 269 // Value columns are RC=0 270 let ValueCols = [["0"]]; 271} 272 273def getAltVSXFMAOpcode : InstrMapping { 274 let FilterClass = "AltVSXFMARel"; 275 // Instructions with the same BaseName and Interpretation64Bit values 276 // form a row. 277 let RowFields = ["BaseName"]; 278 // Instructions with the same RC value form a column. 279 let ColFields = ["IsVSXFMAAlt"]; 280 // The key column are the (default) addend-killing instructions. 281 let KeyCol = ["0"]; 282 // Value columns IsVSXFMAAlt=1 283 let ValueCols = [["1"]]; 284} 285 286//===----------------------------------------------------------------------===// 287// Register File Description 288//===----------------------------------------------------------------------===// 289 290include "PPCRegisterInfo.td" 291include "PPCSchedule.td" 292include "PPCInstrInfo.td" 293 294//===----------------------------------------------------------------------===// 295// PowerPC processors supported. 296// 297 298def : Processor<"generic", G3Itineraries, [Directive32, FeatureHardFloat, 299 FeatureMFTB]>; 300def : ProcessorModel<"440", PPC440Model, [Directive440, FeatureISEL, 301 FeatureFRES, FeatureFRSQRTE, 302 FeatureICBT, FeatureBookE, 303 FeatureMSYNC, FeatureMFTB]>; 304def : ProcessorModel<"450", PPC440Model, [Directive440, FeatureISEL, 305 FeatureFRES, FeatureFRSQRTE, 306 FeatureICBT, FeatureBookE, 307 FeatureMSYNC, FeatureMFTB]>; 308def : Processor<"601", G3Itineraries, [Directive601, FeatureHardFloat]>; 309def : Processor<"602", G3Itineraries, [Directive602, FeatureHardFloat, 310 FeatureMFTB]>; 311def : Processor<"603", G3Itineraries, [Directive603, 312 FeatureFRES, FeatureFRSQRTE, 313 FeatureMFTB]>; 314def : Processor<"603e", G3Itineraries, [Directive603, 315 FeatureFRES, FeatureFRSQRTE, 316 FeatureMFTB]>; 317def : Processor<"603ev", G3Itineraries, [Directive603, 318 FeatureFRES, FeatureFRSQRTE, 319 FeatureMFTB]>; 320def : Processor<"604", G3Itineraries, [Directive604, 321 FeatureFRES, FeatureFRSQRTE, 322 FeatureMFTB]>; 323def : Processor<"604e", G3Itineraries, [Directive604, 324 FeatureFRES, FeatureFRSQRTE, 325 FeatureMFTB]>; 326def : Processor<"620", G3Itineraries, [Directive620, 327 FeatureFRES, FeatureFRSQRTE, 328 FeatureMFTB]>; 329def : Processor<"750", G4Itineraries, [Directive750, 330 FeatureFRES, FeatureFRSQRTE, 331 FeatureMFTB]>; 332def : Processor<"g3", G3Itineraries, [Directive750, 333 FeatureFRES, FeatureFRSQRTE, 334 FeatureMFTB]>; 335def : Processor<"7400", G4Itineraries, [Directive7400, FeatureAltivec, 336 FeatureFRES, FeatureFRSQRTE, 337 FeatureMFTB]>; 338def : Processor<"g4", G4Itineraries, [Directive7400, FeatureAltivec, 339 FeatureFRES, FeatureFRSQRTE, 340 FeatureMFTB]>; 341def : Processor<"7450", G4PlusItineraries, [Directive7400, FeatureAltivec, 342 FeatureFRES, FeatureFRSQRTE, 343 FeatureMFTB]>; 344def : Processor<"g4+", G4PlusItineraries, [Directive7400, FeatureAltivec, 345 FeatureFRES, FeatureFRSQRTE, 346 FeatureMFTB]>; 347 348def : ProcessorModel<"970", G5Model, 349 [Directive970, FeatureAltivec, 350 FeatureMFOCRF, FeatureFSqrt, 351 FeatureFRES, FeatureFRSQRTE, FeatureSTFIWX, 352 Feature64Bit /*, Feature64BitRegs */, 353 FeatureMFTB]>; 354def : ProcessorModel<"g5", G5Model, 355 [Directive970, FeatureAltivec, 356 FeatureMFOCRF, FeatureFSqrt, FeatureSTFIWX, 357 FeatureFRES, FeatureFRSQRTE, 358 Feature64Bit /*, Feature64BitRegs */, 359 FeatureMFTB, DeprecatedDST]>; 360def : ProcessorModel<"e500mc", PPCE500mcModel, 361 [DirectiveE500mc, 362 FeatureSTFIWX, FeatureICBT, FeatureBookE, 363 FeatureISEL, FeatureMFTB]>; 364def : ProcessorModel<"e5500", PPCE5500Model, 365 [DirectiveE5500, FeatureMFOCRF, Feature64Bit, 366 FeatureSTFIWX, FeatureICBT, FeatureBookE, 367 FeatureISEL, FeatureMFTB]>; 368def : ProcessorModel<"a2", PPCA2Model, 369 [DirectiveA2, FeatureICBT, FeatureBookE, FeatureMFOCRF, 370 FeatureFCPSGN, FeatureFSqrt, FeatureFRE, FeatureFRES, 371 FeatureFRSQRTE, FeatureFRSQRTES, FeatureRecipPrec, 372 FeatureSTFIWX, FeatureLFIWAX, 373 FeatureFPRND, FeatureFPCVT, FeatureISEL, 374 FeatureSlowPOPCNTD, FeatureCMPB, FeatureLDBRX, 375 Feature64Bit /*, Feature64BitRegs */, FeatureMFTB]>; 376def : ProcessorModel<"a2q", PPCA2Model, 377 [DirectiveA2, FeatureICBT, FeatureBookE, FeatureMFOCRF, 378 FeatureFCPSGN, FeatureFSqrt, FeatureFRE, FeatureFRES, 379 FeatureFRSQRTE, FeatureFRSQRTES, FeatureRecipPrec, 380 FeatureSTFIWX, FeatureLFIWAX, 381 FeatureFPRND, FeatureFPCVT, FeatureISEL, 382 FeatureSlowPOPCNTD, FeatureCMPB, FeatureLDBRX, 383 Feature64Bit /*, Feature64BitRegs */, FeatureQPX, 384 FeatureMFTB]>; 385def : ProcessorModel<"pwr3", G5Model, 386 [DirectivePwr3, FeatureAltivec, 387 FeatureFRES, FeatureFRSQRTE, FeatureMFOCRF, 388 FeatureSTFIWX, Feature64Bit]>; 389def : ProcessorModel<"pwr4", G5Model, 390 [DirectivePwr4, FeatureAltivec, FeatureMFOCRF, 391 FeatureFSqrt, FeatureFRES, FeatureFRSQRTE, 392 FeatureSTFIWX, Feature64Bit, FeatureMFTB]>; 393def : ProcessorModel<"pwr5", G5Model, 394 [DirectivePwr5, FeatureAltivec, FeatureMFOCRF, 395 FeatureFSqrt, FeatureFRE, FeatureFRES, 396 FeatureFRSQRTE, FeatureFRSQRTES, 397 FeatureSTFIWX, Feature64Bit, 398 FeatureMFTB, DeprecatedDST]>; 399def : ProcessorModel<"pwr5x", G5Model, 400 [DirectivePwr5x, FeatureAltivec, FeatureMFOCRF, 401 FeatureFSqrt, FeatureFRE, FeatureFRES, 402 FeatureFRSQRTE, FeatureFRSQRTES, 403 FeatureSTFIWX, FeatureFPRND, Feature64Bit, 404 FeatureMFTB, DeprecatedDST]>; 405def : ProcessorModel<"pwr6", G5Model, 406 [DirectivePwr6, FeatureAltivec, 407 FeatureMFOCRF, FeatureFCPSGN, FeatureFSqrt, FeatureFRE, 408 FeatureFRES, FeatureFRSQRTE, FeatureFRSQRTES, 409 FeatureRecipPrec, FeatureSTFIWX, FeatureLFIWAX, FeatureCMPB, 410 FeatureFPRND, Feature64Bit /*, Feature64BitRegs */, 411 FeatureMFTB, DeprecatedDST]>; 412def : ProcessorModel<"pwr6x", G5Model, 413 [DirectivePwr5x, FeatureAltivec, FeatureMFOCRF, 414 FeatureFCPSGN, FeatureFSqrt, FeatureFRE, FeatureFRES, 415 FeatureFRSQRTE, FeatureFRSQRTES, FeatureRecipPrec, 416 FeatureSTFIWX, FeatureLFIWAX, FeatureCMPB, 417 FeatureFPRND, Feature64Bit, 418 FeatureMFTB, DeprecatedDST]>; 419def : ProcessorModel<"pwr7", P7Model, ProcessorFeatures.Power7FeatureList>; 420def : ProcessorModel<"pwr8", P8Model, ProcessorFeatures.Power8FeatureList>; 421// FIXME: Same as P8 until the POWER9 scheduling info is available 422def : ProcessorModel<"pwr9", P8Model, ProcessorFeatures.Power9FeatureList>; 423def : Processor<"ppc", G3Itineraries, [Directive32, FeatureHardFloat, 424 FeatureMFTB]>; 425def : Processor<"ppc32", G3Itineraries, [Directive32, FeatureHardFloat, 426 FeatureMFTB]>; 427def : ProcessorModel<"ppc64", G5Model, 428 [Directive64, FeatureAltivec, 429 FeatureMFOCRF, FeatureFSqrt, FeatureFRES, 430 FeatureFRSQRTE, FeatureSTFIWX, 431 Feature64Bit /*, Feature64BitRegs */, 432 FeatureMFTB]>; 433def : ProcessorModel<"ppc64le", P8Model, ProcessorFeatures.Power8FeatureList>; 434 435//===----------------------------------------------------------------------===// 436// Calling Conventions 437//===----------------------------------------------------------------------===// 438 439include "PPCCallingConv.td" 440 441def PPCInstrInfo : InstrInfo { 442 let isLittleEndianEncoding = 1; 443 444 // FIXME: Unset this when no longer needed! 445 let decodePositionallyEncodedOperands = 1; 446 447 let noNamedPositionallyEncodedOperands = 1; 448} 449 450def PPCAsmParser : AsmParser { 451 let ShouldEmitMatchRegisterName = 0; 452} 453 454def PPCAsmParserVariant : AsmParserVariant { 455 int Variant = 0; 456 457 // We do not use hard coded registers in asm strings. However, some 458 // InstAlias definitions use immediate literals. Set RegisterPrefix 459 // so that those are not misinterpreted as registers. 460 string RegisterPrefix = "%"; 461 string BreakCharacters = "."; 462} 463 464def PPC : Target { 465 // Information about the instructions. 466 let InstructionSet = PPCInstrInfo; 467 468 let AssemblyParsers = [PPCAsmParser]; 469 let AssemblyParserVariants = [PPCAsmParserVariant]; 470} 471