From 181d7721b2be1aa0a0ae5a3a2f04cb49149dad44 Mon Sep 17 00:00:00 2001 From: Manish Singh Date: Sun, 6 Feb 2005 20:25:42 +0000 Subject: [PATCH] Don't use matching constraints for asm mem parameters. This makes the code Sun Feb 6 12:09:55 2005 Manish Singh * glib/gatomic.c: Don't use matching constraints for asm mem parameters. This makes the code match with current glibc, and quiets some warnings with gcc 3.4. --- ChangeLog | 6 ++++++ ChangeLog.pre-2-10 | 6 ++++++ ChangeLog.pre-2-12 | 6 ++++++ ChangeLog.pre-2-8 | 6 ++++++ glib/gatomic.c | 10 +++++----- 5 files changed, 29 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8b02addf2..b0a7047cf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Sun Feb 6 12:09:55 2005 Manish Singh + + * glib/gatomic.c: Don't use matching constraints for asm mem + parameters. This makes the code match with current glibc, and + quiets some warnings with gcc 3.4. + 2005-02-05 Tor Lillqvist * configure.in (G_LIBS_EXTRA) diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 8b02addf2..b0a7047cf 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +Sun Feb 6 12:09:55 2005 Manish Singh + + * glib/gatomic.c: Don't use matching constraints for asm mem + parameters. This makes the code match with current glibc, and + quiets some warnings with gcc 3.4. + 2005-02-05 Tor Lillqvist * configure.in (G_LIBS_EXTRA) diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 8b02addf2..b0a7047cf 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,9 @@ +Sun Feb 6 12:09:55 2005 Manish Singh + + * glib/gatomic.c: Don't use matching constraints for asm mem + parameters. This makes the code match with current glibc, and + quiets some warnings with gcc 3.4. + 2005-02-05 Tor Lillqvist * configure.in (G_LIBS_EXTRA) diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 8b02addf2..b0a7047cf 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +Sun Feb 6 12:09:55 2005 Manish Singh + + * glib/gatomic.c: Don't use matching constraints for asm mem + parameters. This makes the code match with current glibc, and + quiets some warnings with gcc 3.4. + 2005-02-05 Tor Lillqvist * configure.in (G_LIBS_EXTRA) diff --git a/glib/gatomic.c b/glib/gatomic.c index a8aca71b7..d4af38994 100644 --- a/glib/gatomic.c +++ b/glib/gatomic.c @@ -264,9 +264,9 @@ g_atomic_pointer_compare_and_exchange (gpointer *atomic, } # elif defined (G_ATOMIC_POWERPC) -/* Adapted from CVS version 1.12 of glibc's sysdeps/powerpc/bits/atomic.h - * and CVS version 1.3 of glibc's sysdeps/powerpc/powerpc32/bits/atomic.h - * and CVS version 1.2 of glibc's sysdeps/powerpc/powerpc64/bits/atomic.h +/* Adapted from CVS version 1.16 of glibc's sysdeps/powerpc/bits/atomic.h + * and CVS version 1.4 of glibc's sysdeps/powerpc/powerpc32/bits/atomic.h + * and CVS version 1.7 of glibc's sysdeps/powerpc/powerpc64/bits/atomic.h */ # ifdef __OPTIMIZE__ /* Non-optimizing compile bails on the following two asm statements @@ -281,7 +281,7 @@ g_atomic_int_exchange_and_add (gint *atomic, " stwcx. %1,0,%3\n" " bne- 1b" : "=&b" (result), "=&r" (temp), "=m" (*atomic) - : "b" (atomic), "r" (val), "2" (*atomic) + : "b" (atomic), "r" (val), "m" (*atomic) : "cr0", "memory"); return result; } @@ -297,7 +297,7 @@ g_atomic_int_add (gint *atomic, " stwcx. %1,0,%3\n" " bne- 1b" : "=&b" (result), "=&r" (temp), "=m" (*atomic) - : "b" (atomic), "r" (val), "2" (*atomic) + : "b" (atomic), "r" (val), "m" (*atomic) : "cr0", "memory"); } # else /* !__OPTIMIZE__ */