bastring.h (class basic_string::Rep): Use proper defines for sparc v9 and fix asm...
authorJakub Jelinek <jakub@redhat.com>
Tue, 14 Dec 1999 08:48:11 +0000 (09:48 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 14 Dec 1999 08:48:11 +0000 (09:48 +0100)
* std/bastring.h (class basic_string::Rep): Use proper defines
for sparc v9 and fix asm for sparc64.

From-SVN: r30906

libstdc++/ChangeLog
libstdc++/std/bastring.h

index 33bf6d51081c4f5ef563f4bcd6cd063c2404bbf4..83218653e4f6030b054290781f11a3f72b0b9e9e 100644 (file)
@@ -1,3 +1,8 @@
+1999-12-13  Jakub Jelinek  <jakub@redhat.com>
+
+       * std/bastring.h (class basic_string::Rep): Use proper defines
+       for sparc v9 and fix asm for sparc64.
+
 1999-11-19  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
 
        * std/valarray_meta.h (_DEFINE_EXPR_UNARY_FUNCTION): Don't forget
index 70891262e9650192dc4322954bfbac80a73ee1ed..7f0b1bf7e23934eff929b52da77a26d8bc95ac6a 100644 (file)
@@ -89,14 +89,19 @@ private:
        if (__val == 1)
          delete this;
       }
-#elif defined __sparcv9__
+#elif defined __sparc_v9__
     void release ()
       {
        size_t __newval, __oldval = ref;
        do
          {
            __newval = __oldval - 1;
-           __asm__ ("cas       [%4], %2, %0"
+           __asm__ (
+#ifdef __arch64__
+                    "casx      [%4], %2, %0"
+#else
+                    "cas       [%4], %2, %0"
+#endif
                     : "=r" (__oldval), "=m" (ref)
                     : "r" (__oldval), "m" (ref), "r"(&(ref)), "0" (__newval));
          }