diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2011-06-28 22:03:44 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2011-06-28 22:03:44 +0000 |
commit | 97269a2340c812667bc083a1927f646d76d90b37 (patch) | |
tree | c8ae101d1719fb0c8279bb0fd67a8bf20739f912 | |
parent | 4a9206ce4a426add4b27afebb24a6e8fa0e392bd (diff) | |
download | gcc-97269a2340c812667bc083a1927f646d76d90b37.zip gcc-97269a2340c812667bc083a1927f646d76d90b37.tar.gz gcc-97269a2340c812667bc083a1927f646d76d90b37.tar.bz2 |
sync.md (*stbar): Delete.
* config/sparc/sync.md (*stbar): Delete.
(*membar_v8): New insn to implement UNSPEC_MEMBAR in SPARC-V8.
From-SVN: r175604
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/sparc/sync.md | 13 |
2 files changed, 14 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 588a0b5..c5759af 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2011-06-28 Eric Botcazou <ebotcazou@adacore.com> + * config/sparc/sync.md (*stbar): Delete. + (*membar_v8): New insn to implement UNSPEC_MEMBAR in SPARC-V8. + +2011-06-28 Eric Botcazou <ebotcazou@adacore.com> + * tree-ssa-dom.c (initialize_hash_element): Fix oversight. 2011-06-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> diff --git a/gcc/config/sparc/sync.md b/gcc/config/sparc/sync.md index 5dd37d0..a7380ab 100644 --- a/gcc/config/sparc/sync.md +++ b/gcc/config/sparc/sync.md @@ -30,15 +30,20 @@ { operands[0] = gen_rtx_MEM (BLKmode, gen_rtx_SCRATCH (Pmode)); MEM_VOLATILE_P (operands[0]) = 1; - }) -(define_insn "*stbar" +;; In V8, loads are blocking and ordered wrt earlier loads, i.e. every load +;; is virtually followed by a load barrier (membar #LoadStore | #LoadLoad). +;; In PSO, stbar orders the stores (membar #StoreStore). +;; In TSO, ldstub orders the stores wrt subsequent loads (membar #StoreLoad). +;; The combination of the three yields a full memory barrier in all cases. +(define_insn "*membar_v8" [(set (match_operand:BLK 0 "" "") (unspec:BLK [(match_dup 0)] UNSPEC_MEMBAR))] "TARGET_V8" - "stbar" - [(set_attr "type" "multi")]) + "stbar\n\tldstub\t[%%sp-1], %%g0" + [(set_attr "type" "multi") + (set_attr "length" "2")]) ;; membar #StoreStore | #LoadStore | #StoreLoad | #LoadLoad (define_insn "*membar" |