gcc/libstdc++-v3/config
John David Anglin 9807c31af9 Fix atomic operations on PA-RISC 2.0 processors.
PA-RISC 2.0 supports out-of-order execution for loads and stores.
Thus, we need to synchonize memory accesses.

This change revises the lock releases in __exchange_and_add and
__atomic_add to use an ordered store with release semantics.  We
also use an ordered load in the inner spin loop.

We use the "ldcw,co" instruction instead of "ldcw" when compiled
for PA 2.0.  Most PA 2.0 processors are coherent and can execute
the ldcw instruction in cache for improved performance.

Finally, the inner spin loop is revised to immediately branch to
the ldcw instruction when it detects the lock is free.

2023-01-05  John David Anglin  <danglin@gcc.gnu.org>

libstdc++-v3/ChangeLog:

	* config/cpu/hppa/atomicity.h (_PA_LDCW_INSN): Define.
	(__exchange_and_add): Use _PA_LDCW_INSN.  Use ordered store for
	lock release.  Revise loop.
	(__atomic_add): Likewise.
2023-01-05 18:15:18 +00:00
..
abi libstdc++: Only use std::atomic<tzdb_list::_Node*> if lock free [PR108228] 2023-01-05 00:46:00 +00:00
allocator Update copyright years. 2022-01-03 10:42:10 +01:00
cpu Fix atomic operations on PA-RISC 2.0 processors. 2023-01-05 18:15:18 +00:00
io Update copyright years. 2022-01-03 10:42:10 +01:00
locale libstdc++: Remove whitespace before preprocessor directives 2022-05-12 18:04:01 +01:00
os Reimplement GNU threads library on native Windows 2022-12-23 23:58:06 +00:00