Commit dc6f720c authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

Don't use local numeric labels in inline assembler on AIX. (#316434, Hans

2006-12-11  Matthias Clasen  <mclasen@redhat.com>

        * glib/gatomic.c: Don't use local numeric labels in
        inline assembler on AIX.  (#316434, Hans Rosenfeld)
parent 15df020d
2006-12-11 Matthias Clasen <mclasen@redhat.com>
* glib/gatomic.c: Don't use local numeric labels in
inline assembler on AIX. (#316434, Hans Rosenfeld)
* glib/gunicode.h (g_utf8_next_char): Cast to const char *,
not char *. (#138153, Nikolai Weibull)
......
......@@ -276,10 +276,10 @@ g_atomic_int_exchange_and_add (volatile gint *atomic,
gint val)
{
gint result, temp;
__asm__ __volatile__ ("1: lwarx %0,0,%3\n"
__asm__ __volatile__ (".Lieaa%=: lwarx %0,0,%3\n"
" add %1,%0,%4\n"
" stwcx. %1,0,%3\n"
" bne- 1b"
" bne- .Lieaa%="
: "=&b" (result), "=&r" (temp), "=m" (*atomic)
: "b" (atomic), "r" (val), "m" (*atomic)
: "cr0", "memory");
......@@ -292,10 +292,10 @@ g_atomic_int_add (volatile gint *atomic,
gint val)
{
gint result, temp;
__asm__ __volatile__ ("1: lwarx %0,0,%3\n"
__asm__ __volatile__ (".Lia%=: lwarx %0,0,%3\n"
" add %1,%0,%4\n"
" stwcx. %1,0,%3\n"
" bne- 1b"
" bne- .Lia%="
: "=&b" (result), "=&r" (temp), "=m" (*atomic)
: "b" (atomic), "r" (val), "m" (*atomic)
: "cr0", "memory");
......@@ -332,12 +332,12 @@ g_atomic_int_compare_and_exchange (volatile gint *atomic,
{
gint result;
__asm__ __volatile__ ("sync\n"
"1: lwarx %0,0,%1\n"
".L1icae%=: lwarx %0,0,%1\n"
" subf. %0,%2,%0\n"
" bne 2f\n"
" bne .L2icae%=\n"
" stwcx. %3,0,%1\n"
" bne- 1b\n"
"2: isync"
" bne- .L1icae%=\n"
".L2icae%=: isync"
: "=&r" (result)
: "b" (atomic), "r" (oldval), "r" (newval)
: "cr0", "memory");
......@@ -351,12 +351,12 @@ g_atomic_pointer_compare_and_exchange (volatile gpointer *atomic,
{
gpointer result;
__asm__ __volatile__ ("sync\n"
"1: lwarx %0,0,%1\n"
".L1pcae%=: lwarx %0,0,%1\n"
" subf. %0,%2,%0\n"
" bne 2f\n"
" bne .L2pcae%=\n"
" stwcx. %3,0,%1\n"
" bne- 1b\n"
"2: isync"
" bne- .L1pcae%=\n"
".L2pcae%=: isync"
: "=&r" (result)
: "b" (atomic), "r" (oldval), "r" (newval)
: "cr0", "memory");
......@@ -370,13 +370,13 @@ g_atomic_int_compare_and_exchange (volatile gint *atomic,
{
gpointer result;
__asm__ __volatile__ ("sync\n"
"1: lwarx %0,0,%1\n"
".L1icae%=: lwarx %0,0,%1\n"
" extsw %0,%0\n"
" subf. %0,%2,%0\n"
" bne 2f\n"
" bne .L2icae%=\n"
" stwcx. %3,0,%1\n"
" bne- 1b\n"
"2: isync"
" bne- .L1icae%=\n"
".L2icae%=: isync"
: "=&r" (result)
: "b" (atomic), "r" (oldval), "r" (newval)
: "cr0", "memory");
......@@ -390,12 +390,12 @@ g_atomic_pointer_compare_and_exchange (volatile gpointer *atomic,
{
gpointer result;
__asm__ __volatile__ ("sync\n"
"1: ldarx %0,0,%1\n"
".L1pcae%=: ldarx %0,0,%1\n"
" subf. %0,%2,%0\n"
" bne 2f\n"
" bne .L2pcae%=\n"
" stdcx. %3,0,%1\n"
" bne- 1b\n"
"2: isync"
" bne- .L1pcae%=\n"
".L2pcae%=: isync"
: "=&r" (result)
: "b" (atomic), "r" (oldval), "r" (newval)
: "cr0", "memory");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment