]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/66224 (PowerPC _GLIBCXX_READ_MEM_BARRIER too weak)
authorDavid Edelsohn <dje.gcc@gmail.com>
Fri, 22 May 2015 13:02:34 +0000 (13:02 +0000)
committerDavid Edelsohn <dje@gcc.gnu.org>
Fri, 22 May 2015 13:02:34 +0000 (09:02 -0400)
        PR target/66224
        * config/cpu/powerpc/atomic_word.h (_GLIBCXX_READ_MEM_BARRIER):
        Don't use isync. Use lwsync if available.

From-SVN: r223564

libstdc++-v3/ChangeLog
libstdc++-v3/config/cpu/powerpc/atomic_word.h

index b42c6e74ddac967ebf5ca070f63dfaeecfda74a1..6ac5a48077937757caa19316c422feb47a45dd32 100644 (file)
@@ -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
index 12eafd8db4f87c2a7550e75c772e221c7abf091b..1ceb02cf7028f941cd8ce2db7ac60fa0174e8bfd 100644 (file)
@@ -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
 
 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