]> granicus.if.org Git - gc/commitdiff
2009-12-09 Matthias Klose <doko@ubuntu.com>
authordoko <doko@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 13 Dec 2009 22:44:27 +0000 (22:44 +0000)
committerguest <ivmai@mail.ru>
Fri, 29 Jul 2011 06:54:29 +0000 (10:54 +0400)
        * include/private/gc_locks.h: For __ARM_EABI__ define
        GC_test_and_set  GC_clear to use the atomic builtins.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@155198 138bc75d-0d04-0410-961f-82ee72b054a4

ChangeLog
include/private/gc_locks.h

index dd87502774c3514f764a40d97a350050eea600eb..542ddc1e0b62e56f3bd75013501c7734b75798e9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-12-09  Matthias Klose  <doko@ubuntu.com> 
+
+       * include/private/gc_locks.h: For __ARM_EABI__ define
+       GC_test_and_set  GC_clear to use the atomic builtins.
+
 2009-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        * Makefile.in: Regenerate.
index d1bb2e4521a4a2adbe09c83dc21d57afa3740606..54cfdb92d374e8634ef4f06bda6fb5b75c475d1d 100644 (file)
 #       define GC_CLEAR_DEFINED
 #    endif /* ALPHA */
 #    ifdef ARM32
+#     define GC_TEST_AND_SET_DEFINED
+#     if (__GNUC__>4)||((__GNUC__==4)&&(__GNUC_MINOR__>=5)) && defined(__ARM_EABI__)
+#       define GC_CLEAR_DEFINED
+#       define GC_test_and_set(addr) __sync_lock_test_and_set (addr, 1)
+#       define GC_clear(addr) __sync_lock_release (addr)
+#     else
         inline static int GC_test_and_set(volatile unsigned int *addr) {
           int oldval;
           /* SWP on ARM is very similar to XCHG on x86.  Doesn't lock the
                             : "memory");
           return oldval;
         }
-#       define GC_TEST_AND_SET_DEFINED
+#     endif
 #    endif /* ARM32 */
 #    ifdef CRIS
         inline static int GC_test_and_set(volatile unsigned int *addr) {