]> granicus.if.org Git - libatomic_ops/commitdiff
Always use 'mfence' for nop_full if target CPU supports SSE2 (gcc/x86)
authorIvan Maidanski <ivmai@mail.ru>
Sat, 9 Mar 2013 16:28:00 +0000 (20:28 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Sat, 9 Mar 2013 16:28:00 +0000 (20:28 +0400)
* src/atomic_ops/sysdeps/gcc/x86.h (AO_USE_PENTIUM4_INSTRS): Define
if __SSE2__ is defined; update comment (and remove TODO item).

src/atomic_ops/sysdeps/gcc/x86.h

index 3a3e33efd03b792a100b1a47acd7ffe6c87007c7..bed51d1ce5224270f7dfbd4d463ee709d3afcc7d 100644 (file)
@@ -25,9 +25,8 @@
 
 #include "../test_and_set_t_is_char.h"
 
-/* TODO: Test __SSE2__ macro instead of AO_USE_PENTIUM4_INSTRS. */
-#if defined(__x86_64__) && !defined(AO_USE_PENTIUM4_INSTRS)
-  /* "mfence" (SSE2) is supported on all x86_64/amd64 chips.            */
+#if defined(__SSE2__) && !defined(AO_USE_PENTIUM4_INSTRS)
+  /* "mfence" is a part of SSE2 set (introduced on Intel Pentium 4).    */
 # define AO_USE_PENTIUM4_INSTRS
 #endif