diff options
author | Warner Losh <[email protected]> | 2020-10-13 22:01:40 -0600 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2020-10-16 13:03:13 -0700 |
commit | faa62966b1b35268a5aec87d3fa0082b9bf02fc9 (patch) | |
tree | 2e42122a48c3f3a8fcb5c40873d88f22f10aea62 /include | |
parent | be28cdd1c3a59580546d5743fbea19c4b2c70352 (diff) |
aarch64: Use proper guards for NEON instructions
The zstd code assumes that if you are on aarch64, you have NEON
instructions. This is not necessarily true. In a boot loader, where
you might not have the VFP properly initialized, these instructions
may not be available. It's also an error to include arm_neon.h when
the NEON insturctions aren't enabled. Change the guards for using the
NEON instructions from __aarch64__ to __ARM_NEON which is the standard
symbol for knowing if they are available.
__ARM_NEON is the proper symbol, defined in ARM C Language Extensions
Release 2.1 (https://developer.arm.com/documentation/ihi0053/d/). Some
sources suggest __ARM_NEON__, but that's the obsolete spelling from
prior versions of the standard.
Updated based on zstd pull request https://github.com/facebook/zstd/pull/2356
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Warner Losh <[email protected]>
Closes #11055
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions