From 32c80781bf2938f00ed4cd64d0cdd3e81ec6dd81 Mon Sep 17 00:00:00 2001 From: Tesfa Mael Date: Tue, 8 Feb 2022 19:25:13 -0800 Subject: [PATCH 1/2] Prevent diab compiler from inlining functions --- wolfssl/wolfcrypt/sp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wolfssl/wolfcrypt/sp.h b/wolfssl/wolfcrypt/sp.h index d6728d02e..99fb3f812 100644 --- a/wolfssl/wolfcrypt/sp.h +++ b/wolfssl/wolfcrypt/sp.h @@ -49,7 +49,7 @@ #define SP_NOINLINE __declspec(noinline) #elif defined(__ICCARM__) || defined(__IAR_SYSTEMS_ICC__) #define SP_NOINLINE _Pragma("inline = never") -#elif defined(__GNUC__) || defined(__KEIL__) +#elif defined(__GNUC__) || defined(__KEIL__) || defined(__DCC__) #define SP_NOINLINE __attribute__((noinline)) #else #define SP_NOINLINE From f49b7107a0d5ed2c7893f0165b31cb180b3b47f1 Mon Sep 17 00:00:00 2001 From: Tesfa Mael Date: Tue, 8 Feb 2022 19:54:26 -0800 Subject: [PATCH 2/2] Add __inline__ for Diab compiler --- wolfssl/wolfcrypt/types.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/wolfssl/wolfcrypt/types.h b/wolfssl/wolfcrypt/types.h index b6b6b60a1..3b602f801 100644 --- a/wolfssl/wolfcrypt/types.h +++ b/wolfssl/wolfcrypt/types.h @@ -259,6 +259,12 @@ decouple library dependencies with standard string, memory and so on. #endif #elif defined(__CCRX__) #define WC_INLINE inline + #elif defined(__DCC__) + #ifndef __cplusplus + #define WC_INLINE __inline__ + #else + #define WC_INLINE inline + #endif #else #define WC_INLINE #endif