... of course, I immediately found two problems by inspection.

(1) Accidentally dropped the barrier for sync_test_and_set when
used on post-v7.  Given that we have only SImode atomic_exchange,
and we do have QImode sync_test_and_set, we will probably try to
use LDSTUB for the c++ atomic_bool_test_and_set, which does want
to modify a single byte.

(2) We would fail to emit anything when compile-time barriers
are still desired, and if the user does something silly like

 -mcpu=v7 -mmmodel=rmo

then we'd wind up with unrecognizable insns.

Full sparc64-linux testing still underway; I've pushed these two
patches to the git branch previously mentioned.


r~


Richard Henderson (2):
  fixup: emit barrier for sync_test_and_set.
  fixup: Handle barriers for v7, and compile barriers.

 gcc/config/sparc/predicates.md |    4 ++++
 gcc/config/sparc/sparc.c       |   14 +++++++++-----
 gcc/config/sparc/sync.md       |   16 ++++++++++++++++
 3 files changed, 29 insertions(+), 5 deletions(-)

-- 
1.7.4.4

Reply via email to