Re: glib CVS HEAD does not compile on powerpc (gatomic asm problem)

Moin Christof,

> On my G3 I get
>   gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -DG_LOG_DOMAIN=\"GLib\" 
> -Wall -mcpu=750 -pipe -MT gatomic.lo -MD -MP -MF .deps/gatomic.Tpo -c 
> gatomic.c  -fPIC -DPIC -o .libs/gatomic.o
> gatomic.c: In function `g_atomic_int_exchange_and_add':
> gatomic.c:274: error: inconsistent operand constraints in an `asm'
> But I'm too ignorant of powerpc asm magic to fix it myself.
>     Christof
> PS: The code in question is
>    __asm __volatile ("1:       lwarx   %0,0,%3\n"
>                      "         add     %1,%0,%4\n"
>                      "         stwcx.  %1,0,%3\n"
>                      "         bne-    1b"
>                      : "=&b" (result), "=&r" (temp), "=m" (*atomic)
>                      : "b" (atomic), "r" (val), "2" (*atomic)
>                      : "cr0", "memory");

Hm, I just tested it again on the sourceforge compile farm's G4 (OSX)
and it works there. They are using gcc version-2.95. Maybe the new gcc
versions don't like the old constraints anymore, or the G3 needs other? 

Anyway the code was copied from glibc. See

This of course doesn't solve your problems ;-) But as they might have
the same problems on your platforms, maybe we could ask them. 

Where is your glibc from? Debian? The we could check the debian
diff-file for glibc.

Sebastian Wilhelmi                 |            här ovanför alla molnen
mailto:seppi seppi de              |     är himmlen så förunderligt blå                    |

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]