3 # Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
6 --- glibc-2.2.5/sysdeps/powerpc/atomicity.h~glibc-2.2.5-ppc405erratum77.patch 2004-09-03 19:00:33.000000000 -0500
7 +++ glibc-2.2.5/sysdeps/powerpc/atomicity.h 2004-09-03 19:00:38.000000000 -0500
9 # define __ATOMICITY_INLINE inline
13 +/* workaround for PPC405 erratum #77 - Mark Hatle, dank. References:
14 + http://www-3.ibm.com/chips/techlib/techlib.nsf/techdocs/89DED00DEBFF54BF87256A8000491BA2/$file/405CR_C_errata_1_2.pdf
15 + http://ppc.bkbits.net:8080/linuxppc_2_4_devel/cset@1.489
16 + http://www.kegel.com/xgcc3/ppc405erratum77.html
17 + FIXME: using dbct instead of sync would be faster */
18 +#define __LIBC_PPC405_ERR77_SYNC "sync \n\t"
20 +#define __LIBC_PPC405_ERR77_SYNC
23 static __ATOMICITY_INLINE int
24 __attribute__ ((unused))
25 exchange_and_add (volatile uint32_t *mem, int val)
30 + " __LIBC_PPC405_ERR77_SYNC "\n\
33 " : "=&b"(result), "=&r"(tmp) : "r" (mem), "Ir"(val) : "cr0", "memory");
38 + " __LIBC_PPC405_ERR77_SYNC "\n\
41 " : "=&b"(tmp) : "r" (mem), "Ir"(val) : "cr0", "memory");
46 + " __LIBC_PPC405_ERR77_SYNC "\n\
54 + " __LIBC_PPC405_ERR77_SYNC "\n\
57 " : "=&r"(result) : "r"(p), "r"(newval) : "cr0", "memory");
62 + " __LIBC_PPC405_ERR77_SYNC "\n\