bastring.h (class basic_string::Rep): Use proper defines for sparc v9 and fix asm for sparc64.

* std/bastring.h (class basic_string::Rep): Use proper defines
	for sparc v9 and fix asm for sparc64.

From-SVN: r30906
This commit is contained in:
Jakub Jelinek 1999-12-14 09:48:11 +01:00 committed by Jakub Jelinek
parent 50438485c6
commit d5191c94d1
2 changed files with 12 additions and 2 deletions

View 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

View 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));
}