aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2003-03-20 02:30:42 +0000
committerAlexandre Oliva <aoliva@gcc.gnu.org>2003-03-20 02:30:42 +0000
commit951312c8190b927f30693f0e9ab122f991efaeab (patch)
tree548e4002de23467f30bee91264c5d12ec021db38
parent7e9268dbee9c162d649efb285c5822785ac84635 (diff)
downloadgcc-951312c8190b927f30693f0e9ab122f991efaeab.zip
gcc-951312c8190b927f30693f0e9ab122f991efaeab.tar.gz
gcc-951312c8190b927f30693f0e9ab122f991efaeab.tar.bz2
atomicity.h (__exchange_and_add, [...]): Only .set mips2 for the o32 ABI.
* config/cpu/mips/atomicity.h (__exchange_and_add, __atomic_add): Only .set mips2 for the o32 ABI. From-SVN: r64604
-rw-r--r--libstdc++-v3/ChangeLog5
-rw-r--r--libstdc++-v3/config/cpu/mips/atomicity.h6
2 files changed, 10 insertions, 1 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 13a6576..1d7d2d8 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,8 @@
+2003-03-19 Alexandre Oliva <aoliva@redhat.com>
+
+ * config/cpu/mips/atomicity.h (__exchange_and_add, __atomic_add):
+ Only .set mips2 for the o32 ABI.
+
2003-03-19 Paolo Carlini <pcarlini@unitus.it>
* testsuite/21_strings/char_traits/requirements/char/1.cc:
diff --git a/libstdc++-v3/config/cpu/mips/atomicity.h b/libstdc++-v3/config/cpu/mips/atomicity.h
index 447355b..098d063 100644
--- a/libstdc++-v3/config/cpu/mips/atomicity.h
+++ b/libstdc++-v3/config/cpu/mips/atomicity.h
@@ -1,6 +1,6 @@
// Low-level functions for atomic operations.
-// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -42,7 +42,9 @@ __exchange_and_add (volatile _Atomic_word *__mem, int __val)
("/* Inline exchange & add */\n\t"
"1:\n\t"
".set push\n\t"
+#if _MIPS_SIM == _MIPS_SIM_ABI32
".set mips2\n\t"
+#endif
"ll %0,%3\n\t"
"addu %1,%4,%0\n\t"
"sc %1,%2\n\t"
@@ -66,7 +68,9 @@ __atomic_add (volatile _Atomic_word *__mem, int __val)
("/* Inline atomic add */\n\t"
"1:\n\t"
".set push\n\t"
+#if _MIPS_SIM == _MIPS_SIM_ABI32
".set mips2\n\t"
+#endif
"ll %0,%2\n\t"
"addu %0,%3,%0\n\t"
"sc %0,%1\n\t"