Author: aurel32
Date: 2010-05-30 17:13:21 +0000 (Sun, 30 May 2010)
New Revision: 4305

Added:
   glibc-package/trunk/debian/patches/mips/cvs-mips-atomic_h.diff
Modified:
   glibc-package/trunk/debian/changelog
   glibc-package/trunk/debian/patches/series
Log:
  * Add patches/mips/cvs-mips-atomic_h.diff to fix atomic issues on MIPS.



Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog        2010-05-30 16:19:51 UTC (rev 
4304)
+++ glibc-package/trunk/debian/changelog        2010-05-30 17:13:21 UTC (rev 
4305)
@@ -7,8 +7,9 @@
     as failing in expected-results-powerpc64-linux-gnu-ppc64.
   * Update tst-ttyname_r.out error value in expected-results-i486-gnu-libc
     as part of the test is now passing.
+  * Add patches/mips/cvs-mips-atomic_h.diff to fix atomic issues on MIPS.
 
- -- Aurelien Jarno <[email protected]>  Sun, 30 May 2010 13:06:58 +0200
+ -- Aurelien Jarno <[email protected]>  Sun, 30 May 2010 19:13:01 +0200
 
 eglibc (2.11.1-1) unstable; urgency=low
 

Added: glibc-package/trunk/debian/patches/mips/cvs-mips-atomic_h.diff
===================================================================
--- glibc-package/trunk/debian/patches/mips/cvs-mips-atomic_h.diff              
                (rev 0)
+++ glibc-package/trunk/debian/patches/mips/cvs-mips-atomic_h.diff      
2010-05-30 17:13:21 UTC (rev 4305)
@@ -0,0 +1,134 @@
+2010-03-23  Mischa Jonker  <[email protected]>
+
+       [BZ #11291]
+       * sysdeps/mips/bits/atomic.h
+       (__arch_compare_and_exchange_xxx_32_int,
+       __arch_compare_and_exchange_xxx_64_int,
+       __arch_exchange_xxx_32_int, __arch_exchange_xxx_64_int,
+       __arch_exchange_and_add_32_int, __arch_exchange_and_add_64_int):
+       Specify *mem as asm output as well as input.
+
+diff --git a/sysdeps/mips/bits/atomic.h b/sysdeps/mips/bits/atomic.h
+index 167d9a5..11b3467 100644
+--- a/ports/sysdeps/mips/bits/atomic.h
++++ b/ports/sysdeps/mips/bits/atomic.h
+@@ -69,16 +69,16 @@ typedef uintmax_t uatomic_max_t;
+      MIPS_PUSH_MIPS2                                                        \
+      rel      "\n"                                                          \
+      "1:\t"                                                                 \
+-     "ll      %0,%4\n\t"                                                    \
++     "ll      %0,%5\n\t"                                                    \
+      "move    %1,$0\n\t"                                                    \
+-     "bne     %0,%2,2f\n\t"                                                 \
+-     "move    %1,%3\n\t"                                                    \
+-     "sc      %1,%4\n\t"                                                    \
++     "bne     %0,%3,2f\n\t"                                                 \
++     "move    %1,%4\n\t"                                                    \
++     "sc      %1,%2\n\t"                                                    \
+      "beqz    %1,1b\n"                                                      \
+      acq      "\n\t"                                                        \
+      ".set    pop\n"                                                        \
+      "2:\n\t"                                                               \
+-            : "=&r" (__prev), "=&r" (__cmp)                                 \
++            : "=&r" (__prev), "=&r" (__cmp), "=m" (*mem)                    \
+             : "r" (oldval), "r" (newval), "m" (*mem)                        \
+             : "memory")
+ 
+@@ -93,16 +93,16 @@ typedef uintmax_t uatomic_max_t;
+      MIPS_PUSH_MIPS2                                                        \
+      rel      "\n"                                                          \
+      "1:\t"                                                                 \
+-     "lld     %0,%4\n\t"                                                    \
++     "lld     %0,%5\n\t"                                                    \
+      "move    %1,$0\n\t"                                                    \
+-     "bne     %0,%2,2f\n\t"                                                 \
+-     "move    %1,%3\n\t"                                                    \
+-     "scd     %1,%4\n\t"                                                    \
++     "bne     %0,%3,2f\n\t"                                                 \
++     "move    %1,%4\n\t"                                                    \
++     "scd     %1,%2\n\t"                                                    \
+      "beqz    %1,1b\n"                                                      \
+      acq      "\n\t"                                                        \
+      ".set    pop\n"                                                        \
+      "2:\n\t"                                                               \
+-            : "=&r" (__prev), "=&r" (__cmp)                                 \
++            : "=&r" (__prev), "=&r" (__cmp), "=m" (*mem)                    \
+             : "r" (oldval), "r" (newval), "m" (*mem)                        \
+             : "memory")
+ #endif
+@@ -189,14 +189,14 @@ typedef uintmax_t uatomic_max_t;
+      MIPS_PUSH_MIPS2                                                        \
+      rel      "\n"                                                          \
+      "1:\t"                                                                 \
+-     "ll      %0,%3\n\t"                                                    \
+-     "move    %1,%2\n\t"                                                    \
+-     "sc      %1,%3\n\t"                                                    \
++     "ll      %0,%4\n\t"                                                    \
++     "move    %1,%3\n\t"                                                    \
++     "sc      %1,%2\n\t"                                                    \
+      "beqz    %1,1b\n"                                                      \
+      acq      "\n\t"                                                        \
+      ".set    pop\n"                                                        \
+      "2:\n\t"                                                               \
+-            : "=&r" (__prev), "=&r" (__cmp)                                 \
++            : "=&r" (__prev), "=&r" (__cmp), "=m" (*mem)                    \
+             : "r" (newval), "m" (*mem)                                      \
+             : "memory");                                                    \
+   __prev; })
+@@ -213,14 +213,14 @@ typedef uintmax_t uatomic_max_t;
+      MIPS_PUSH_MIPS2                                                        \
+      rel      "\n"                                                          \
+      "1:\n"                                                                 \
+-     "lld     %0,%3\n\t"                                                    \
+-     "move    %1,%2\n\t"                                                    \
+-     "scd     %1,%3\n\t"                                                    \
++     "lld     %0,%4\n\t"                                                    \
++     "move    %1,%3\n\t"                                                    \
++     "scd     %1,%2\n\t"                                                    \
+      "beqz    %1,1b\n"                                                      \
+      acq      "\n\t"                                                        \
+      ".set    pop\n"                                                        \
+      "2:\n\t"                                                               \
+-            : "=&r" (__prev), "=&r" (__cmp)                                 \
++            : "=&r" (__prev), "=&r" (__cmp), "=m" (*mem)                    \
+             : "r" (newval), "m" (*mem)                                      \
+             : "memory");                                                    \
+   __prev; })
+@@ -248,14 +248,14 @@ typedef uintmax_t uatomic_max_t;
+      MIPS_PUSH_MIPS2                                                        \
+      rel      "\n"                                                          \
+      "1:\t"                                                                 \
+-     "ll      %0,%3\n\t"                                                    \
+-     "addu    %1,%0,%2\n\t"                                                 \
+-     "sc      %1,%3\n\t"                                                    \
++     "ll      %0,%4\n\t"                                                    \
++     "addu    %1,%0,%3\n\t"                                                 \
++     "sc      %1,%2\n\t"                                                    \
+      "beqz    %1,1b\n"                                                      \
+      acq      "\n\t"                                                        \
+      ".set    pop\n"                                                        \
+      "2:\n\t"                                                               \
+-            : "=&r" (__prev), "=&r" (__cmp)                                 \
++            : "=&r" (__prev), "=&r" (__cmp), "=m" (*mem)                    \
+             : "r" (value), "m" (*mem)                                       \
+             : "memory");                                                    \
+   __prev; })
+@@ -272,14 +272,14 @@ typedef uintmax_t uatomic_max_t;
+      MIPS_PUSH_MIPS2                                                        \
+      rel      "\n"                                                          \
+      "1:\t"                                                                 \
+-     "lld     %0,%3\n\t"                                                    \
+-     "daddu   %1,%0,%2\n\t"                                                 \
+-     "scd     %1,%3\n\t"                                                    \
++     "lld     %0,%4\n\t"                                                    \
++     "daddu   %1,%0,%3\n\t"                                                 \
++     "scd     %1,%2\n\t"                                                    \
+      "beqz    %1,1b\n"                                                      \
+      acq      "\n\t"                                                        \
+      ".set    pop\n"                                                        \
+      "2:\n\t"                                                               \
+-            : "=&r" (__prev), "=&r" (__cmp)                                 \
++            : "=&r" (__prev), "=&r" (__cmp), "=m" (*mem)                    \
+             : "r" (value), "m" (*mem)                                       \
+             : "memory");                                                    \
+   __prev; })

Modified: glibc-package/trunk/debian/patches/series
===================================================================
--- glibc-package/trunk/debian/patches/series   2010-05-30 16:19:51 UTC (rev 
4304)
+++ glibc-package/trunk/debian/patches/series   2010-05-30 17:13:21 UTC (rev 
4305)
@@ -139,6 +139,7 @@
 m68k/local-pthread_lock.diff
 m68k/submitted-gcc34-seccomment.diff
 
+mips/cvs-mips-atomic_h.diff
 mips/local-lowlevellock.diff
 mips/local-r10k.diff
 mips/submitted-rld_map.diff


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: http://lists.debian.org/[email protected]

Reply via email to