@@ -2663,6 +2663,12 @@ class X86TargetInfo : public TargetInfo {
26632663 CK_BDVER4,
26642664 // @}
26652665
2666+ // / \name zen
2667+ // / Zen architecture processors.
2668+ // @{
2669+ CK_ZNVER1,
2670+ // @}
2671+
26662672 // / This specification is deprecated and will be removed in the future.
26672673 // / Users should prefer \see CK_K8.
26682674 // FIXME: Warn on this when the CPU is set to it.
@@ -2744,6 +2750,7 @@ class X86TargetInfo : public TargetInfo {
27442750 .Case (" bdver2" , CK_BDVER2)
27452751 .Case (" bdver3" , CK_BDVER3)
27462752 .Case (" bdver4" , CK_BDVER4)
2753+ .Case (" znver1" , CK_ZNVER1)
27472754 .Case (" x86-64" , CK_x86_64)
27482755 .Case (" geode" , CK_Geode)
27492756 .Default (CK_Generic);
@@ -2943,6 +2950,7 @@ class X86TargetInfo : public TargetInfo {
29432950 case CK_BDVER2:
29442951 case CK_BDVER3:
29452952 case CK_BDVER4:
2953+ case CK_ZNVER1:
29462954 case CK_x86_64:
29472955 return true ;
29482956 }
@@ -3190,6 +3198,33 @@ bool X86TargetInfo::initFeatureMap(
31903198 setFeatureEnabledImpl (Features, " cx16" , true );
31913199 setFeatureEnabledImpl (Features, " fxsr" , true );
31923200 break ;
3201+ case CK_ZNVER1:
3202+ setFeatureEnabledImpl (Features, " adx" , true );
3203+ setFeatureEnabledImpl (Features, " aes" , true );
3204+ setFeatureEnabledImpl (Features, " avx2" , true );
3205+ setFeatureEnabledImpl (Features, " bmi" , true );
3206+ setFeatureEnabledImpl (Features, " bmi2" , true );
3207+ setFeatureEnabledImpl (Features, " clflushopt" , true );
3208+ setFeatureEnabledImpl (Features, " cx16" , true );
3209+ setFeatureEnabledImpl (Features, " f16c" , true );
3210+ setFeatureEnabledImpl (Features, " fma" , true );
3211+ setFeatureEnabledImpl (Features, " fsgsbase" , true );
3212+ setFeatureEnabledImpl (Features, " fxsr" , true );
3213+ setFeatureEnabledImpl (Features, " lzcnt" , true );
3214+ setFeatureEnabledImpl (Features, " mwaitx" , true );
3215+ setFeatureEnabledImpl (Features, " movbe" , true );
3216+ setFeatureEnabledImpl (Features, " pclmul" , true );
3217+ setFeatureEnabledImpl (Features, " popcnt" , true );
3218+ setFeatureEnabledImpl (Features, " prfchw" , true );
3219+ setFeatureEnabledImpl (Features, " rdrnd" , true );
3220+ setFeatureEnabledImpl (Features, " rdseed" , true );
3221+ setFeatureEnabledImpl (Features, " sha" , true );
3222+ setFeatureEnabledImpl (Features, " sse4a" , true );
3223+ setFeatureEnabledImpl (Features, " xsave" , true );
3224+ setFeatureEnabledImpl (Features, " xsavec" , true );
3225+ setFeatureEnabledImpl (Features, " xsaveopt" , true );
3226+ setFeatureEnabledImpl (Features, " xsaves" , true );
3227+ break ;
31933228 case CK_BDVER4:
31943229 setFeatureEnabledImpl (Features, " avx2" , true );
31953230 setFeatureEnabledImpl (Features, " bmi2" , true );
@@ -3741,6 +3776,9 @@ void X86TargetInfo::getTargetDefines(const LangOptions &Opts,
37413776 case CK_BDVER4:
37423777 defineCPUMacros (Builder, " bdver4" );
37433778 break ;
3779+ case CK_ZNVER1:
3780+ defineCPUMacros (Builder, " znver1" );
3781+ break ;
37443782 case CK_Geode:
37453783 defineCPUMacros (Builder, " geode" );
37463784 break ;
0 commit comments