This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Get rid of matching constraint does not allow a register warnings


Hi!

2004-07-05  Jakub Jelinek  <jakub@redhat.com>

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]