]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
sync.md (*membar_storeload_leon3): New insn.
authorDaniel Cederman <cederman@gaisler.com>
Sat, 19 Jul 2014 10:42:30 +0000 (10:42 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Sat, 19 Jul 2014 10:42:30 +0000 (10:42 +0000)
* config/sparc/sync.md (*membar_storeload_leon3): New insn.
(*membar_storeload): Disable for LEON3.

From-SVN: r212843

gcc/ChangeLog
gcc/config/sparc/sync.md

index 59addffc3c951959daca57060b049eb5b8a9ead4..66c615975b732b4672fafcde9e36abcdd58e337f 100644 (file)
@@ -1,3 +1,8 @@
+2014-07-19  Daniel Cederman  <cederman@gaisler.com>
+
+       * config/sparc/sync.md (*membar_storeload_leon3): New insn.
+       (*membar_storeload): Disable for LEON3.
+
 2014-07-17  Richard Biener  <rguenther@suse.de>
 
        PR rtl-optimization/61801
index cf909853b373671e20a75b7a2fec38c2d65e6f2d..7e39b983d6a32a8db49810a43dc5b763ef5bd3d3 100644 (file)
   "stbar"
   [(set_attr "type" "multi")])
 
+;; For LEON3, STB has the effect of membar #StoreLoad.
+(define_insn "*membar_storeload_leon3"
+  [(set (match_operand:BLK 0 "" "")
+       (unspec:BLK [(match_dup 0) (const_int 2)] UNSPEC_MEMBAR))]
+  "TARGET_LEON3"
+  "stb\t%%g0, [%%sp-1]"
+  [(set_attr "type" "store")])
+
 ;; For V8, LDSTUB has the effect of membar #StoreLoad.
 (define_insn "*membar_storeload"
   [(set (match_operand:BLK 0 "" "")
        (unspec:BLK [(match_dup 0) (const_int 2)] UNSPEC_MEMBAR))]
-  "TARGET_V8"
+  "TARGET_V8 && !TARGET_LEON3"
   "ldstub\t[%%sp-1], %%g0"
   [(set_attr "type" "multi")])