diff options
author | Stephen Kyle <stephen.kyle@arm.com> | 2018-10-08 14:40:11 +0100 |
---|---|---|
committer | Eugene Kliuchnikov <eustas@google.com> | 2018-10-08 15:40:11 +0200 |
commit | cc7a74f15fff163319be63a13ae822513336544e (patch) | |
tree | 0ebddcf8ee19abe59f6413cbd192fc767e8765c5 /c/common | |
parent | c94c6f805c881b2a67540f5953a59d963d87a7f8 (diff) | |
download | brotli-cc7a74f15fff163319be63a13ae822513336544e.zip brotli-cc7a74f15fff163319be63a13ae822513336544e.tar.gz brotli-cc7a74f15fff163319be63a13ae822513336544e.tar.bz2 |
decode: fix NEON inclusion (#714)
The macro that checks for NEON support should be __ARM_NEON, not
__ARM_NEON__. [1]
AArch64 compilers define __ARM_NEON but not __ARM_NEON__.
AArch32 compilers currently seem to define both, but could be within their
rights to drop __ARM_NEON__ in future versions.
This change moves the check into the common/platform.h file, checks for
both forms, and sets BROTLI_TARGET_NEON if NEON support is available.
[1] Section 6.5.4 of the ARM C Language Extensions.
(At the time of writing, the latest version was Release 2.1.)
Diffstat (limited to 'c/common')
-rwxr-xr-x | c/common/platform.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/c/common/platform.h b/c/common/platform.h index 3945a27..93db089 100755 --- a/c/common/platform.h +++ b/c/common/platform.h @@ -203,6 +203,10 @@ OR: #endif /* ARMv8 */ +#if defined(__ARM_NEON__) || defined(__ARM_NEON) +#define BROTLI_TARGET_NEON +#endif + #if defined(__i386) || defined(_M_IX86) #define BROTLI_TARGET_X86 #endif |