22 lines
1.1 KiB
Diff
22 lines
1.1 KiB
Diff
--- mono-131222-orig/libgc/include/private/gc_locks.h 2009-02-03 19:00:12.000000000 -0500
|
|
+++ mono-131222-patched/libgc/include/private/gc_locks.h 2009-04-09 15:20:11.000000000 -0400
|
|
@@ -160,15 +160,15 @@
|
|
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;
|
|
}
|