module/icp/asm-arm/sha2: auto detect __ARM_ARCH
This patch uses __ARM_ARCH set by compiler (both GCC and Clang have this) whenever possible instead of hardcoding it to 7. This change allows code to compile on earlier ARM architectures such as armv5te. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Shengqi Chen <harry-chen@outlook.com> Closes #15557
This commit is contained in:
parent
86492e3c96
commit
bce36e21ca
|
@ -21,8 +21,11 @@
|
|||
|
||||
#if defined(__arm__)
|
||||
|
||||
#ifndef __ARM_ARCH
|
||||
# define __ARM_ARCH__ 7
|
||||
#define __ARM_MAX_ARCH__ 7
|
||||
#else
|
||||
# define __ARM_ARCH__ __ARM_ARCH
|
||||
#endif
|
||||
|
||||
#if defined(__thumb2__)
|
||||
.syntax unified
|
||||
|
|
|
@ -21,8 +21,11 @@
|
|||
|
||||
#if defined(__arm__)
|
||||
|
||||
#ifndef __ARM_ARCH
|
||||
# define __ARM_ARCH__ 7
|
||||
#define __ARM_MAX_ARCH__ 7
|
||||
#else
|
||||
# define __ARM_ARCH__ __ARM_ARCH
|
||||
#endif
|
||||
|
||||
#ifndef __KERNEL__
|
||||
# define VFP_ABI_PUSH vstmdb sp!,{d8-d15}
|
||||
|
|
Loading…
Reference in New Issue