Move from asm to __asm by default
- GCC with -std=c99 warns about asm but likes __asm
_ armcc5 has __asm but not asm
diff --git a/include/mbedtls/bn_mul.h b/include/mbedtls/bn_mul.h
index 7b8019c..188d7f3 100644
--- a/include/mbedtls/bn_mul.h
+++ b/include/mbedtls/bn_mul.h
@@ -42,6 +42,10 @@
#if defined(MBEDTLS_HAVE_ASM)
+#ifndef asm
+#define asm __asm
+#endif
+
#if defined(__GNUC__)
#if defined(__i386__)
diff --git a/library/aesni.c b/library/aesni.c
index ff6c71d..9982b3b 100644
--- a/library/aesni.c
+++ b/library/aesni.c
@@ -37,6 +37,10 @@
#include <string.h>
+#ifndef asm
+#define asm __asm
+#endif
+
#if defined(MBEDTLS_HAVE_X86_64)
/*
diff --git a/library/padlock.c b/library/padlock.c
index 3e9f9a9..e980d24 100644
--- a/library/padlock.c
+++ b/library/padlock.c
@@ -38,6 +38,10 @@
#include <string.h>
+#ifndef asm
+#define asm __asm
+#endif
+
#if defined(MBEDTLS_HAVE_X86)
/*
diff --git a/library/timing.c b/library/timing.c
index 4ff11e7..bdbdcce 100644
--- a/library/timing.c
+++ b/library/timing.c
@@ -39,6 +39,10 @@
#if !defined(MBEDTLS_TIMING_ALT)
+#ifndef asm
+#define asm __asm
+#endif
+
#if defined(_WIN32) && !defined(EFIX64) && !defined(EFI32)
#include <windows.h>