testsuite: Add dg-require-atomic-cmpxchg-word
commit2a4d9e4f533c77870cc0eb60fbbd8047da4c7386
authorHans-Peter Nilsson <hp@axis.com>
Wed, 4 Oct 2023 01:40:25 +0000 (4 03:40 +0200)
committerHans-Peter Nilsson <hp@bitrange.com>
Fri, 13 Oct 2023 00:19:53 +0000 (13 02:19 +0200)
tree7a9ce8a8b51f4f6a6590ba083927914201cad68e
parentf9ef2e6dcdc70d7a05641a4abec86ad25638903d
testsuite: Add dg-require-atomic-cmpxchg-word

Some targets (armv6-m) support inline atomic load and store,
i.e. dg-require-thread-fence matches, but not atomic operations like
compare and exchange.

This directive can be used to replace uses of dg-require-thread-fence
where an atomic operation is actually used.

* testsuite/lib/dg-options.exp (dg-require-atomic-cmpxchg-word):
New proc.
* testsuite/lib/libstdc++.exp (check_v3_target_atomic_cmpxchg_word):
Ditto.
libstdc++-v3/testsuite/lib/dg-options.exp
libstdc++-v3/testsuite/lib/libstdc++.exp