aboutsummaryrefslogtreecommitdiff
path: root/contrib/libstdc++/config/cpu
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/libstdc++/config/cpu')
-rw-r--r--contrib/libstdc++/config/cpu/alpha/atomicity.h75
-rw-r--r--contrib/libstdc++/config/cpu/generic/atomicity.h56
-rw-r--r--contrib/libstdc++/config/cpu/ia64/atomicity.h44
-rw-r--r--contrib/libstdc++/config/cpu/powerpc/atomicity.h76
-rw-r--r--contrib/libstdc++/config/cpu/s390/atomicity.h54
5 files changed, 0 insertions, 305 deletions
diff --git a/contrib/libstdc++/config/cpu/alpha/atomicity.h b/contrib/libstdc++/config/cpu/alpha/atomicity.h
deleted file mode 100644
index 4eb311b509a4..000000000000
--- a/contrib/libstdc++/config/cpu/alpha/atomicity.h
+++ /dev/null
@@ -1,75 +0,0 @@
-// Low-level functions for atomic operations: Alpha version -*- C++ -*-
-
-// Copyright (C) 1999, 2000, 2001, 2003, 2004 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
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-#include <bits/atomicity.h>
-
-/* @@@ With gas we can play nice .subsection games to get the
- non-predicted branch pointing forward. But Digital assemblers
- don't understand those directives. This isn't a terribly
- important issue, so just ignore it. */
-
-namespace __gnu_cxx
-{
- _Atomic_word
- __attribute__ ((__unused__))
- __exchange_and_add(volatile _Atomic_word* __mem, int __val)
- {
- register int __result, __tmp;
-
- __asm__ __volatile__ (
- "\n$Lxadd_%=:\n\t"
- "ldl_l %0,%3\n\t"
- "addl %0,%4,%1\n\t"
- "stl_c %1,%2\n\t"
- "beq %1,$Lxadd_%=\n\t"
- "mb"
- : "=&r"(__result), "=&r"(__tmp), "=m"(*__mem)
- : "m" (*__mem), "r"(__val));
-
- return __result;
- }
-
- void
- __attribute__ ((__unused__))
- __atomic_add(volatile _Atomic_word* __mem, int __val)
- {
- register _Atomic_word __result;
-
- __asm__ __volatile__ (
- "\n$Ladd_%=:\n\t"
- "ldl_l %0,%2\n\t"
- "addl %0,%3,%0\n\t"
- "stl_c %0,%1\n\t"
- "beq %0,$Ladd_%=\n\t"
- "mb"
- : "=&r"(__result), "=m"(*__mem)
- : "m" (*__mem), "r"(__val));
- }
-} // namespace __gnu_cxx
-
diff --git a/contrib/libstdc++/config/cpu/generic/atomicity.h b/contrib/libstdc++/config/cpu/generic/atomicity.h
deleted file mode 100644
index f30005a0abce..000000000000
--- a/contrib/libstdc++/config/cpu/generic/atomicity.h
+++ /dev/null
@@ -1,56 +0,0 @@
-// Low-level functions for atomic operations: Generic version -*- C++ -*-
-
-// Copyright (C) 1999, 2001, 2002, 2003, 2004 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
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-#include <bits/atomicity.h>
-#include <bits/concurrence.h>
-
-namespace __gnu_internal
-{
- __glibcxx_mutex_define_initialized(atomic_mutex);
-} // namespace __gnu_internal
-
-namespace __gnu_cxx
-{
- _Atomic_word
- __attribute__ ((__unused__))
- __exchange_and_add(volatile _Atomic_word* __mem, int __val)
- {
- __glibcxx_mutex_lock(__gnu_internal::atomic_mutex);
- _Atomic_word __result;
- __result = *__mem;
- *__mem += __val;
- __glibcxx_mutex_unlock(__gnu_internal::atomic_mutex);
- return __result;
- }
-
- void
- __attribute__ ((__unused__))
- __atomic_add(volatile _Atomic_word* __mem, int __val)
- { __exchange_and_add(__mem, __val); }
-} // namespace __gnu_cxx
diff --git a/contrib/libstdc++/config/cpu/ia64/atomicity.h b/contrib/libstdc++/config/cpu/ia64/atomicity.h
deleted file mode 100644
index 0c3ab3343e92..000000000000
--- a/contrib/libstdc++/config/cpu/ia64/atomicity.h
+++ /dev/null
@@ -1,44 +0,0 @@
-// Low-level functions for atomic operations: IA64 version -*- C++ -*-
-
-// Copyright (C) 2000, 2001, 2003, 2004 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
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-#include <bits/atomicity.h>
-#include <ia64intrin.h>
-
-namespace __gnu_cxx
-{
- _Atomic_word
- __attribute__ ((__unused__))
- __exchange_and_add(volatile _Atomic_word* __mem, int __val)
- { return __sync_fetch_and_add(__mem, __val); }
-
- void
- __attribute__ ((__unused__))
- __atomic_add(volatile _Atomic_word* __mem, int __val)
- { __sync_fetch_and_add(__mem, __val); }
-}
diff --git a/contrib/libstdc++/config/cpu/powerpc/atomicity.h b/contrib/libstdc++/config/cpu/powerpc/atomicity.h
deleted file mode 100644
index 73149441dd83..000000000000
--- a/contrib/libstdc++/config/cpu/powerpc/atomicity.h
+++ /dev/null
@@ -1,76 +0,0 @@
-// Low-level functions for atomic operations: PowerPC version -*- C++ -*-
-
-// Copyright (C) 1999, 2000, 2001, 2003, 2004 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
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-#include <bits/atomicity.h>
-
-#ifdef __PPC405__
-#define _STWCX "sync \n\tstwcx. "
-#else
-#define _STWCX "stwcx. "
-#endif
-
-namespace __gnu_cxx
-{
- _Atomic_word
- __attribute__ ((__unused__))
- __exchange_and_add(volatile _Atomic_word* __mem, int __val)
- {
- _Atomic_word __tmp, __res;
- __asm__ __volatile__ (
- "/* Inline exchange & add */\n"
- "0:\t"
- "lwarx %0,0,%3 \n\t"
- "add%I4 %1,%0,%4 \n\t"
- _STWCX " %1,0,%3 \n\t"
- "bne- 0b \n\t"
- "/* End exchange & add */"
- : "=&b"(__res), "=&r"(__tmp), "=m" (*__mem)
- : "r" (__mem), "Ir"(__val), "m" (*__mem)
- : "cr0");
- return __res;
- }
-
- void
- __attribute__ ((__unused__))
- __atomic_add(volatile _Atomic_word* __mem, int __val)
- {
- _Atomic_word __tmp;
- __asm__ __volatile__ (
- "/* Inline atomic add */\n"
- "0:\t"
- "lwarx %0,0,%2 \n\t"
- "add%I3 %0,%0,%3 \n\t"
- _STWCX " %0,0,%2 \n\t"
- "bne- 0b \n\t"
- "/* End atomic add */"
- : "=&b"(__tmp), "=m" (*__mem)
- : "r" (__mem), "Ir"(__val), "m" (*__mem)
- : "cr0");
- }
-} // namespace __gnu_cxx
diff --git a/contrib/libstdc++/config/cpu/s390/atomicity.h b/contrib/libstdc++/config/cpu/s390/atomicity.h
deleted file mode 100644
index b979e3abd33c..000000000000
--- a/contrib/libstdc++/config/cpu/s390/atomicity.h
+++ /dev/null
@@ -1,54 +0,0 @@
-// Low-level functions for atomic operations: S/390 version -*- C++ -*-
-
-// Copyright (C) 2001, 2003, 2004 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
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-#include <bits/atomicity.h>
-
-namespace __gnu_cxx
-{
- _Atomic_word
- __attribute__ ((__unused__))
- __exchange_and_add(volatile _Atomic_word* __mem, int __val)
- {
- register _Atomic_word __old_val, __new_val;
-
- __asm__ __volatile__ (" l %0,0(%3)\n"
- "0: lr %1,%0\n"
- " ar %1,%4\n"
- " cs %0,%1,0(%3)\n"
- " jl 0b"
- : "=&d" (__old_val), "=&d" (__new_val), "=m" (*__mem)
- : "a" (__mem), "d" (__val), "m" (*__mem) : "cc");
- return __old_val;
- }
-
- void
- __attribute__ ((__unused__))
- __atomic_add(volatile _Atomic_word* __mem, int __val)
- { __exchange_and_add(__mem, __val); }
-} // namespace __gnu_cxx