This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
PATCH: Use LP_OP(mov) and RDI_LP on pointer
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Date: Tue, 15 May 2012 08:48:56 -0700
- Subject: PATCH: Use LP_OP(mov) and RDI_LP on pointer
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
Hi,
This patch uses LP_OP(mov) to update pointer in memory and loads pointer
into RDI_LP. Tested on Linux/x86-64. OK to install?
Thanks.
H.J.
* sysdeps/unix/sysv/linux/x86_64/cancellation.S: Use LP_OP(mov)
to update pointer in memory. Load pointer into RDI_LP.
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S b/nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S
index d7c7e80..31bb08b 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S
@@ -72,10 +72,10 @@ ENTRY(__pthread_enable_asynccancel)
3: subq $8, %rsp
cfi_adjust_cfa_offset(8)
- movq $TCB_PTHREAD_CANCELED, %fs:RESULT
+ LP_OP(mov) $TCB_PTHREAD_CANCELED, %fs:RESULT
lock
orl $TCB_EXITING_BITMASK, %fs:CANCELHANDLING
- movq %fs:CLEANUP_JMP_BUF, %rdi
+ mov %fs:CLEANUP_JMP_BUF, %RDI_LP
#ifdef SHARED
call __pthread_unwind@PLT
#else
@@ -106,7 +106,7 @@ ENTRY(__pthread_disable_asynccancel)
/* Performance doesn't matter in this loop. We will
delay until the thread is canceled. And we will unlikely
enter the loop twice. */
-4: movq %fs:0, %rdi
+4: mov %fs:0, %RDI_LP
movl $__NR_futex, %eax
xorq %r10, %r10
addq $CANCELHANDLING, %rdi