@@ -353,6 +353,43 @@ def FeaturePredictableSelectIsExpensive :
353353def FeatureFastMFLR : SubtargetFeature<"fast-MFLR", "HasFastMFLR", "true",
354354 "MFLR is a fast instruction">;
355355
356+ //===----------------------------------------------------------------------===//
357+ // PowerPC Instruction Predicate Definitions.
358+ def In32BitMode : Predicate<"!Subtarget->isPPC64()">;
359+ def In64BitMode : Predicate<"Subtarget->isPPC64()">;
360+ def IsBookE : Predicate<"Subtarget->isBookE()">;
361+ def IsNotBookE : Predicate<"!Subtarget->isBookE()">;
362+ def HasOnlyMSYNC : Predicate<"Subtarget->hasOnlyMSYNC()">;
363+ def HasSYNC : Predicate<"!Subtarget->hasOnlyMSYNC()">;
364+ def IsPPC4xx : Predicate<"Subtarget->isPPC4xx()">;
365+ def IsPPC6xx : Predicate<"Subtarget->isPPC6xx()">;
366+ def IsE500 : Predicate<"Subtarget->isE500()">;
367+ def HasSPE : Predicate<"Subtarget->hasSPE()">;
368+ def HasICBT : Predicate<"Subtarget->hasICBT()">;
369+ def HasPartwordAtomics : Predicate<"Subtarget->hasPartwordAtomics()">;
370+ def HasQuadwordAtomics : Predicate<"Subtarget->hasQuadwordAtomics()">;
371+ def NoNaNsFPMath
372+ : Predicate<"Subtarget->getTargetMachine().Options.NoNaNsFPMath">;
373+ def NaNsFPMath
374+ : Predicate<"!Subtarget->getTargetMachine().Options.NoNaNsFPMath">;
375+ def HasBPERMD : Predicate<"Subtarget->hasBPERMD()">;
376+ def HasExtDiv : Predicate<"Subtarget->hasExtDiv()">;
377+ def IsISA2_06 : Predicate<"Subtarget->isISA2_06()">;
378+ def IsISA2_07 : Predicate<"Subtarget->isISA2_07()">;
379+ def IsISA3_0 : Predicate<"Subtarget->isISA3_0()">;
380+ def HasFPU : Predicate<"Subtarget->hasFPU()">;
381+ def PCRelativeMemops : Predicate<"Subtarget->hasPCRelativeMemops()">;
382+ def IsNotISA3_1 : Predicate<"!Subtarget->isISA3_1()">;
383+
384+ // AIX assembler may not be modern enough to support some extended mne.
385+ def ModernAs: Predicate<"!Subtarget->isAIXABI() || Subtarget->HasModernAIXAs">,
386+ AssemblerPredicate<(any_of (not AIXOS), FeatureModernAIXAs)>;
387+ def IsAIX : Predicate<"Subtarget->isAIXABI()">;
388+ def NotAIX : Predicate<"!Subtarget->isAIXABI()">;
389+ def IsISAFuture : Predicate<"Subtarget->isISAFuture()">;
390+ def IsNotISAFuture : Predicate<"!Subtarget->isISAFuture()">;
391+
392+
356393// Since new processors generally contain a superset of features of those that
357394// came before them, the idea is to make implementations of new processors
358395// less error prone and easier to read.
0 commit comments