From e45d384565ac317984b4171fc9eb0a94c07534ae Mon Sep 17 00:00:00 2001 From: Zoltan Varga Date: Fri, 10 Apr 2009 14:32:31 +0000 Subject: [PATCH] 2009-04-10 Zoltan Varga * 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. svn path=/trunk/mono/; revision=131471 --- ChangeLog | 5 +++++ include/private/gc_locks.h | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index d5b6acfb..fdc961a7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-04-10 Zoltan Varga + + * 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 * os_dep.c (GC_init_linux_data_start): Avoid the call to GC_find_limit () diff --git a/include/private/gc_locks.h b/include/private/gc_locks.h index 92281523..83fe57d9 100644 --- a/include/private/gc_locks.h +++ b/include/private/gc_locks.h @@ -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; } -- 2.40.0