r189670 - Add support for -march=slm, aka Intel Atom Silvermont.
Benjamin Kramer
benny.kra at googlemail.com
Fri Aug 30 07:05:34 PDT 2013
Author: d0k
Date: Fri Aug 30 09:05:34 2013
New Revision: 189670
URL: http://llvm.org/viewvc/llvm-project?rev=189670&view=rev
Log:
Add support for -march=slm, aka Intel Atom Silvermont.
Modified:
cfe/trunk/lib/Basic/Targets.cpp
cfe/trunk/test/Preprocessor/predefined-arch-macros.c
Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=189670&r1=189669&r2=189670&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Fri Aug 30 09:05:34 2013
@@ -1637,6 +1637,7 @@ class X86TargetInfo : public TargetInfo
/// Atom processors
//@{
CK_Atom,
+ CK_SLM,
//@}
/// \name Nehalem
@@ -1805,6 +1806,7 @@ public:
.Case("core2", CK_Core2)
.Case("penryn", CK_Penryn)
.Case("atom", CK_Atom)
+ .Case("slm", CK_SLM)
.Case("corei7", CK_Corei7)
.Case("corei7-avx", CK_Corei7AVX)
.Case("core-avx-i", CK_CoreAVXi)
@@ -1880,6 +1882,7 @@ public:
case CK_Core2:
case CK_Penryn:
case CK_Atom:
+ case CK_SLM:
case CK_Corei7:
case CK_Corei7AVX:
case CK_CoreAVXi:
@@ -1977,6 +1980,7 @@ void X86TargetInfo::getDefaultFeatures(l
setFeatureEnabled(Features, "ssse3", true);
break;
case CK_Corei7:
+ case CK_SLM:
setFeatureEnabled(Features, "sse4.2", true);
break;
case CK_Corei7AVX:
@@ -2473,6 +2477,9 @@ void X86TargetInfo::getTargetDefines(con
case CK_Atom:
defineCPUMacros(Builder, "atom");
break;
+ case CK_SLM:
+ defineCPUMacros(Builder, "slm");
+ break;
case CK_Corei7:
case CK_Corei7AVX:
case CK_CoreAVXi:
Modified: cfe/trunk/test/Preprocessor/predefined-arch-macros.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/predefined-arch-macros.c?rev=189670&r1=189669&r2=189670&view=diff
==============================================================================
--- cfe/trunk/test/Preprocessor/predefined-arch-macros.c (original)
+++ cfe/trunk/test/Preprocessor/predefined-arch-macros.c Fri Aug 30 09:05:34 2013
@@ -665,6 +665,42 @@
// CHECK_ATOM_M64: #define __x86_64 1
// CHECK_ATOM_M64: #define __x86_64__ 1
//
+// RUN: %clang -march=slm -m32 -E -dM %s -o - 2>&1 \
+// RUN: -target i386-unknown-linux \
+// RUN: | FileCheck %s -check-prefix=CHECK_SLM_M32
+// CHECK_SLM_M32: #define __MMX__ 1
+// CHECK_SLM_M32: #define __SSE2__ 1
+// CHECK_SLM_M32: #define __SSE3__ 1
+// CHECK_SLM_M32: #define __SSE4_1__ 1
+// CHECK_SLM_M32: #define __SSE4_2__ 1
+// CHECK_SLM_M32: #define __SSE__ 1
+// CHECK_SLM_M32: #define __SSSE3__ 1
+// CHECK_SLM_M32: #define __i386 1
+// CHECK_SLM_M32: #define __i386__ 1
+// CHECK_SLM_M32: #define __slm 1
+// CHECK_SLM_M32: #define __slm__ 1
+// CHECK_SLM_M32: #define __tune_slm__ 1
+// CHECK_SLM_M32: #define i386 1
+// RUN: %clang -march=slm -m64 -E -dM %s -o - 2>&1 \
+// RUN: -target i386-unknown-linux \
+// RUN: | FileCheck %s -check-prefix=CHECK_SLM_M64
+// CHECK_SLM_M64: #define __MMX__ 1
+// CHECK_SLM_M64: #define __SSE2_MATH__ 1
+// CHECK_SLM_M64: #define __SSE2__ 1
+// CHECK_SLM_M64: #define __SSE3__ 1
+// CHECK_SLM_M64: #define __SSE4_1__ 1
+// CHECK_SLM_M64: #define __SSE4_2__ 1
+// CHECK_SLM_M64: #define __SSE_MATH__ 1
+// CHECK_SLM_M64: #define __SSE__ 1
+// CHECK_SLM_M64: #define __SSSE3__ 1
+// CHECK_SLM_M64: #define __amd64 1
+// CHECK_SLM_M64: #define __amd64__ 1
+// CHECK_SLM_M64: #define __slm 1
+// CHECK_SLM_M64: #define __slm__ 1
+// CHECK_SLM_M64: #define __tune_slm__ 1
+// CHECK_SLM_M64: #define __x86_64 1
+// CHECK_SLM_M64: #define __x86_64__ 1
+//
// RUN: %clang -march=geode -m32 -E -dM %s -o - 2>&1 \
// RUN: -target i386-unknown-linux \
// RUN: | FileCheck %s -check-prefix=CHECK_GEODE_M32
More information about the cfe-commits
mailing list