mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-16 16:37:42 +00:00
X86: Add target description for btver2; make autodetection logic aware of AVX.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181005 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
555e8f606f
commit
b9548d8ee3
@ -355,10 +355,15 @@ std::string sys::getHostCPUName() {
|
||||
case 20:
|
||||
return "btver1";
|
||||
case 21:
|
||||
if (Model <= 15)
|
||||
return "bdver1";
|
||||
else if (Model <= 31)
|
||||
if (!HasAVX) // If the OS doesn't support AVX provide a sane fallback.
|
||||
return "btver1";
|
||||
if (Model > 15 && Model <= 31)
|
||||
return "bdver2";
|
||||
return "bdver1";
|
||||
case 22:
|
||||
if (!HasAVX) // If the OS doesn't support AVX provide a sane fallback.
|
||||
return "btver1";
|
||||
return "btver2";
|
||||
default:
|
||||
return "generic";
|
||||
}
|
||||
|
@ -255,11 +255,16 @@ def : Proc<"amdfam10", [FeatureSSE4A,
|
||||
// Bobcat
|
||||
def : Proc<"btver1", [FeatureSSSE3, FeatureSSE4A, FeatureCMPXCHG16B,
|
||||
FeatureLZCNT, FeaturePOPCNT]>;
|
||||
// Jaguar
|
||||
def : Proc<"btver2", [FeatureAVX, FeatureSSE4A, FeatureCMPXCHG16B,
|
||||
FeatureAES, FeaturePCLMUL, FeatureBMI,
|
||||
FeatureF16C, FeatureMOVBE, FeatureLZCNT,
|
||||
FeaturePOPCNT]>;
|
||||
// Bulldozer
|
||||
def : Proc<"bdver1", [FeatureXOP, FeatureFMA4, FeatureCMPXCHG16B,
|
||||
FeatureAES, FeaturePCLMUL,
|
||||
FeatureLZCNT, FeaturePOPCNT]>;
|
||||
// Enhanced Bulldozer
|
||||
// Piledriver
|
||||
def : Proc<"bdver2", [FeatureXOP, FeatureFMA4, FeatureCMPXCHG16B,
|
||||
FeatureAES, FeaturePCLMUL,
|
||||
FeatureF16C, FeatureLZCNT,
|
||||
|
Loading…
Reference in New Issue
Block a user