blob: 757d83f49c8f7851b74103f778d12c907837406c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
From 7aff5a70f3580426865b6c86437a3e47546d13f7 Mon Sep 17 00:00:00 2001
From: Hauke Mehrtens <hauke@hauke-m.de>
Date: Sun, 16 Dec 2018 13:02:49 +0100
Subject: [PATCH] bn_mul.h: Use optimized MULADDC code only on ARM >= 6
The optimized code uses umaal which was only introduced with ARMv6 and
is not available on older versions.
This broke compilation with arm926ej-s CPU for me.
Fixes: 16b1bd89326 ("bn_mul.h: add ARM DSP optimized MULADDC code")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
include/mbedtls/bn_mul.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/include/mbedtls/bn_mul.h
+++ b/include/mbedtls/bn_mul.h
@@ -644,7 +644,8 @@
"r6", "r7", "r8", "r9", "cc" \
);
-#elif defined (__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1)
+#elif defined (__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1) && \
+ __TARGET_ARCH_ARM >= 6
#define MULADDC_INIT \
asm(
|