From 347394cc6be11472de902268b178a44b796655cc Mon Sep 17 00:00:00 2001 From: David Garske Date: Wed, 20 Sep 2023 15:39:02 -0700 Subject: [PATCH] Detect Cortex M3 (no UMAAL) and define `WOLFSSL_SP_NO_UMAAL`. --- wolfssl/wolfcrypt/sp_int.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/wolfssl/wolfcrypt/sp_int.h b/wolfssl/wolfcrypt/sp_int.h index 0b67330967..34fb82cd7e 100644 --- a/wolfssl/wolfcrypt/sp_int.h +++ b/wolfssl/wolfcrypt/sp_int.h @@ -178,6 +178,13 @@ extern "C" { #define WOLFSSL_SP_DIV_WORD_HALF #endif +/* Detect Cortex M3 (no UMAAL) */ +#if defined(WOLFSSL_SP_ARM_CORTEX_M_ASM) && defined(__ARM_ARCH_7M__) + #undef WOLFSSL_SP_NO_UMAAL + #define WOLFSSL_SP_NO_UMAAL +#endif + + /* Make sure WOLFSSL_SP_ASM build option defined when requested */ #if !defined(WOLFSSL_SP_ASM) && ( \ defined(WOLFSSL_SP_X86_64_ASM) || defined(WOLFSSL_SP_ARM32_ASM) || \