PATCH: Replace movq/%q0 with mov/%0 in THREAD_SELF

H.J. Lu hongjiu.lu@intel.com
Fri May 11 15:28:00 GMT 2012


Hi,

Assembler can figure out the operand size from the register name.  This
patch replaces movq/%q0 with mov/%0 in THREAD_SELF.  Tested on Linux/x32
and Linux/x86-64.  OK to install?

Thanks.

H.J.
--
	* sysdeps/x86_64/tls.h (THREAD_SELF): Replace movq/%q0 with
	mov/%0.

diff --git a/nptl/sysdeps/x86_64/tls.h b/nptl/sysdeps/x86_64/tls.h
index 454c66a..1f0e991 100644
--- a/nptl/sysdeps/x86_64/tls.h
+++ b/nptl/sysdeps/x86_64/tls.h
@@ -174,7 +177,7 @@ typedef struct
    do not get optimized away.  */
 # define THREAD_SELF \
   ({ struct pthread *__self;						      \
-     asm ("movq %%fs:%c1,%q0" : "=r" (__self)				      \
+     asm ("mov %%fs:%c1,%0" : "=r" (__self)				      \
 	  : "i" (offsetof (struct pthread, header.self)));	 	      \
      __self;})
 



More information about the Libc-alpha mailing list