[PATCH] D28018: AMD family 17h (znver1) enablement
Ganesh Gopalasubramanian via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Jan 8 08:40:02 PST 2017
GGanesh removed rL LLVM as the repository for this revision.
GGanesh updated this revision to Diff 83566.
GGanesh added a comment.
The clzero builtins and feature addition will be handled separately in another patch.
SSE4a and movbe are added to the ISA list.
https://reviews.llvm.org/D28018
Files:
lib/Basic/Targets.cpp
Index: lib/Basic/Targets.cpp
===================================================================
--- lib/Basic/Targets.cpp
+++ lib/Basic/Targets.cpp
@@ -2651,6 +2651,12 @@
CK_BDVER4,
//@}
+ /// \name zen
+ /// Zen architecture processors.
+ //@{
+ CK_ZNVER1,
+ //@}
+
/// This specification is deprecated and will be removed in the future.
/// Users should prefer \see CK_K8.
// FIXME: Warn on this when the CPU is set to it.
@@ -2732,6 +2738,7 @@
.Case("bdver2", CK_BDVER2)
.Case("bdver3", CK_BDVER3)
.Case("bdver4", CK_BDVER4)
+ .Case("znver1", CK_ZNVER1)
.Case("x86-64", CK_x86_64)
.Case("geode", CK_Geode)
.Default(CK_Generic);
@@ -2931,6 +2938,7 @@
case CK_BDVER2:
case CK_BDVER3:
case CK_BDVER4:
+ case CK_ZNVER1:
case CK_x86_64:
return true;
}
@@ -3178,6 +3186,33 @@
setFeatureEnabledImpl(Features, "cx16", true);
setFeatureEnabledImpl(Features, "fxsr", true);
break;
+ case CK_ZNVER1:
+ setFeatureEnabledImpl(Features, "adx", true);
+ setFeatureEnabledImpl(Features, "aes", true);
+ setFeatureEnabledImpl(Features, "avx2", true);
+ setFeatureEnabledImpl(Features, "bmi", true);
+ setFeatureEnabledImpl(Features, "bmi2", true);
+ setFeatureEnabledImpl(Features, "clflushopt", true);
+ setFeatureEnabledImpl(Features, "cx16", true);
+ setFeatureEnabledImpl(Features, "f16c", true);
+ setFeatureEnabledImpl(Features, "fma", true);
+ setFeatureEnabledImpl(Features, "fsgsbase", true);
+ setFeatureEnabledImpl(Features, "fxsr", true);
+ setFeatureEnabledImpl(Features, "lzcnt", true);
+ setFeatureEnabledImpl(Features, "mwaitx", true);
+ setFeatureEnabledImpl(Features, "movbe", true);
+ setFeatureEnabledImpl(Features, "pclmul", true);
+ setFeatureEnabledImpl(Features, "popcnt", true);
+ setFeatureEnabledImpl(Features, "prfchw", true);
+ setFeatureEnabledImpl(Features, "rdrnd", true);
+ setFeatureEnabledImpl(Features, "rdseed", true);
+ setFeatureEnabledImpl(Features, "sha", true);
+ setFeatureEnabledImpl(Features, "sse4a", true);
+ setFeatureEnabledImpl(Features, "xsave", true);
+ setFeatureEnabledImpl(Features, "xsavec", true);
+ setFeatureEnabledImpl(Features, "xsaveopt", true);
+ setFeatureEnabledImpl(Features, "xsaves", true);
+ break;
case CK_BDVER4:
setFeatureEnabledImpl(Features, "avx2", true);
setFeatureEnabledImpl(Features, "bmi2", true);
@@ -3729,6 +3764,9 @@
case CK_BDVER4:
defineCPUMacros(Builder, "bdver4");
break;
+ case CK_ZNVER1:
+ defineCPUMacros(Builder, "znver1");
+ break;
case CK_Geode:
defineCPUMacros(Builder, "geode");
break;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28018.83566.patch
Type: text/x-patch
Size: 2746 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170108/ba567a49/attachment.bin>
More information about the cfe-commits
mailing list