1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-06-03 13:22:02 +03:00

Fix armclang compile fail

Signed-off-by: Dave Rodgman <dave.rodgman@gmail.com>
This commit is contained in:
Dave Rodgman 2023-06-05 21:24:57 -04:00
parent c2f5b087c8
commit 763c8b96cc
2 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,5 @@
Bugfix
* Fix clang and armclang compilation error when targeting certain Arm
M-class CPUs (Cortex-M0, Cortex-M0+, Cortex-M1, Cortex-M23,
SecurCore SC000). Fixes #1077.

View File

@ -677,6 +677,15 @@
#if defined(__arm__) && !defined(MULADDC_CANNOT_USE_R7)
#if defined(__thumb__) && !defined(__thumb2__)
#if !defined(__ARMCC_VERSION) && !defined(__clang__) \
&& !defined(__llvm__) && !defined(__INTEL_COMPILER)
/*
* Thumb 1 ISA. This code path has only been tested successfully on gcc;
* it does not compile on clang or armclang.
*
* Other compilers which define __GNUC__ may not work. The above macro
* attempts to exclude these untested compilers.
*/
#define MULADDC_INIT \
asm( \
@ -731,6 +740,8 @@
"r6", "r7", "r8", "r9", "cc" \
);
#endif /* Compiler is gcc */
#elif (__ARM_ARCH >= 6) && \
defined (__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1)