2009-04-10 Zoltan Varga <vargaz@gmail.com>
authorZoltan Varga <vargaz@gmail.com>
Fri, 10 Apr 2009 14:32:31 +0000 (14:32 -0000)
committerZoltan Varga <vargaz@gmail.com>
Fri, 10 Apr 2009 14:32:31 +0000 (14:32 -0000)
* 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

libgc/ChangeLog
libgc/include/private/gc_locks.h

index d5b6acfbe03052c771ea53ca153270139bfa29d2..fdc961a7039d58b6ebd8c4f9e9bf9c569c3f581a 100644 (file)
@@ -1,3 +1,8 @@
+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 ()
index 922815232e82f7d33897ce851f78b939437e5ac8..83fe57d917d70ad2a20a5b3b4452610ba86c263c 100644 (file)
           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;
         }