+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
// 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