diff options
author | Tim Northover <tnorthover@apple.com> | 2013-11-21 12:36:34 +0000 |
---|---|---|
committer | Tim Northover <tnorthover@apple.com> | 2013-11-21 12:36:34 +0000 |
commit | 5bb34ca4df0db3221577e28862a4c89d22313f45 (patch) | |
tree | 8725f3427ea14b08839f1d67304cfdc20cc51fac | |
parent | 67968632ba92365ec4d8a2ec8e5e8bc15bccea38 (diff) | |
download | bcm5719-llvm-5bb34ca4df0db3221577e28862a4c89d22313f45.tar.gz bcm5719-llvm-5bb34ca4df0db3221577e28862a4c89d22313f45.zip |
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.
llvm-svn: 195353
-rw-r--r-- | clang/lib/Basic/Targets.cpp | 4 | ||||
-rw-r--r-- | clang/utils/TableGen/NeonEmitter.cpp | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Basic/Targets.cpp b/clang/lib/Basic/Targets.cpp index 8b35c9a8aa7..858c3c2e63e 100644 --- a/clang/lib/Basic/Targets.cpp +++ b/clang/lib/Basic/Targets.cpp @@ -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"); diff --git a/clang/utils/TableGen/NeonEmitter.cpp b/clang/utils/TableGen/NeonEmitter.cpp index 2762ecb4389..3a572d6d1ba 100644 --- a/clang/utils/TableGen/NeonEmitter.cpp +++ b/clang/utils/TableGen/NeonEmitter.cpp @@ -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"; |