sparc.c (sparc_emit_membar_for_model): Add the implied StoreLoad barrier for atomic operations if before.

* config/sparc/sparc.c (sparc_emit_membar_for_model) <SMM_TSO>: Add
	the implied StoreLoad barrier for atomic operations if before.

From-SVN: r201452
This commit is contained in:
Eric Botcazou 2013-08-02 21:43:51 +00:00 committed by Eric Botcazou
parent 93ff575cc8
commit a4add37fab
2 changed files with 10 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2013-08-02 Eric Botcazou <ebotcazou@adacore.com>
* config/sparc/sparc.c (sparc_emit_membar_for_model) <SMM_TSO>: Add
the implied StoreLoad barrier for atomic operations if before.
2013-07-11 Georg-Johann Lay <avr@gjlay.de>
Backport from 2013-07-11 trunk r200901.

View File

@ -10929,6 +10929,11 @@ sparc_emit_membar_for_model (enum memmodel model,
/* Total Store Ordering: all memory transactions with store semantics
are followed by an implied StoreStore. */
implied |= StoreStore;
/* If we're not looking for a raw barrer (before+after), then atomic
operations get the benefit of being both load and store. */
if (load_store == 3 && before_after == 1)
implied |= StoreLoad;
/* FALLTHRU */
case SMM_PSO: