From 53bf4f94185dbd1144724cdd5101d2163890b049 Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Wed, 28 Sep 2011 09:54:11 +0000 Subject: [PATCH] Fix a think-o on my part that got enshrined in a FIXME by setting up the __tune_...__ define as well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140690 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Basic/Targets.cpp | 4 +++- test/Preprocessor/predefined-arch-macros.c | 9 +++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp index f2404d29b1..244205400c 100644 --- a/lib/Basic/Targets.cpp +++ b/lib/Basic/Targets.cpp @@ -1799,8 +1799,10 @@ void X86TargetInfo::getTargetDefines(const LangOptions &Opts, Builder.defineMacro("__athlon"); Builder.defineMacro("__athlon__"); Builder.defineMacro("__tune_athlon__"); - if (SSELevel != NoSSE) + if (SSELevel != NoSSE) { Builder.defineMacro("__athlon_sse__"); + Builder.defineMacro("__tune_athlon_sse__"); + } break; case CK_K8: case CK_K8SSE3: diff --git a/test/Preprocessor/predefined-arch-macros.c b/test/Preprocessor/predefined-arch-macros.c index c59a08104f..2e776822f6 100644 --- a/test/Preprocessor/predefined-arch-macros.c +++ b/test/Preprocessor/predefined-arch-macros.c @@ -441,8 +441,7 @@ // CHECK_ATHLON_4_M32: #define __i386 1 // CHECK_ATHLON_4_M32: #define __i386__ 1 // CHECK_ATHLON_4_M32: #define __tune_athlon__ 1 -// FIXME: This should be defined! -// CHECK_ATHLON_4_M32-NOT: #define __tune_athlon_sse__ 1 +// CHECK_ATHLON_4_M32: #define __tune_athlon_sse__ 1 // CHECK_ATHLON_4_M32: #define i386 1 // RUN: %clang -march=athlon-4 -m64 -E -dM %s -o - 2>&1 \ // RUN: | FileCheck %s -check-prefix=CHECK_ATHLON_4_M64 @@ -456,8 +455,7 @@ // CHECK_ATHLON_XP_M32: #define __i386 1 // CHECK_ATHLON_XP_M32: #define __i386__ 1 // CHECK_ATHLON_XP_M32: #define __tune_athlon__ 1 -// FIXME: This should be defined! -// CHECK_ATHLON_XP_M32-NOT: #define __tune_athlon_sse__ 1 +// CHECK_ATHLON_XP_M32: #define __tune_athlon_sse__ 1 // CHECK_ATHLON_XP_M32: #define i386 1 // RUN: %clang -march=athlon-xp -m64 -E -dM %s -o - 2>&1 \ // RUN: | FileCheck %s -check-prefix=CHECK_ATHLON_XP_M64 @@ -471,8 +469,7 @@ // CHECK_ATHLON_MP_M32: #define __i386 1 // CHECK_ATHLON_MP_M32: #define __i386__ 1 // CHECK_ATHLON_MP_M32: #define __tune_athlon__ 1 -// FIXME: This should be defined! -// CHECK_ATHLON_MP_M32-NOT: #define __tune_athlon_sse__ 1 +// CHECK_ATHLON_MP_M32: #define __tune_athlon_sse__ 1 // CHECK_ATHLON_MP_M32: #define i386 1 // RUN: %clang -march=athlon-mp -m64 -E -dM %s -o - 2>&1 \ // RUN: | FileCheck %s -check-prefix=CHECK_ATHLON_MP_M64 -- 2.40.0