[cfe-commits] r131301 - /cfe/trunk/lib/Basic/Targets.cpp
Bob Wilson
bob.wilson at apple.com
Fri May 13 11:56:03 PDT 2011
Author: bwilson
Date: Fri May 13 13:56:03 2011
New Revision: 131301
URL: http://llvm.org/viewvc/llvm-project?rev=131301&view=rev
Log:
Define __ARM_NEON__ in both ARM and Thumb modes. Radar 9431992.
Modified:
cfe/trunk/lib/Basic/Targets.cpp
Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=131301&r1=131300&r2=131301&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Fri May 13 13:56:03 2011
@@ -1993,11 +1993,11 @@
if (CPU == "xscale")
Builder.defineMacro("__XSCALE__");
- bool IsThumb2 = IsThumb && (CPUArch == "6T2" || CPUArch.startswith("7"));
+ bool IsARMv7 = CPUArch.startswith("7");
if (IsThumb) {
Builder.defineMacro("__THUMBEL__");
Builder.defineMacro("__thumb__");
- if (IsThumb2)
+ if (CPUArch == "6T2" || IsARMv7)
Builder.defineMacro("__thumb2__");
}
@@ -2011,7 +2011,7 @@
// the VFP define, hence the soft float and arch check. This is subtly
// different from gcc, we follow the intent which was that it should be set
// when Neon instructions are actually available.
- if (FPU == NeonFPU && !SoftFloat && IsThumb2)
+ if (FPU == NeonFPU && !SoftFloat && IsARMv7)
Builder.defineMacro("__ARM_NEON__");
}
virtual void getTargetBuiltins(const Builtin::Info *&Records,
More information about the cfe-commits
mailing list