aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Edelsohn <dje.gcc@gmail.com>2015-05-22 13:02:34 +0000
committerDavid Edelsohn <dje.gcc@gmail.com>2015-05-22 13:02:34 +0000
commit88ff2fa25c0b50f0a733e2e0faedd20f015f074c (patch)
tree36558693567c83dcc09fd8310bd425e0b49d1033
parentab0b2bef4e423fd9ef94e107cf017bebb9e7843e (diff)
PR target/66224
* config/cpu/powerpc/atomic_word.h (_GLIBCXX_READ_MEM_BARRIER): Don't use isync. Use lwsync if available. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@223564 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--libstdc++-v3/ChangeLog9
-rw-r--r--libstdc++-v3/config/cpu/powerpc/atomic_word.h5
2 files changed, 12 insertions, 2 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index b42c6e74dda..6ac5a480779 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,12 @@
+2015-05-22 David Edelsohn <dje.gcc@gmail.com>
+
+ Backport from mainline
+ 2015-05-21 David Edelsohn <dje.gcc@gmail.com>
+
+ PR target/66224
+ * config/cpu/powerpc/atomic_word.h (_GLIBCXX_READ_MEM_BARRIER):
+ Don't use isync. Use lwsync if available.
+
2015-05-07 Renlin Li <renlin.li@arm.com>
Backported from mainline
diff --git a/libstdc++-v3/config/cpu/powerpc/atomic_word.h b/libstdc++-v3/config/cpu/powerpc/atomic_word.h
index 12eafd8db4f..1ceb02cf702 100644
--- a/libstdc++-v3/config/cpu/powerpc/atomic_word.h
+++ b/libstdc++-v3/config/cpu/powerpc/atomic_word.h
@@ -1,6 +1,6 @@
// Low-level type for atomic operations -*- C++ -*-
-// Copyright (C) 2004-2014 Free Software Foundation, Inc.
+// Copyright (C) 2004-2015 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
@@ -27,10 +27,11 @@
typedef int _Atomic_word;
-#define _GLIBCXX_READ_MEM_BARRIER __asm __volatile ("isync":::"memory")
#ifdef __NO_LWSYNC__
+#define _GLIBCXX_READ_MEM_BARRIER __asm __volatile ("sync":::"memory")
#define _GLIBCXX_WRITE_MEM_BARRIER __asm __volatile ("sync":::"memory")
#else
+#define _GLIBCXX_READ_MEM_BARRIER __asm __volatile ("lwsync":::"memory")
#define _GLIBCXX_WRITE_MEM_BARRIER __asm __volatile ("lwsync":::"memory")
#endif