Mark all member functions with memory models always inline v2
authorAndi Kleen <ak@linux.intel.com>
Thu, 9 May 2013 04:22:11 +0000 (04:22 +0000)
committerAndi Kleen <ak@gcc.gnu.org>
Thu, 9 May 2013 04:22:11 +0000 (04:22 +0000)
commita062bb4ba60bf2d3cfca0ebe56d15c4f7c4f0db5
tree5cd84b58b1cfba1a839f177accc1bdf34f32a189
parent785b887ee8ef5c48ffe99f2a9c5bb9612f98423f
Mark all member functions with memory models always inline v2

When a non constant memory model is passed to __atomic_*
gcc falls back to seq_cst. This drops any HLE acquire or release bits.

This can happen when <atomic> is used with -O0
as the member functions are not always inlined then and the memory
argument passed in ends up being non-constant.

v2: Use _GLIBCXX_ALWAYS_INLINE

libstdc++-v3/:

2013-05-08  Andi Kleen  <ak@linux.intel.com>

PR target/55947
* libstdc++-v3/include/bits/atomic_base.h
(_GLIBCXX_ALWAYS_INLINE): Add new macro.
(atomic_thread_fence, atomic_signal_fence, test_and_set,
clear, store, load, exchange, compare_exchange_weak)
compare_exchange_strong, fetch_add, fetch_sub, fetch_and,
fetch_or, fetch_xor): Mark _GLIBCXX_ALWAYS_INLINE.

From-SVN: r198733
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/atomic_base.h