From: Bob Wilson Date: Fri, 13 May 2011 18:56:03 +0000 (+0000) Subject: Define __ARM_NEON__ in both ARM and Thumb modes. Radar 9431992. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=84f95cf115bc9031179e3b2c10a628dee3551142;p=clang Define __ARM_NEON__ in both ARM and Thumb modes. Radar 9431992. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131301 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp index 09a2f56b42..ab0ba959bd 100644 --- a/lib/Basic/Targets.cpp +++ b/lib/Basic/Targets.cpp @@ -1993,11 +1993,11 @@ public: 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 @@ public: // 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,