From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5560 invoked by alias); 5 Jul 2004 17:12:02 -0000 Mailing-List: contact libc-hacker-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sources.redhat.com Received: (qmail 5544 invoked from network); 5 Jul 2004 17:12:02 -0000 Received: from unknown (HELO sunsite.ms.mff.cuni.cz) (195.113.15.26) by sourceware.org with SMTP; 5 Jul 2004 17:12:02 -0000 Received: from sunsite.ms.mff.cuni.cz (sunsite.mff.cuni.cz [127.0.0.1]) by sunsite.ms.mff.cuni.cz (8.12.8/8.12.8) with ESMTP id i65Eum3j007025; Mon, 5 Jul 2004 16:56:48 +0200 Received: (from jakub@localhost) by sunsite.ms.mff.cuni.cz (8.12.8/8.12.8/Submit) id i65EumB8007023; Mon, 5 Jul 2004 16:56:48 +0200 Date: Mon, 05 Jul 2004 17:12:00 -0000 From: Jakub Jelinek To: Ulrich Drepper Cc: Glibc hackers Subject: [PATCH] Get rid of matching constraint does not allow a register warnings Message-ID: <20040705145648.GE5191@sunsite.ms.mff.cuni.cz> Reply-To: Jakub Jelinek Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i X-SW-Source: 2004-07/txt/msg00010.txt.bz2 Hi! 2004-07-05 Jakub Jelinek nptl/ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use constraint "m" instead of "0" for futex. linuxthreads/ * sysdeps/s390/pspinlock.c (__pthread_spin_lock, __pthread_spin_trylock): Use constraint "m" instead of "0" for futex. * sysdeps/ia64/pt-machine.h (__compare_and_swap, __compare_and_swap_with_release_semantic, testandset): Use constraint "m" instead of "0" for futex. --- libc/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h.jj 2004-03-24 12:17:01.000000000 +0100 +++ libc/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h 2004-07-05 15:47:25.369634756 +0200 @@ -272,7 +272,7 @@ extern int lll_unlock_wake_cb (int *__fu ".previous\n" \ "2:" \ : "=m" (futex), "=&D" (ignore) \ - : "0" (futex) \ + : "m" (futex) \ : "ax", "cx", "r11", "cc", "memory"); }) #endif --- libc/linuxthreads/sysdeps/s390/pspinlock.c.jj 2003-04-12 00:06:02.000000000 +0200 +++ libc/linuxthreads/sysdeps/s390/pspinlock.c 2004-07-05 15:50:53.737004225 +0200 @@ -1,5 +1,5 @@ /* POSIX spinlock implementation. S/390 version. - Copyright (C) 2000 Free Software Foundation, Inc. + Copyright (C) 2000, 2004 Free Software Foundation, Inc. Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). This file is part of the GNU C Library. @@ -39,7 +39,7 @@ __pthread_spin_lock (pthread_spinlock_t " cs 0,1,%1\n" " jl 0b\n" : "=m" (*lock) - : "0" (*lock) : "0", "1", "cc" ); + : "m" (*lock) : "0", "1", "cc" ); return 0; } weak_alias (__pthread_spin_lock, pthread_spin_lock) @@ -53,7 +53,7 @@ __pthread_spin_trylock (pthread_spinlock " basr 1,0\n" "0: cs %1,1,%0" : "=m" (*lock), "=&d" (oldval) - : "0" (*lock) : "1", "cc" ); + : "m" (*lock) : "1", "cc" ); return oldval == 0 ? 0 : EBUSY; } weak_alias (__pthread_spin_trylock, pthread_spin_trylock) --- libc/linuxthreads/sysdeps/ia64/pt-machine.h.jj 2004-03-23 15:51:13.000000000 +0100 +++ libc/linuxthreads/sysdeps/ia64/pt-machine.h 2004-07-05 15:48:55.424803303 +0200 @@ -89,7 +89,7 @@ __compare_and_swap (long int *p, long in ("mov ar.ccv=%4;;\n\t" "cmpxchg8.acq %0=%1,%2,ar.ccv" : "=r" (readval), "=m" (__atomic_fool_gcc (p)) - : "r"(newval), "1" (__atomic_fool_gcc (p)), "r" (oldval) + : "r"(newval), "m" (__atomic_fool_gcc (p)), "r" (oldval) : "memory"); return readval == oldval; } @@ -105,7 +105,7 @@ __compare_and_swap_with_release_semantic ("mov ar.ccv=%4;;\n\t" "cmpxchg8.rel %0=%1,%2,ar.ccv" : "=r" (readval), "=m" (__atomic_fool_gcc (p)) - : "r"(newval), "1" (__atomic_fool_gcc (p)), "r" (oldval) + : "r"(newval), "m" (__atomic_fool_gcc (p)), "r" (oldval) : "memory"); return readval == oldval; } @@ -121,7 +121,7 @@ testandset (int *spinlock) __asm__ __volatile__( "xchg4 %0=%1,%2" : "=r"(ret), "=m"(__atomic_fool_gcc (spinlock)) - : "r"(1), "1"(__atomic_fool_gcc (spinlock)) + : "r"(1), "m"(__atomic_fool_gcc (spinlock)) : "memory"); return ret; Jakub