aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2012-05-15 10:20:15 -0700
committerH.J. Lu <hjl.tools@gmail.com>2012-05-15 10:20:15 -0700
commit30996e936976ebb9fb2895e6c7e9723077927b07 (patch)
tree736769ea5b8bc24771e6d3f9d9201cc77051e61d
parent289ac4352aa9ac63474e03022a5ad395d8346ee5 (diff)
downloadglibc-30996e936976ebb9fb2895e6c7e9723077927b07.zip
glibc-30996e936976ebb9fb2895e6c7e9723077927b07.tar.gz
glibc-30996e936976ebb9fb2895e6c7e9723077927b07.tar.bz2
Use LP_OP(cmp) and RCX_LP on dep_mutex pointer
-rw-r--r--nptl/ChangeLog5
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S12
2 files changed, 11 insertions, 6 deletions
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 68bae39..a7f93b5 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,5 +1,10 @@
2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
+ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Use
+ LP_OP(cmp) and R8_LP on dep_mutex pointer.
+
+2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
+
* 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/pthread_cond_broadcast.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
index 0db3af1..7b0eec1 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
@@ -59,14 +59,14 @@ __pthread_cond_broadcast:
incl broadcast_seq-cond_futex(%rdi)
/* Get the address of the mutex used. */
- movq dep_mutex-cond_futex(%rdi), %r8
+ mov dep_mutex-cond_futex(%rdi), %R8_LP
/* Unlock. */
LOCK
decl cond_lock-cond_futex(%rdi)
jne 7f
-8: cmpq $-1, %r8
+8: cmp $-1, %R8_LP
je 9f
/* Do not use requeue for pshared condvars. */
@@ -128,7 +128,7 @@ __pthread_cond_broadcast:
#if cond_lock != 0
addq $cond_lock, %rdi
#endif
- cmpq $-1, dep_mutex-cond_lock(%rdi)
+ LP_OP(cmp) $-1, dep_mutex-cond_lock(%rdi)
movl $LLL_PRIVATE, %eax
movl $LLL_SHARED, %esi
cmovne %eax, %esi
@@ -140,7 +140,7 @@ __pthread_cond_broadcast:
/* Unlock in loop requires wakeup. */
5: addq $cond_lock-cond_futex, %rdi
- cmpq $-1, dep_mutex-cond_lock(%rdi)
+ LP_OP(cmp) $-1, dep_mutex-cond_lock(%rdi)
movl $LLL_PRIVATE, %eax
movl $LLL_SHARED, %esi
cmovne %eax, %esi
@@ -149,7 +149,7 @@ __pthread_cond_broadcast:
/* Unlock in loop requires wakeup. */
7: addq $cond_lock-cond_futex, %rdi
- cmpq $-1, %r8
+ cmp $-1, %R8_LP
movl $LLL_PRIVATE, %eax
movl $LLL_SHARED, %esi
cmovne %eax, %esi
@@ -158,7 +158,7 @@ __pthread_cond_broadcast:
jmp 8b
9: /* The futex requeue functionality is not available. */
- cmpq $-1, %r8
+ cmp $-1, %R8_LP
movl $0x7fffffff, %edx
#ifdef __ASSUME_PRIVATE_FUTEX
movl $FUTEX_WAKE, %eax