BUILD: Update For IAR support
Applied the same change as in mbed-crypto for using this as a sub
project with the IAR toolchain. Use __asm generic ,and avoid empty
enum. Avoid declaration of array with null size. This is a porting
of the original patch contributed to trusted-firmware-m.
Signed-off-by: TTornblom <thomas.tornblom@iar.com>
Signed-off-by: Michel Jaouen <michel.jaouen@st.com>
Signed-off-by: Antonio de Angelis <antonio.deangelis@arm.com>
diff --git a/library/constant_time.c b/library/constant_time.c
index 832ded9..cb5003d 100644
--- a/library/constant_time.c
+++ b/library/constant_time.c
@@ -78,7 +78,7 @@
*/
uint32_t r;
#if defined(MBEDTLS_CT_ARM_ASM)
- asm volatile ("ldr %0, [%1]" : "=r" (r) : "r" (p) :);
+ __asm volatile ("ldr %0, [%1]" : "=r" (r) : "r" (p) :);
#elif defined(MBEDTLS_CT_AARCH64_ASM)
asm volatile ("ldr %w0, [%1]" : "=r" (r) : MBEDTLS_ASM_AARCH64_PTR_CONSTRAINT(p) :);
#else