diff options
-rw-r--r-- | src/include/cpu/x86/mp.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/include/cpu/x86/mp.h b/src/include/cpu/x86/mp.h index 8105477c49..aea3ca1e3d 100644 --- a/src/include/cpu/x86/mp.h +++ b/src/include/cpu/x86/mp.h @@ -13,7 +13,11 @@ struct bus; static inline void mfence(void) { - __asm__ __volatile__("mfence\t\n": : :"memory"); + /* mfence came with the introduction of SSE2. */ + if (CONFIG(SSE2)) + __asm__ __volatile__("mfence\t\n": : :"memory"); + else + __asm__ __volatile__("lock; addl $0,0(%%esp)": : : "memory"); } /* The sequence of the callbacks are in calling order. */ |