From d0145e03799e484f3a53d79de3b3f34162ee9d3c Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Mon, 24 Apr 2006 08:55:46 +0000 Subject: Updated to fedora-glibc-20060424T0820 --- .../unix/sysv/linux/i386/i486/libc-lowlevellock.S | 2 +- nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S | 2 +- .../unix/sysv/linux/i386/i486/pthread_barrier_wait.S | 6 +++--- nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S | 8 ++++---- nptl/sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S | 2 +- nptl/sysdeps/unix/sysv/linux/i386/i486/sem_wait.S | 2 +- nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h | 8 ++++---- nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h | 16 +++++++++++++++- 8 files changed, 30 insertions(+), 16 deletions(-) (limited to 'nptl/sysdeps/unix/sysv') diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S index 223b111083..88885b735d 100644 --- a/nptl/sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S +++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S @@ -22,7 +22,7 @@ #ifndef UP # define LOCK \ cmpl $0, %gs:MULTIPLE_THREADS_OFFSET; \ - je,pt 0f; \ + je 0f; \ lock; \ 0: #endif diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S index 9acd81ae5a..e2da5b04cf 100644 --- a/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S +++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S @@ -67,7 +67,7 @@ __lll_mutex_lock_wait: xchgl %eax, (%ebx) /* NB: lock is implied */ testl %eax, %eax - jnz,pn 1b + jnz 1b popl %esi cfi_adjust_cfa_offset(-4) diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S index 114284c44c..fe7a8b9c66 100644 --- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S +++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S @@ -82,7 +82,7 @@ pthread_barrier_wait: #else cmpl %edx, CURR_EVENT(%ebx) #endif - je,pn 8b + je 8b /* Increment LEFT. If this brings the count back to the initial count unlock the object. */ @@ -92,7 +92,7 @@ pthread_barrier_wait: xaddl %edx, LEFT(%ebx) subl $1, %ecx cmpl %ecx, %edx - jne,pt 10f + jne 10f /* Release the mutex. We cannot release the lock before waking the waiting threads since otherwise a new thread might @@ -131,7 +131,7 @@ pthread_barrier_wait: xaddl %edx, LEFT(%ebx) subl $1, %ecx cmpl %ecx, %edx - jne,pt 5f + jne 5f /* Release the mutex. We cannot release the lock before waking the waiting threads since otherwise a new thread might diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S index 318b53a873..aa1f9f41ca 100644 --- a/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S +++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S @@ -49,12 +49,12 @@ sem_timedwait: movl (%ecx), %eax 2: testl %eax, %eax - je,pn 1f + je 1f leal -1(%eax), %edx LOCK cmpxchgl %edx, (%ecx) - jne,pn 2b + jne 2b xorl %eax, %eax ret @@ -117,7 +117,7 @@ sem_timedwait: call __pthread_disable_asynccancel testl %esi, %esi - je,pt 9f + je 9f cmpl $-EWOULDBLOCK, %esi jne 3f @@ -128,7 +128,7 @@ sem_timedwait: leal -1(%eax), %ecx LOCK cmpxchgl %ecx, (%ebx) - jne,pn 8b + jne 8b addl $12, %esp cfi_adjust_cfa_offset(-12) diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S index d36a1088fb..fbc3b3c932 100644 --- a/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S +++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S @@ -42,7 +42,7 @@ __new_sem_trywait: leal -1(%eax), %edx LOCK cmpxchgl %edx, (%ecx) - jne,pn 2b + jne 2b xorl %eax, %eax ret diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_wait.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_wait.S index 3e908aef9c..b1296275d0 100644 --- a/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_wait.S +++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_wait.S @@ -62,7 +62,7 @@ __new_sem_wait: leal -1(%eax), %edx LOCK cmpxchgl %edx, (%ebx) - jne,pn 2b + jne 2b xorl %eax, %eax movl 4(%esp), %esi diff --git a/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h b/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h index 23e81f4e4b..e405f84f25 100644 --- a/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h +++ b/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h @@ -474,7 +474,7 @@ extern int lll_unlock_wake_cb (int *__futex) attribute_hidden; # define lll_trylock(futex) \ ({ unsigned char ret; \ __asm __volatile ("cmpl $0, %%gs:%P5\n\t" \ - "je,pt 0f\n\t" \ + "je 0f\n\t" \ "lock\n" \ "0:\tcmpxchgl %2, %1; setne %0" \ : "=a" (ret), "=m" (futex) \ @@ -488,7 +488,7 @@ extern int lll_unlock_wake_cb (int *__futex) attribute_hidden; # define lll_lock(futex) \ (void) ({ int ignore1, ignore2; \ __asm __volatile ("cmpl $0, %%gs:%P6\n\t" \ - "je,pt 0f\n\t" \ + "je 0f\n\t" \ "lock\n" \ "0:\tcmpxchgl %1, %2\n\t" \ "jnz _L_lock_%=\n\t" \ @@ -511,7 +511,7 @@ extern int lll_unlock_wake_cb (int *__futex) attribute_hidden; # define lll_unlock(futex) \ (void) ({ int ignore; \ __asm __volatile ("cmpl $0, %%gs:%P3\n\t" \ - "je,pt 0f\n\t" \ + "je 0f\n\t" \ "lock\n" \ "0:\tsubl $1,%0\n\t" \ "jne _L_unlock_%=\n\t" \ @@ -551,7 +551,7 @@ extern int lll_unlock_wake_cb (int *__futex) attribute_hidden; "1:\tmovl %1, %%eax\n\t" \ LLL_ENTER_KERNEL \ "cmpl $0, (%%ebx)\n\t" \ - "jne,pn 1b\n\t" \ + "jne 1b\n\t" \ LLL_EBX_LOAD \ : "=&a" (__ignore) \ : "i" (SYS_futex), LLL_EBX_REG (&tid), "S" (0), \ diff --git a/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h b/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h index fcc1240fef..abd019df47 100644 --- a/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h +++ b/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h @@ -110,7 +110,21 @@ # define __lll_rel_instr "" #else # define __lll_acq_instr "isync" -# define __lll_rel_instr "sync" +# ifdef _ARCH_PWR4 +/* + * Newer powerpc64 processors support the new "light weight" sync (lwsync) + * So if the build is using -mcpu=[power4,power5,power5+,970] we can + * safely use lwsync. + */ +# define __lll_rel_instr "lwsync" +# else +/* + * Older powerpc32 processors don't support the new "light weight" + * sync (lwsync). So the only safe option is to use normal sync + * for all powerpc32 applications. + */ +# define __lll_rel_instr "sync" +# endif #endif /* Set *futex to ID if it is 0, atomically. Returns the old value */ -- cgit 1.4.1