]> 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:41:03 +0000 (10:41 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Sat, 19 Jul 2014 10:41:03 +0000 (10:41 +0000)
* config/sparc/sync.md (*membar_storeload_leon3): New insn.
(*membar_storeload): Disable for LEON3.

From-SVN: r212841

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

index 113783cb2b6bd9cc46b4fb6a36647bd8f6001084..e8c926a8e4eaa2726951bc51de86519ed273f549 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-18  Bernd Edlinger  <bernd.edlinger@hotmail.de>
 
        PR rtl-optimization/61461
index e6e237f256fa6aa1bd9793f9f9128e7ae4ec03f9..98ac0d3d66a0053971a7b475713070862be4a298 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")])