Quellcode durchsuchen

2009-04-10 Zoltan Varga <[email protected]>

	* 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
Zoltan Varga vor 16 Jahren
Ursprung
Commit
b5a53bc535
2 geänderte Dateien mit 8 neuen und 3 gelöschten Zeilen
  1. 5 0
      libgc/ChangeLog
  2. 3 3
      libgc/include/private/gc_locks.h

+ 5 - 0
libgc/ChangeLog

@@ -1,3 +1,8 @@
+2009-04-10  Zoltan Varga  <[email protected]>
+
+	* 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  <[email protected]>
 
 	* os_dep.c (GC_init_linux_data_start): Avoid the call to GC_find_limit ()

+ 3 - 3
libgc/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;
         }