File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1180,15 +1180,22 @@ WOLFSSL_ABI WOLFSSL_API int wolfCrypt_Cleanup(void);
11801180 #endif
11811181#endif
11821182
1183+ #ifdef WOLF_C99
1184+ /* use alternate keyword for compatibility with -std=c99 */
1185+ #define XASM_VOLATILE (a ) __asm__ volatile(a)
1186+ #else
1187+ #define XASM_VOLATILE (a ) asm volatile(a)
1188+ #endif
1189+
11831190#ifndef WOLFSSL_NO_FENCE
11841191 #if defined (__i386__ ) || defined(__x86_64__ )
1185- #define XFENCE () asm volatile ("lfence")
1192+ #define XFENCE () XASM_VOLATILE ("lfence")
11861193 #elif defined (__arm__ ) || defined(__aarch64__ )
1187- #define XFENCE () asm volatile ("isb")
1194+ #define XFENCE () XASM_VOLATILE ("isb")
11881195 #elif defined(__riscv )
1189- #define XFENCE () asm volatile ("fence")
1196+ #define XFENCE () XASM_VOLATILE ("fence")
11901197 #elif defined(__PPC__ )
1191- #define XFENCE () asm volatile ("isync; sync")
1198+ #define XFENCE () XASM_VOLATILE ("isync; sync")
11921199 #else
11931200 #define XFENCE () do{}while(0)
11941201 #endif
You can’t perform that action at this time.
0 commit comments