Revised processor-specific hints for back-off
[libcds.git] / cds / compiler / gcc / x86 / backoff.h
index 777bac049bed90fd922a48f40560d4ba363f4b00..30324066493e8d945e19b55e69967887b6b693c0 100644 (file)
 namespace cds { namespace backoff {
     namespace gcc { namespace x86 {
 
-#       define CDS_backoff_pause_defined
-        static inline void backoff_pause( unsigned int nLoop = 0x000003FF )
-        {
-            asm volatile (
-                "andl %[nLoop], %%ecx;      \n\t"
-                "cmovzl %[nLoop], %%ecx;    \n\t"
-                "rep; "
-                "nop;   \n\t"
-                : /*no output*/
-                : [nLoop] "r" (nLoop)
-                : "ecx", "cc"
-                );
-        }
-
 #       define CDS_backoff_nop_defined
         static inline void backoff_nop()
         {
             asm volatile ( "nop;" );
         }
 
+#       define CDS_backoff_hint_defined
+        static inline void backoff_hint()
+        {
+            asm volatile ( "pause;" );
+        }
+
+
     }} // namespace gcc::x86
 
     namespace platform {