blob: 93a257edc921d3de6a12e38931e588769520cba0 [file] [log] [blame]
Antonio de Angelis674e77d2024-10-17 17:13:41 +01001From 610c09f7d76b30768c9c0b6e68bfc95920529beb Mon Sep 17 00:00:00 2001
Antonio de Angelis2f508212024-10-08 22:55:51 +01002From: Antonio de Angelis <Antonio.deAngelis@arm.com>
3Date: Wed, 9 Oct 2024 13:36:42 +0100
4Subject: [PATCH 7/7] P256M: Add option to force not use of asm
5
6Add an option to let the compiler generate the assembly
7code for u32_muladd64(), especially for MinSizeRel and
8Release builds.
9
10Signed-off-by: Antonio de Angelis <antonio.deangelis@arm.com>
11---
12 3rdparty/p256-m/p256-m/p256-m.c | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15diff --git a/3rdparty/p256-m/p256-m/p256-m.c b/3rdparty/p256-m/p256-m/p256-m.c
16index 42c35b5bf..558a8bc95 100644
17--- a/3rdparty/p256-m/p256-m/p256-m.c
18+++ b/3rdparty/p256-m/p256-m/p256-m.c
19@@ -197,7 +197,7 @@ static uint64_t u32_muladd64(uint32_t x, uint32_t y, uint32_t z, uint32_t t);
20 * v7-M architectures. __ARM_ARCH_PROFILE is not defined for v6 and earlier.
21 * Thumb and 32-bit assembly is supported; aarch64 is not supported.
22 */
23-#if defined(__GNUC__) &&\
24+#if !defined(MULADD64_IGNORE_ASM) && defined(__GNUC__) &&\
25 defined(__ARM_ARCH) && __ARM_ARCH >= 6 && defined(__ARM_ARCH_PROFILE) && \
26 ( __ARM_ARCH_PROFILE == 77 || __ARM_ARCH_PROFILE == 65 ) /* 'M' or 'A' */ && \
27 !defined(__aarch64__)
28--
292.34.1
30