2
0
mirror of https://github.com/boostorg/asio.git synced 2026-01-27 06:32:08 +00:00

Use SSE2 intrinsics to allow the Cray compiler to work.

This commit is contained in:
Christopher Kohlhoff
2014-06-28 22:08:03 +10:00
parent 9ef094e650
commit 78ff082f0c

View File

@@ -64,7 +64,11 @@ private:
static void lbarrier()
{
#if defined(__SSE2__)
# if (__GNUC__ >= 4)
__builtin_ia32_lfence();
# else // (__GNUC__ >= 4)
__asm__ __volatile__ ("lfence" ::: "memory");
# endif // (__GNUC__ >= 4)
#else // defined(__SSE2__)
barrier();
#endif // defined(__SSE2__)
@@ -73,7 +77,11 @@ private:
static void sbarrier()
{
#if defined(__SSE2__)
# if (__GNUC__ >= 4)
__builtin_ia32_sfence();
# else // (__GNUC__ >= 4)
__asm__ __volatile__ ("sfence" ::: "memory");
# endif // (__GNUC__ >= 4)
#else // defined(__SSE2__)
barrier();
#endif // defined(__SSE2__)