This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: 4.3 PowerPC backports


I would like to backport the following two patches from the trunk to the
GCC 4.3 branch.  OK?

Thanks, Ben

libgomp/
	2008-12-01  Janis Johnson  <janis187@us.ibm.com>

	PR libgomp/38270
	* config/linux/powerpc/mutex.h: New.

gcc/
	2008-10-04  Anton Blanchard  <anton@samba.org>

	* config/rs6000/rs6000.c (rs6000_emit_sync): Use gen_lwsync().
	(rs6000_split_atomic_op): Same.
	(rs6000_split_compare_and_swap): Same.
	(rs6000_split_compare_and_swapqhi): Same.

Index: libgomp/config/linux/powerpc/mutex.h
===================================================================
--- libgomp/config/linux/powerpc/mutex.h        (revision 0)
+++ libgomp/config/linux/powerpc/mutex.h        (revision 0)
@@ -0,0 +1,2 @@
+/* On PowerPC __sync_lock_test_and_set isn't a full barrier.  */
+#include "config/linux/ia64/mutex.h"
Index: gcc/config/rs6000/rs6000.c
===================================================================
--- gcc/config/rs6000/rs6000.c  (revision 148329)
+++ gcc/config/rs6000/rs6000.c  (working copy)
@@ -13498,7 +13498,7 @@ rs6000_emit_sync (enum rtx_code code, en
   rtx shift = NULL_RTX;
 
   if (sync_p)
-    emit_insn (gen_memory_barrier ());
+    emit_insn (gen_lwsync ());
 
   if (GET_CODE (m) == NOT)
     used_m = XEXP (m, 0);
@@ -13738,7 +13738,7 @@ rs6000_split_atomic_op (enum rtx_code co
   enum machine_mode mode = GET_MODE (mem);
   rtx label, x, cond = gen_rtx_REG (CCmode, CR0_REGNO);
 
-  emit_insn (gen_memory_barrier ());
+  emit_insn (gen_lwsync ());
 
   label = gen_label_rtx ();
   emit_label (label);
@@ -13778,7 +13778,7 @@ rs6000_split_compare_and_swap (rtx retva
   enum machine_mode mode = GET_MODE (mem);
   rtx label1, label2, x, cond = gen_rtx_REG (CCmode, CR0_REGNO);
 
-  emit_insn (gen_memory_barrier ());
+  emit_insn (gen_lwsync ());
 
   label1 = gen_rtx_LABEL_REF (VOIDmode, gen_label_rtx ());
   label2 = gen_rtx_LABEL_REF (VOIDmode, gen_label_rtx ());
@@ -13885,7 +13885,7 @@ rs6000_split_compare_and_swapqhi (rtx de
 {
   rtx label1, label2, x, cond = gen_rtx_REG (CCmode, CR0_REGNO);
 
-  emit_insn (gen_memory_barrier ());
+  emit_insn (gen_lwsync ());
   label1 = gen_rtx_LABEL_REF (VOIDmode, gen_label_rtx ());
   label2 = gen_rtx_LABEL_REF (VOIDmode, gen_label_rtx ());
   emit_label (XEXP (label1, 0));



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]