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:
@@ -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__)
|
||||
|
||||
Reference in New Issue
Block a user