diff options
author | Andrey Turetskiy <andrey.turetskiy@gmail.com> | 2016-04-05 15:04:26 +0000 |
---|---|---|
committer | Andrey Turetskiy <andrey.turetskiy@gmail.com> | 2016-04-05 15:04:26 +0000 |
commit | fd259ff9c49e72eb1f4624371e600a3939a45092 (patch) | |
tree | e291e6934b51b20483d5309baa8aaed46ffa689e /clang/lib/Basic/Targets.cpp | |
parent | 0f7ccc3d925bc57803f6e559a6d3eac044f7c561 (diff) | |
download | bcm5719-llvm-fd259ff9c49e72eb1f4624371e600a3939a45092.tar.gz bcm5719-llvm-fd259ff9c49e72eb1f4624371e600a3939a45092.zip |
[X86] Introduction of -march=lakemont.
Differential Revision: http://reviews.llvm.org/D18651
llvm-svn: 265405
Diffstat (limited to 'clang/lib/Basic/Targets.cpp')
-rw-r--r-- | clang/lib/Basic/Targets.cpp | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/clang/lib/Basic/Targets.cpp b/clang/lib/Basic/Targets.cpp index 70db97d7fb8..51ebd81871d 100644 --- a/clang/lib/Basic/Targets.cpp +++ b/clang/lib/Basic/Targets.cpp @@ -2239,6 +2239,10 @@ class X86TargetInfo : public TargetInfo { /// Knights Landing processor. CK_KNL, + /// \name Lakemont + /// Lakemont microarchitecture based processors. + CK_Lakemont, + /// \name K6 /// K6 architecture processors. //@{ @@ -2343,6 +2347,7 @@ class X86TargetInfo : public TargetInfo { .Case("skx", CK_SkylakeServer) // Legacy name. .Case("cannonlake", CK_Cannonlake) .Case("knl", CK_KNL) + .Case("lakemont", CK_Lakemont) .Case("k6", CK_K6) .Case("k6-2", CK_K6_2) .Case("k6-3", CK_K6_3) @@ -2490,6 +2495,7 @@ public: case CK_C3_2: case CK_Pentium4: case CK_Pentium4M: + case CK_Lakemont: case CK_Prescott: case CK_K6: case CK_K6_2: @@ -2588,10 +2594,13 @@ bool X86TargetInfo::initFeatureMap( if (getTriple().getArch() == llvm::Triple::x86_64) setFeatureEnabledImpl(Features, "sse2", true); - // Enable X87 for all X86 processors. - setFeatureEnabledImpl(Features, "x87", true); + const CPUKind Kind = getCPUKind(CPU); + + // Enable X87 for all X86 processors but Lakemont. + if (Kind != CK_Lakemont) + setFeatureEnabledImpl(Features, "x87", true); - switch (getCPUKind(CPU)) { + switch (Kind) { case CK_Generic: case CK_i386: case CK_i486: @@ -2599,6 +2608,7 @@ bool X86TargetInfo::initFeatureMap( case CK_Pentium: case CK_i686: case CK_PentiumPro: + case CK_Lakemont: break; case CK_PentiumMMX: case CK_Pentium2: @@ -3253,6 +3263,9 @@ void X86TargetInfo::getTargetDefines(const LangOptions &Opts, case CK_KNL: defineCPUMacros(Builder, "knl"); break; + case CK_Lakemont: + Builder.defineMacro("__tune_lakemont__"); + break; case CK_K6_2: Builder.defineMacro("__k6_2__"); Builder.defineMacro("__tune_k6_2__"); |