OSDN Git Service

* configure.host (try_cpu settings): Set try_cpu=cris for crisv32.
authorhp <hp@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 15 Dec 2007 21:33:45 +0000 (21:33 +0000)
committerhp <hp@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 15 Dec 2007 21:33:45 +0000 (21:33 +0000)
* config/cpu/cris/atomicity.h (__exchange_and_add)
[__CRIS_arch_version >= 32]: Add support for CRIS v32.

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

libstdc++-v3/ChangeLog
libstdc++-v3/config/cpu/cris/atomicity.h
libstdc++-v3/configure.host

index a6a5d0f..30d4644 100644 (file)
@@ -1,3 +1,9 @@
+2007-12-15  Hans-Peter Nilsson  <hp@axis.com>
+
+       * configure.host (try_cpu settings): Set try_cpu=cris for crisv32.
+       * config/cpu/cris/atomicity.h (__exchange_and_add)
+       [__CRIS_arch_version >= 32]: Add support for CRIS v32.
+
 2007-12-15  Benjamin Kosnik  <bkoz@redhat.com>
            Paolo Carlini  <pcarlini@suse.de>
        
index da16a1a..56dd0ed 100644 (file)
@@ -37,7 +37,20 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
     int __tmp;
     _Atomic_word __result;
 
-#if (__CRIS_arch_version >= 10)
+#if (__CRIS_arch_version >= 32)
+  __asm__ __volatile__ (" clearf p            \n"
+                      "0:                     \n"
+                      " move.d %4,%2          \n"
+                      " move.d [%3],%0        \n"
+                      " add.d %0,%2           \n"
+                      " ax                    \n"
+                      " move.d %2,[%3]        \n"
+                      " bcs 0b                \n"
+                      " clearf p              \n"
+                      :  "=&r" (__result), "=Q" (*__mem), "=&r" (__tmp)
+                      : "r" (__mem), "g" (__val), "Q" (*__mem)
+                      : "memory");
+#elif (__CRIS_arch_version >= 10)
     __asm__ __volatile__ (" clearf             \n"
                        "0:                     \n"
                        " move.d %4,%2          \n"
index 1742128..c994b5e 100644 (file)
@@ -94,6 +94,9 @@ case "${host_cpu}" in
   arm* | xscale | ep9312)
     try_cpu=arm
     ;;
+  crisv32)
+    try_cpu=cris
+    ;;
   i[567]86 | x86_64)
     try_cpu=i486
     ;;