diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-05-30 13:53:58 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-05-30 13:53:58 +0000 |
commit | a33fe80e4ac03b7761ba3a6e027db4270743c73a (patch) | |
tree | 954341b1f6de0160a743a741c85a9d5a24b7f482 /libgo | |
parent | c98fd781d8c0752f75b4ae03f1fa652b17265c27 (diff) | |
download | gcc-a33fe80e4ac03b7761ba3a6e027db4270743c73a.tar.gz |
runtime: Use _mm_pause rather than __builtin_ia32_pause.
Based on a patch from Peter Collingbourne.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211081 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo')
-rw-r--r-- | libgo/runtime/yield.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libgo/runtime/yield.c b/libgo/runtime/yield.c index 5c47719d48f..442d346db7d 100644 --- a/libgo/runtime/yield.c +++ b/libgo/runtime/yield.c @@ -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 } } |