diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 392dbce60ef..8f0d5ecaae5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2012-07-03 Uros Bizjak + + * config/i386/xmmintrin.h (_mm_sfence): Use __builtin_ia32_pause. + 2012-07-03 Roland McGrath * configure.ac (HAVE_AS_IX86_REP_LOCK_PREFIX): Also require that the diff --git a/gcc/config/i386/xmmintrin.h b/gcc/config/i386/xmmintrin.h index 5aefa9db0c2..b3a8c3e1cda 100644 --- a/gcc/config/i386/xmmintrin.h +++ b/gcc/config/i386/xmmintrin.h @@ -1225,7 +1225,7 @@ _mm_sfence (void) extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_pause (void) { - __asm__ __volatile__ ("rep; nop" : : ); + __builtin_ia32_pause (); } /* Transpose the 4x4 matrix composed of row[0-3]. */ diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index ace010430e7..0b0266c33ea 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,7 +1,12 @@ +2012-07-03 Uros Bizjak + + * config/linux/x86/futex.h (cpu_relax): Use __builtin_ia32_pause. + * testsuite/libgomp.c/sort-1.c (busy_wait): Ditto. + 2012-07-02 Richard Guenther - Michael Matz - Tobias Grosser - Sebastian Pop + Michael Matz + Tobias Grosser + Sebastian Pop * testsuite/libgomp.graphite/force-parallel-4.c: Adjust. * testsuite/libgomp.graphite/force-parallel-5.c: Likewise. diff --git a/libgomp/config/linux/x86/futex.h b/libgomp/config/linux/x86/futex.h index f6d26dc4918..8e87de1ef7d 100644 --- a/libgomp/config/linux/x86/futex.h +++ b/libgomp/config/linux/x86/futex.h @@ -143,5 +143,5 @@ futex_wake (int *addr, int count) static inline void cpu_relax (void) { - __asm volatile ("rep; nop" : : : "memory"); + __builtin_ia32_pause (); } diff --git a/libgomp/testsuite/libgomp.c/sort-1.c b/libgomp/testsuite/libgomp.c/sort-1.c index 269d69da12c..3743065543e 100644 --- a/libgomp/testsuite/libgomp.c/sort-1.c +++ b/libgomp/testsuite/libgomp.c/sort-1.c @@ -100,7 +100,7 @@ static inline void busy_wait (void) { #if defined __i386__ || defined __x86_64__ - __asm volatile ("rep; nop" : : : "memory"); + __builtin_ia32_pause (); #elif defined __ia64__ __asm volatile ("hint @pause" : : : "memory"); #elif defined __sparc__ && (defined __arch64__ || defined __sparc_v9__) diff --git a/libitm/ChangeLog b/libitm/ChangeLog index 0ccdf42c592..2d10d5e8f97 100644 --- a/libitm/ChangeLog +++ b/libitm/ChangeLog @@ -1,3 +1,7 @@ +2012-07-31 Uros Bizjak + + * config/x86/target.h (cpu_relax): Use __builtin_ia32_pause. + 2012-05-21 Patrick Marlier * eh_cpp.cc: Fix __cxa_end_catch declaration. diff --git a/libitm/config/x86/target.h b/libitm/config/x86/target.h index 5c7e6fbee88..73b6585ae70 100644 --- a/libitm/config/x86/target.h +++ b/libitm/config/x86/target.h @@ -63,7 +63,7 @@ typedef struct gtm_jmpbuf static inline void cpu_relax (void) { - __asm volatile ("rep; nop" : : : "memory"); + __builtin_ia32_pause (); } } // namespace GTM