[cfe-commits] r145606 - /cfe/trunk/lib/Basic/Targets.cpp
Benjamin Kramer
benny.kra at googlemail.com
Thu Dec 1 10:23:59 PST 2011
Author: d0k
Date: Thu Dec 1 12:23:59 2011
New Revision: 145606
URL: http://llvm.org/viewvc/llvm-project?rev=145606&view=rev
Log:
Add support for AMD's bulldozer.
Modified:
cfe/trunk/lib/Basic/Targets.cpp
Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=145606&r1=145605&r2=145606&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Thu Dec 1 12:23:59 2011
@@ -1288,6 +1288,12 @@
CK_OpteronSSE3,
CK_AMDFAM10,
+ /// \name K10
+ /// K10 architecture processors.
+ //@{
+ CK_BDVER1,
+ CK_BDVER2,
+
/// 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.
@@ -1387,6 +1393,8 @@
.Case("opteron", CK_Opteron)
.Case("opteron-sse3", CK_OpteronSSE3)
.Case("amdfam10", CK_AMDFAM10)
+ .Case("bdver1", CK_BDVER1)
+ .Case("bdver2", CK_BDVER2)
.Case("x86-64", CK_x86_64)
.Case("geode", CK_Geode)
.Default(CK_Generic);
@@ -1448,6 +1456,8 @@
case CK_Opteron:
case CK_OpteronSSE3:
case CK_AMDFAM10:
+ case CK_BDVER1:
+ case CK_BDVER2:
case CK_x86_64:
return true;
}
@@ -1571,6 +1581,12 @@
setFeatureEnabled(Features, "sse4a", true);
setFeatureEnabled(Features, "3dnowa", true);
break;
+ case CK_BDVER1:
+ case CK_BDVER2:
+ setFeatureEnabled(Features, "sse4", true);
+ setFeatureEnabled(Features, "sse4a", true);
+ setFeatureEnabled(Features, "aes", true);
+ break;
case CK_C3_2:
setFeatureEnabled(Features, "mmx", true);
setFeatureEnabled(Features, "sse", true);
@@ -1849,6 +1865,16 @@
Builder.defineMacro("__amdfam10__");
Builder.defineMacro("__tune_amdfam10__");
break;
+ case CK_BDVER1:
+ Builder.defineMacro("__bdver1");
+ Builder.defineMacro("__bdver1__");
+ Builder.defineMacro("__tune__bdver1__");
+ break;
+ case CK_BDVER2:
+ Builder.defineMacro("__bdver2");
+ Builder.defineMacro("__bdver2__");
+ Builder.defineMacro("__tune__bdver2__");
+ break;
case CK_Geode:
Builder.defineMacro("__geode");
Builder.defineMacro("__geode__");
More information about the cfe-commits
mailing list