mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-20 15:48:54 +02:00
Non-optimizing compile fails for two asm statements on PowerPC. Use
Fri Mar 12 15:21:22 2004 Manish Singh <yosh@gimp.org> * glib/gatomic.c: Non-optimizing compile fails for two asm statements on PowerPC. Use generic implementaton for those cases. Spotted by Christof Petig <christof@petig-baender.de>, fix by Sebastian Wilhelmi. Bug #137006 has a possible alternate solution, but we'll be conservative for now.
This commit is contained in:
committed by
Manish Singh
parent
fa3dc3e81b
commit
89242d758b
@@ -1,3 +1,11 @@
|
|||||||
|
Fri Mar 12 15:21:22 2004 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* glib/gatomic.c: Non-optimizing compile fails for two asm
|
||||||
|
statements on PowerPC. Use generic implementaton for those
|
||||||
|
cases. Spotted by Christof Petig <christof@petig-baender.de>,
|
||||||
|
fix by Sebastian Wilhelmi. Bug #137006 has a possible alternate
|
||||||
|
solution, but we'll be conservative for now.
|
||||||
|
|
||||||
Thu Mar 11 02:05:13 2004 Matthias Clasen <maclas@gmx.de>
|
Thu Mar 11 02:05:13 2004 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
* glib/gmain.c (g_main_depth): Remove an extra semicolon.
|
* glib/gmain.c (g_main_depth): Remove an extra semicolon.
|
||||||
|
@@ -1,3 +1,11 @@
|
|||||||
|
Fri Mar 12 15:21:22 2004 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* glib/gatomic.c: Non-optimizing compile fails for two asm
|
||||||
|
statements on PowerPC. Use generic implementaton for those
|
||||||
|
cases. Spotted by Christof Petig <christof@petig-baender.de>,
|
||||||
|
fix by Sebastian Wilhelmi. Bug #137006 has a possible alternate
|
||||||
|
solution, but we'll be conservative for now.
|
||||||
|
|
||||||
Thu Mar 11 02:05:13 2004 Matthias Clasen <maclas@gmx.de>
|
Thu Mar 11 02:05:13 2004 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
* glib/gmain.c (g_main_depth): Remove an extra semicolon.
|
* glib/gmain.c (g_main_depth): Remove an extra semicolon.
|
||||||
|
@@ -1,3 +1,11 @@
|
|||||||
|
Fri Mar 12 15:21:22 2004 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* glib/gatomic.c: Non-optimizing compile fails for two asm
|
||||||
|
statements on PowerPC. Use generic implementaton for those
|
||||||
|
cases. Spotted by Christof Petig <christof@petig-baender.de>,
|
||||||
|
fix by Sebastian Wilhelmi. Bug #137006 has a possible alternate
|
||||||
|
solution, but we'll be conservative for now.
|
||||||
|
|
||||||
Thu Mar 11 02:05:13 2004 Matthias Clasen <maclas@gmx.de>
|
Thu Mar 11 02:05:13 2004 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
* glib/gmain.c (g_main_depth): Remove an extra semicolon.
|
* glib/gmain.c (g_main_depth): Remove an extra semicolon.
|
||||||
|
@@ -1,3 +1,11 @@
|
|||||||
|
Fri Mar 12 15:21:22 2004 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* glib/gatomic.c: Non-optimizing compile fails for two asm
|
||||||
|
statements on PowerPC. Use generic implementaton for those
|
||||||
|
cases. Spotted by Christof Petig <christof@petig-baender.de>,
|
||||||
|
fix by Sebastian Wilhelmi. Bug #137006 has a possible alternate
|
||||||
|
solution, but we'll be conservative for now.
|
||||||
|
|
||||||
Thu Mar 11 02:05:13 2004 Matthias Clasen <maclas@gmx.de>
|
Thu Mar 11 02:05:13 2004 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
* glib/gmain.c (g_main_depth): Remove an extra semicolon.
|
* glib/gmain.c (g_main_depth): Remove an extra semicolon.
|
||||||
|
@@ -1,3 +1,11 @@
|
|||||||
|
Fri Mar 12 15:21:22 2004 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* glib/gatomic.c: Non-optimizing compile fails for two asm
|
||||||
|
statements on PowerPC. Use generic implementaton for those
|
||||||
|
cases. Spotted by Christof Petig <christof@petig-baender.de>,
|
||||||
|
fix by Sebastian Wilhelmi. Bug #137006 has a possible alternate
|
||||||
|
solution, but we'll be conservative for now.
|
||||||
|
|
||||||
Thu Mar 11 02:05:13 2004 Matthias Clasen <maclas@gmx.de>
|
Thu Mar 11 02:05:13 2004 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
* glib/gmain.c (g_main_depth): Remove an extra semicolon.
|
* glib/gmain.c (g_main_depth): Remove an extra semicolon.
|
||||||
|
@@ -1,3 +1,11 @@
|
|||||||
|
Fri Mar 12 15:21:22 2004 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* glib/gatomic.c: Non-optimizing compile fails for two asm
|
||||||
|
statements on PowerPC. Use generic implementaton for those
|
||||||
|
cases. Spotted by Christof Petig <christof@petig-baender.de>,
|
||||||
|
fix by Sebastian Wilhelmi. Bug #137006 has a possible alternate
|
||||||
|
solution, but we'll be conservative for now.
|
||||||
|
|
||||||
Thu Mar 11 02:05:13 2004 Matthias Clasen <maclas@gmx.de>
|
Thu Mar 11 02:05:13 2004 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
* glib/gmain.c (g_main_depth): Remove an extra semicolon.
|
* glib/gmain.c (g_main_depth): Remove an extra semicolon.
|
||||||
|
@@ -266,6 +266,9 @@ g_atomic_pointer_compare_and_exchange (gpointer *atomic,
|
|||||||
* and CVS version 1.3 of glibc's sysdeps/powerpc/powerpc32/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
|
* and CVS version 1.2 of glibc's sysdeps/powerpc/powerpc64/bits/atomic.h
|
||||||
*/
|
*/
|
||||||
|
# ifdef __OPTIMIZE__
|
||||||
|
/* Non-optimizing compile bails on the following two asm statements
|
||||||
|
* for reasons unknown to the author */
|
||||||
gint
|
gint
|
||||||
g_atomic_int_exchange_and_add (gint *atomic,
|
g_atomic_int_exchange_and_add (gint *atomic,
|
||||||
gint val)
|
gint val)
|
||||||
@@ -295,6 +298,29 @@ g_atomic_int_add (gint *atomic,
|
|||||||
: "b" (atomic), "r" (val), "2" (*atomic)
|
: "b" (atomic), "r" (val), "2" (*atomic)
|
||||||
: "cr0", "memory");
|
: "cr0", "memory");
|
||||||
}
|
}
|
||||||
|
# else /* !__OPTIMIZE__ */
|
||||||
|
gint
|
||||||
|
g_atomic_int_exchange_and_add (gint *atomic,
|
||||||
|
gint val)
|
||||||
|
{
|
||||||
|
gint result;
|
||||||
|
do
|
||||||
|
result = *atomic;
|
||||||
|
while (!g_atomic_int_compare_and_exchange (atomic, result, result + val));
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
g_atomic_int_add (gint *atomic,
|
||||||
|
gint val)
|
||||||
|
{
|
||||||
|
gint result;
|
||||||
|
do
|
||||||
|
result = *atomic;
|
||||||
|
while (!g_atomic_int_compare_and_exchange (atomic, result, result + val));
|
||||||
|
}
|
||||||
|
# endif /* !__OPTIMIZE__ */
|
||||||
|
|
||||||
# if GLIB_SIZEOF_VOID_P == 4 /* 32-bit system */
|
# if GLIB_SIZEOF_VOID_P == 4 /* 32-bit system */
|
||||||
gboolean
|
gboolean
|
||||||
|
Reference in New Issue
Block a user