File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1264,7 +1264,11 @@ WOLFSSL_ABI WOLFSSL_API int wolfCrypt_Cleanup(void);
12641264#endif
12651265
12661266#ifndef WOLFSSL_NO_FENCE
1267- #if defined (__i386__ ) || defined(__x86_64__ )
1267+ #ifdef XFENCE
1268+ /* use user-supplied XFENCE definition. */
1269+ #elif defined(__GNUC__ ) && (__GNUC__ >= 4 )
1270+ #define XFENCE () __sync_synchronize()
1271+ #elif defined (__i386__ ) || defined(__x86_64__ )
12681272 #define XFENCE () XASM_VOLATILE("lfence")
12691273 #elif (defined (__arm__ ) && (__ARM_ARCH > 6 )) || defined(__aarch64__ )
12701274 #define XFENCE () XASM_VOLATILE("isb")
@@ -1273,10 +1277,10 @@ WOLFSSL_ABI WOLFSSL_API int wolfCrypt_Cleanup(void);
12731277 #elif defined(__PPC__ )
12741278 #define XFENCE () XASM_VOLATILE("isync; sync")
12751279 #else
1276- #define XFENCE () do{}while(0)
1280+ #define XFENCE () WC_DO_NOTHING
12771281 #endif
12781282#else
1279- #define XFENCE () do{}while(0)
1283+ #define XFENCE () WC_DO_NOTHING
12801284#endif
12811285
12821286
You can’t perform that action at this time.
0 commit comments