diff options
author | kan <kan@FreeBSD.org> | 2007-05-19 01:25:07 +0000 |
---|---|---|
committer | kan <kan@FreeBSD.org> | 2007-05-19 01:25:07 +0000 |
commit | 7865836f4b0f698454c31b4593effcb032c22c1e (patch) | |
tree | ea6c2718dc1e45ed535d194df808ef31f0ebac92 /contrib/libstdc++/config/cpu/sparc | |
parent | 1f9ea4d0a40cca64d60cf4dab152349da7b9dddf (diff) | |
download | FreeBSD-src-7865836f4b0f698454c31b4593effcb032c22c1e.zip FreeBSD-src-7865836f4b0f698454c31b4593effcb032c22c1e.tar.gz |
GCC 4.2.0 release C++ standard library and runtime support code.
Diffstat (limited to 'contrib/libstdc++/config/cpu/sparc')
-rw-r--r-- | contrib/libstdc++/config/cpu/sparc/atomic_word.h | 16 | ||||
-rw-r--r-- | contrib/libstdc++/config/cpu/sparc/atomicity.h | 14 |
2 files changed, 23 insertions, 7 deletions
diff --git a/contrib/libstdc++/config/cpu/sparc/atomic_word.h b/contrib/libstdc++/config/cpu/sparc/atomic_word.h index 941fddd..b146045 100644 --- a/contrib/libstdc++/config/cpu/sparc/atomic_word.h +++ b/contrib/libstdc++/config/cpu/sparc/atomic_word.h @@ -15,7 +15,7 @@ // 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, +// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, // USA. // As a special exception, you may use this file as part of a free software @@ -36,4 +36,18 @@ typedef int _Atomic_word; #endif +#if defined(__sparc_v9__) +// These are necessary under the V9 RMO model, though it is almost never +// used in userspace. +#define _GLIBCXX_READ_MEM_BARRIER \ + __asm __volatile ("membar #LoadLoad":::"memory") +#define _GLIBCXX_WRITE_MEM_BARRIER \ + __asm __volatile ("membar #StoreStore":::"memory") + +#elif defined(__sparc_v8__) +// This is necessary under the PSO model. +#define _GLIBCXX_WRITE_MEM_BARRIER __asm __volatile ("stbar":::"memory") + +#endif + #endif diff --git a/contrib/libstdc++/config/cpu/sparc/atomicity.h b/contrib/libstdc++/config/cpu/sparc/atomicity.h index a39153b..5fec033 100644 --- a/contrib/libstdc++/config/cpu/sparc/atomicity.h +++ b/contrib/libstdc++/config/cpu/sparc/atomicity.h @@ -1,6 +1,7 @@ // Low-level functions for atomic operations: Sparc version -*- C++ -*- -// Copyright (C) 1999, 2000, 2001, 2002, 2004 Free Software Foundation, Inc. +// Copyright (C) 1999, 2000, 2001, 2002, 2004, 2005 +// 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 @@ -15,7 +16,7 @@ // 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, +// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, // USA. // As a special exception, you may use this file as part of a free software @@ -27,10 +28,10 @@ // invalidate any other reasons why the executable file might be covered by // the GNU General Public License. -#include <bits/atomicity.h> +#include <ext/atomicity.h> + +_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) -namespace __gnu_cxx -{ #ifdef __arch64__ _Atomic_word __attribute__ ((__unused__)) @@ -122,4 +123,5 @@ namespace __gnu_cxx : "memory"); } #endif /* __arch32__ */ -} // namespace __gnu_cxx + +_GLIBCXX_END_NAMESPACE |