/* FIXME: We should get gcc to allocate one of the condition */ /* registers. I always got "impossible constraint" when I */ /* tried the "y" constraint. */ /* you cannot assign a condition register to any C variable, you can use the "x" and "y" constrints internally to GCC only. */ __asm__ __volatile__ ( "lwz%U1%X1 %0,%1\n" "cmpw cr7,%0,%0\n" "bne- cr7,1f\n" "1: isync\n" : "=r" (result) : "m"(*addr) : "memory", "cc"); // i don't think you need the "memory" clobber here // maybe you want it to prevent reordering but it's not good // enough for that return result;