diff options
Diffstat (limited to 'nptl/sysdeps/i386')
-rw-r--r-- | nptl/sysdeps/i386/i486/pthread_spin_trylock.S | 11 | ||||
-rw-r--r-- | nptl/sysdeps/i386/tls.h | 4 |
2 files changed, 7 insertions, 8 deletions
diff --git a/nptl/sysdeps/i386/i486/pthread_spin_trylock.S b/nptl/sysdeps/i386/i486/pthread_spin_trylock.S index abda929c81..0a27312c72 100644 --- a/nptl/sysdeps/i386/i486/pthread_spin_trylock.S +++ b/nptl/sysdeps/i386/i486/pthread_spin_trylock.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -35,13 +35,12 @@ pthread_spin_trylock: xorl %ecx, %ecx LOCK cmpxchgl %ecx, (%edx) - movl $EBUSY, %edx - movl %ecx, %eax + movl $EBUSY, %eax #ifdef HAVE_CMOV - cmovnel %edx, %eax + cmovel %ecx, %eax #else - je 0f - movl %edx, %eax + jne 0f + movl %ecx, %eax 0: #endif ret diff --git a/nptl/sysdeps/i386/tls.h b/nptl/sysdeps/i386/tls.h index 5b70586f27..6fb6adca30 100644 --- a/nptl/sysdeps/i386/tls.h +++ b/nptl/sysdeps/i386/tls.h @@ -303,7 +303,7 @@ union user_desc_init /* Same as THREAD_SETMEM, but the member offset can be non-constant. */ # define THREAD_SETMEM(descr, member, value) \ ({ if (sizeof (descr->member) == 1) \ - asm volatile ("movb %0,%%gs:%P1" : \ + asm volatile ("movb %b0,%%gs:%P1" : \ : "iq" (value), \ "i" (offsetof (struct pthread, member))); \ else if (sizeof (descr->member) == 4) \ @@ -328,7 +328,7 @@ union user_desc_init /* Set member of the thread descriptor directly. */ # define THREAD_SETMEM_NC(descr, member, idx, value) \ ({ if (sizeof (descr->member[0]) == 1) \ - asm volatile ("movb %0,%%gs:%P1(%2)" : \ + asm volatile ("movb %b0,%%gs:%P1(%2)" : \ : "iq" (value), \ "i" (offsetof (struct pthread, member)), \ "r" (idx)); \ |