Use LP_OP(cmp), R*_LP, LP_SIZE and ASM_ADDR
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 15 May 2012 17:21:32 +0000 (10:21 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 15 May 2012 17:21:32 +0000 (10:21 -0700)
nptl/ChangeLog
nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S

index a7f93b5953179b8157812a23c624bd2ea1140fb6..5580286064cc5d515116a9b9c851e00575163829 100644 (file)
@@ -1,3 +1,11 @@
+2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Use
+       LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer.  Load
+       __vdso_clock_gettime pointer into RAX_LP.
+       (__gcc_personality_v0): Replace 8-byte data alignment with
+       LP_SIZE alignment and .quad with ASM_ADDR.
+
 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
 
        * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Use
index cdc2bf68b07684a5cb4e640f120ec7db78dd7f3c..79bfecdbf295795b7e7d969aa7d54d1a94ae68f4 100644 (file)
@@ -89,7 +89,7 @@ __pthread_cond_timedwait:
                    +--------------------------+
        */
 
-       cmpq    $-1, dep_mutex(%rdi)
+       LP_OP(cmp) $-1, dep_mutex(%rdi)
 
        /* Prepare structure passed to cancellation handler.  */
        movq    %rdi, 8(%rsp)
@@ -97,7 +97,7 @@ __pthread_cond_timedwait:
        movq    %rdx, %r13
 
        je      22f
-       movq    %rsi, dep_mutex(%rdi)
+       mov     %RSI_LP, dep_mutex(%rdi)
 
 22:
        xorl    %r15d, %r15d
@@ -163,10 +163,10 @@ __pthread_cond_timedwait:
 
        movq    %r13, %r10
        movl    $FUTEX_WAIT_BITSET, %esi
-       cmpq    $-1, dep_mutex(%rdi)
+       LP_OP(cmp) $-1, dep_mutex(%rdi)
        je      60f
 
-       movq    dep_mutex(%rdi), %r8
+       mov     dep_mutex(%rdi), %R8_LP
        /* Requeue to a non-robust PI mutex if the PI bit is set and
        the robust bit is not set.  */
        movl    MUTEX_KIND(%r8), %eax
@@ -268,7 +268,7 @@ __pthread_cond_timedwait:
        jne     55f
 
        addq    $cond_nwaiters, %rdi
-       cmpq    $-1, dep_mutex-cond_nwaiters(%rdi)
+       LP_OP(cmp) $-1, dep_mutex-cond_nwaiters(%rdi)
        movl    $1, %edx
 #ifdef __ASSUME_PRIVATE_FUTEX
        movl    $FUTEX_WAKE, %eax
@@ -331,7 +331,7 @@ __pthread_cond_timedwait:
 #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
@@ -343,7 +343,7 @@ __pthread_cond_timedwait:
 #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
@@ -355,7 +355,7 @@ __pthread_cond_timedwait:
 #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
@@ -370,7 +370,7 @@ __pthread_cond_timedwait:
 #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
@@ -391,7 +391,7 @@ __pthread_cond_timedwait:
 #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
@@ -446,9 +446,9 @@ __pthread_cond_timedwait:
           kernel.  */
        leaq    32(%rsp), %rsi
 #  ifdef SHARED
-       movq    __vdso_clock_gettime@GOTPCREL(%rip), %rax
-       movq    (%rax), %rax
-       PTR_DEMANGLE (%rax)
+       mov     __vdso_clock_gettime@GOTPCREL(%rip), %RAX_LP
+       mov     (%rax), %RAX_LP
+       PTR_DEMANGLE (%RAX_LP)
        call    *%rax
 #  else
        movl    $__NR_clock_gettime, %eax
@@ -508,7 +508,7 @@ __pthread_cond_timedwait:
        movl    %eax, (%rsp)
 
        leaq    32(%rsp), %r10
-       cmpq    $-1, dep_mutex(%rdi)
+       LP_OP(cmp) $-1, dep_mutex(%rdi)
        movq    %r12, %rdx
 # ifdef __ASSUME_PRIVATE_FUTEX
        movl    $FUTEX_WAIT, %eax
@@ -568,7 +568,7 @@ __pthread_cond_timedwait:
 # 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
@@ -580,7 +580,7 @@ __pthread_cond_timedwait:
 # 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
@@ -592,7 +592,7 @@ __pthread_cond_timedwait:
 # 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
@@ -675,7 +675,7 @@ __condvar_cleanup2:
 #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
@@ -708,7 +708,7 @@ __condvar_cleanup2:
        andl    $~((1 << nwaiters_shift) - 1), %eax
        jne     4f
 
-       cmpq    $-1, dep_mutex(%rdi)
+       LP_OP(cmp) $-1, dep_mutex(%rdi)
        leaq    cond_nwaiters(%rdi), %rdi
        movl    $1, %edx
 #ifdef __ASSUME_PRIVATE_FUTEX
@@ -736,7 +736,7 @@ __condvar_cleanup2:
 #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
@@ -746,7 +746,7 @@ __condvar_cleanup2:
 2:     testq   %r12, %r12
        jnz     5f
        addq    $cond_futex, %rdi
-       cmpq    $-1, dep_mutex-cond_futex(%rdi)
+       LP_OP(cmp) $-1, dep_mutex-cond_futex(%rdi)
        movl    $0x7fffffff, %edx
 #ifdef __ASSUME_PRIVATE_FUTEX
        movl    $FUTEX_WAKE, %eax
@@ -805,9 +805,9 @@ __condvar_cleanup2:
        .hidden DW.ref.__gcc_personality_v0
        .weak   DW.ref.__gcc_personality_v0
        .section .gnu.linkonce.d.DW.ref.__gcc_personality_v0,"aw",@progbits
-       .align  8
+       .align  LP_SIZE
        .type   DW.ref.__gcc_personality_v0, @object
-       .size   DW.ref.__gcc_personality_v0, 8
+       .size   DW.ref.__gcc_personality_v0, LP_SIZE
 DW.ref.__gcc_personality_v0:
-       .quad   __gcc_personality_v0
+       ASM_ADDR __gcc_personality_v0
 #endif