aboutsummaryrefslogtreecommitdiff
path: root/lib/Basic/Targets.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2011-09-28 09:54:07 +0000
committerChandler Carruth <chandlerc@gmail.com>2011-09-28 09:54:07 +0000
commit88c75b0af17d103a116239a04dea7f27081370ab (patch)
treeb150846334ee98d01ce455683befd8c26ac19a22 /lib/Basic/Targets.cpp
parent26a3914eeda65e0dd6b55899f6d76ef99fc021c6 (diff)
Move some of the defines down to more natural locations, consolidating
the target identifying macros at the top, including subtarget macros. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140689 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/Targets.cpp')
-rw-r--r--lib/Basic/Targets.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp
index acf54b7334..f2404d29b1 100644
--- a/lib/Basic/Targets.cpp
+++ b/lib/Basic/Targets.cpp
@@ -1691,16 +1691,6 @@ void X86TargetInfo::getTargetDefines(const LangOptions &Opts,
DefineStd(Builder, "i386", Opts);
}
- if (HasAES)
- Builder.defineMacro("__AES__");
-
- if (HasAVX)
- Builder.defineMacro("__AVX__");
-
- // Target properties.
- Builder.defineMacro("__LITTLE_ENDIAN__");
- Builder.defineMacro("__REGISTER_PREFIX__", "");
-
// Subtarget options.
// FIXME: We are hard-coding the tune parameters based on the CPU, but they
// truly should be based on -mtune options.
@@ -1831,11 +1821,21 @@ void X86TargetInfo::getTargetDefines(const LangOptions &Opts,
break;
}
+ // Target properties.
+ Builder.defineMacro("__LITTLE_ENDIAN__");
+ Builder.defineMacro("__REGISTER_PREFIX__", "");
+
// Define __NO_MATH_INLINES on linux/x86 so that we don't get inline
// functions in glibc header files that use FP Stack inline asm which the
// backend can't deal with (PR879).
Builder.defineMacro("__NO_MATH_INLINES");
+ if (HasAES)
+ Builder.defineMacro("__AES__");
+
+ if (HasAVX)
+ Builder.defineMacro("__AVX__");
+
// Each case falls through to the previous one here.
switch (SSELevel) {
case SSE42: