r195353 - ARM: define & use __ARM_NEON on ARM32 (as per ACLE)
Tim Northover
tnorthover at apple.com
Thu Nov 21 04:36:35 PST 2013
Author: tnorthover
Date: Thu Nov 21 06:36:34 2013
New Revision: 195353
URL: http://llvm.org/viewvc/llvm-project?rev=195353&view=rev
Log:
ARM: define & use __ARM_NEON on ARM32 (as per ACLE)
There seem to be quite a few references to the old macro __ARM_NEON__ on the
internet, so I don't think it's a good idea to remove it entirely (at least
yet), but the canonical name does not have the trailing underscores so we
should use that ourselves.
Modified:
cfe/trunk/lib/Basic/Targets.cpp
cfe/trunk/utils/TableGen/NeonEmitter.cpp
Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=195353&r1=195352&r2=195353&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Thu Nov 21 06:36:34 2013
@@ -4007,8 +4007,10 @@ 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 && CPUArchVer >= 7)
+ if ((FPU & NeonFPU) && !SoftFloat && CPUArchVer >= 7) {
+ Builder.defineMacro("__ARM_NEON");
Builder.defineMacro("__ARM_NEON__");
+ }
if (CRC)
Builder.defineMacro("__ARM_FEATURE_CRC32");
Modified: cfe/trunk/utils/TableGen/NeonEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/TableGen/NeonEmitter.cpp?rev=195353&r1=195352&r2=195353&view=diff
==============================================================================
--- cfe/trunk/utils/TableGen/NeonEmitter.cpp (original)
+++ cfe/trunk/utils/TableGen/NeonEmitter.cpp Thu Nov 21 06:36:34 2013
@@ -2459,7 +2459,7 @@ void NeonEmitter::run(raw_ostream &OS) {
OS << "#ifndef __ARM_NEON_H\n";
OS << "#define __ARM_NEON_H\n\n";
- OS << "#if !defined(__ARM_NEON__) && !defined(__ARM_NEON)\n";
+ OS << "#if !defined(__ARM_NEON)\n";
OS << "#error \"NEON support not enabled\"\n";
OS << "#endif\n\n";
More information about the cfe-commits
mailing list