This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
PATCH: Replace movq/%q0 with mov/%0 in THREAD_SELF
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Date: Fri, 11 May 2012 08:27:57 -0700
- Subject: PATCH: Replace movq/%q0 with mov/%0 in THREAD_SELF
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
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;})