Commit 7480a39b by Ian Lance Taylor

runtime: Use _mm_pause rather than __builtin_ia32_pause.

Based on a patch from Peter Collingbourne.

From-SVN: r211081
parent ecd5543f
...@@ -14,6 +14,10 @@ ...@@ -14,6 +14,10 @@
#include <sys/select.h> #include <sys/select.h>
#endif #endif
#if defined (__i386__) || defined (__x86_64__)
#include <xmmintrin.h>
#endif
#include "runtime.h" #include "runtime.h"
/* Spin wait. */ /* Spin wait. */
...@@ -26,7 +30,7 @@ runtime_procyield (uint32 cnt) ...@@ -26,7 +30,7 @@ runtime_procyield (uint32 cnt)
for (i = 0; i < cnt; ++i) for (i = 0; i < cnt; ++i)
{ {
#if defined (__i386__) || defined (__x86_64__) #if defined (__i386__) || defined (__x86_64__)
__builtin_ia32_pause (); _mm_pause ();
#endif #endif
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment