Re: glib CVS HEAD does not compile on powerpc (gatomic asm problem)
- From: Manish Singh <yosh gimp org>
- To: Sebastian Wilhelmi <seppi seppi de>
- Cc: Christof Petig <christof petig-baender de>, gtk-devel-list gnome org
- Subject: Re: glib CVS HEAD does not compile on powerpc (gatomic asm problem)
- Date: Fri, 12 Mar 2004 01:56:42 -0800
On Fri, Mar 12, 2004 at 10:37:29AM +0100, Sebastian Wilhelmi wrote:
> Moin Christof,
>
> > On my G3 I get
> >
> > gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -DG_LOG_DOMAIN=\"GLib\"
> > -DG_ENABLE_DEBUG -DG_DISABLE_DEPRECATED -DGLIB_COMPILATION -pthread
> > -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
>
> http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/powerpc/bits/atomic.h?rev=1.12&content-type=text/x-cvsweb-markup&cvsroot=glibc
>
> This of course doesn't solve your problems ;-) But as they might have
> the same problems on your platforms, maybe we could ask them.
Current CVS builds for me on OS X with gcc 3.3 and RH with gcc 3.2.3. So
what version of gcc and what platform are you using?
-Yosh
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]