runtime: Use _mm_pause rather than __builtin_ia32_pause.

Based on a patch from Peter Collingbourne.

From-SVN: r211081
This commit is contained in:
Ian Lance Taylor 2014-05-30 13:53:58 +00:00
parent ecd5543ffa
commit 7480a39b77

View file

@ -14,6 +14,10 @@
#include <sys/select.h>
#endif
#if defined (__i386__) || defined (__x86_64__)
#include <xmmintrin.h>
#endif
#include "runtime.h"
/* Spin wait. */
@ -26,7 +30,7 @@ runtime_procyield (uint32 cnt)
for (i = 0; i < cnt; ++i)
{
#if defined (__i386__) || defined (__x86_64__)
__builtin_ia32_pause ();
_mm_pause ();
#endif
}
}