[Gc] Re: libatomic-ops PowerPC testcase failure with gcc 4.3

Thiemo Seufer ths at networkno.de
Sun Aug 17 10:16:16 PDT 2008


Ian Wienand wrote:
> Hi,
> 
> >From [1], the test suite is hitting
> 
> ---
> Assertion failed test_atomic_include.h:475 (barrier: _acquire)
> FAIL: test_atomic
> ---
> 
> Thiemo suggests the patch below, taken from information at [2].  Based
> on what I learnt from [3] it seems OK to me, but I'm far from a
> PowerPC expert.
> 
> Thanks,
> 
> -i
> 
> [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=495211
> [2] http://gcc.gnu.org/ml/gcc/2008-03/msg01094.html
> [3] http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33171
> 
> --- ../libatomic-ops-1.2/src/atomic_ops/sysdeps/gcc/powerpc.h	2006-03-29
> 09:49:14.000000000 +1100
> +++ src/atomic_ops/sysdeps/gcc/powerpc.h	2007-08-27 10:51:00.000000000 +1000
> @@ -72,7 +72,7 @@
>    /* registers.  I always got "impossible constraint" when I	*/
>    /* tried the "y" constraint.					*/
>    __asm__ __volatile__ (
> -    "lwz %0,%1\n"
> +    "lwz%U1%X1 %0,%1\n"

FYI, your latest upload still fails because it misses the %U1 part.
It works for me with the appended patch.

(Btw, as we are in a release freeze it probably makes sense to provide
a version with just this change via testing-proposed-updates. I feel
that's worth asking on debian-release.)


Thiemo


--- libatomic-ops-1.2+cvs20080815.orig/src/atomic_ops/sysdeps/gcc/powerpc.h	2008-07-19 00:45:13.000000000 +0200
+++ libatomic-ops-1.2+cvs20080815/src/atomic_ops/sysdeps/gcc/powerpc.h	2008-08-17 19:08:44.000000000 +0200
@@ -92,7 +92,7 @@ AO_load_acquire(const volatile AO_t *add
   /* registers.  I always got "impossible constraint" when I	*/
   /* tried the "y" constraint.					*/
   __asm__ __volatile__ (
-    "lwz%X1 %0,%1\n"
+    "lwz%U1%X1 %0,%1\n"
     "cmpw cr7,%0,%0\n"
     "bne- cr7,1f\n"
     "1: isync\n"


More information about the Gc mailing list