diff options
Diffstat (limited to 'clang/lib')
-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__"); |