Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
aarch64: Use proper guards for NEON instructions
The zstd code assumes that if you are on aarch64, you have NEON insturctions. 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 facebook/zstd#2356 Signed-off-by: Warner Losh <[email protected]>
- Loading branch information