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
b3a985fa42
commit
4340f69be1
|
@ -21,8 +21,11 @@
|
||||||
|
|
||||||
#if defined(__arm__)
|
#if defined(__arm__)
|
||||||
|
|
||||||
#define __ARM_ARCH__ 7
|
#ifndef __ARM_ARCH
|
||||||
#define __ARM_MAX_ARCH__ 7
|
# define __ARM_ARCH__ 7
|
||||||
|
#else
|
||||||
|
# define __ARM_ARCH__ __ARM_ARCH
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(__thumb2__)
|
#if defined(__thumb2__)
|
||||||
.syntax unified
|
.syntax unified
|
||||||
|
|
|
@ -21,8 +21,11 @@
|
||||||
|
|
||||||
#if defined(__arm__)
|
#if defined(__arm__)
|
||||||
|
|
||||||
#define __ARM_ARCH__ 7
|
#ifndef __ARM_ARCH
|
||||||
#define __ARM_MAX_ARCH__ 7
|
# define __ARM_ARCH__ 7
|
||||||
|
#else
|
||||||
|
# define __ARM_ARCH__ __ARM_ARCH
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __KERNEL__
|
#ifndef __KERNEL__
|
||||||
# define VFP_ABI_PUSH vstmdb sp!,{d8-d15}
|
# define VFP_ABI_PUSH vstmdb sp!,{d8-d15}
|
||||||
|
|
Loading…
Reference in New Issue