+2009-04-10 Zoltan Varga <vargaz@gmail.com>
+
+ * include/private/gc_locks.h (GC_test_and_set): Merge a change from libgc
+ 7.1's libatomic-ops to fix the ppc build with gcc 4.4.
+
2009-02-23 Zoltan Varga <vargaz@gmail.com>
* os_dep.c (GC_init_linux_data_start): Avoid the call to GC_find_limit ()
int temp = 1; /* locked value */
__asm__ __volatile__(
- "1:\tlwarx %0,0,%3\n" /* load and reserve */
+ "1:\tlwarx %0,0,%1\n" /* load and reserve */
"\tcmpwi %0, 0\n" /* if load is */
"\tbne 2f\n" /* non-zero, return already set */
"\tstwcx. %2,0,%1\n" /* else store conditional */
"\tbne- 1b\n" /* retry if lost reservation */
"\tsync\n" /* import barrier */
"2:\t\n" /* oldval is zero if we set */
- : "=&r"(oldval), "=p"(addr)
- : "r"(temp), "1"(addr)
+ : "=&r"(oldval)
+ : "r"(addr), "r"(temp)
: "cr0","memory");
return oldval;
}