mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-02 12:14:38 +02:00
SP int ARMv6: clz not available, correct #if
Checking for architecture less than 7 to use clz instruction when clz is only guaranteed to be available in 7 or more. Reverse logic.
This commit is contained in:
@@ -1245,7 +1245,7 @@ static WC_INLINE sp_int_digit sp_div_word(sp_int_digit hi, sp_int_digit lo,
|
|||||||
: [a] "r" (va), [b] "r" (vb), [c] "r" (vc) \
|
: [a] "r" (va), [b] "r" (vb), [c] "r" (vc) \
|
||||||
: "cc" \
|
: "cc" \
|
||||||
)
|
)
|
||||||
#if defined(WOLFSSL_SP_ARM_ARCH) && (WOLFSSL_SP_ARM_ARCH < 7)
|
#if defined(WOLFSSL_SP_ARM_ARCH) && (WOLFSSL_SP_ARM_ARCH >= 7)
|
||||||
/* Count leading zeros - instruction only available on ARMv7 and newer. */
|
/* Count leading zeros - instruction only available on ARMv7 and newer. */
|
||||||
#define SP_ASM_LZCNT(va, vn) \
|
#define SP_ASM_LZCNT(va, vn) \
|
||||||
__asm__ __volatile__ ( \
|
__asm__ __volatile__ ( \
|
||||||
|
Reference in New Issue
Block a user