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]

[PR 42263] Patch ARM 4.4 branch only - Fix __sync_synchronize .


Hi, 

This patch backports the fix for __sync_synchronize from trunk to the gcc 4.4 branch. 
Ok to commit ? 


cheers
Ramana



2009-12-10  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

	PR target/42263
        Backport from trunk.
        2009-08-11  Andrew Haley  <aph@redhat.com>

	* gcc.target/arm/synchronize.c: New file.


	2009-08-11  Andrew Haley  <aph@redhat.com>

	* config/arm/arm.c (arm_init_libfuncs): Add __sync_synchronize.




Index: gcc/config/arm/arm.c
===================================================================
--- gcc/config/arm/arm.c	(revision 155138)
+++ gcc/config/arm/arm.c	(working copy)
@@ -53,6 +53,7 @@
 #include "debug.h"
 #include "langhooks.h"
 #include "df.h"
+#include "libfuncs.h"
 
 /* Forward definitions of types.  */
 typedef struct minipool_node    Mnode;
@@ -922,6 +923,9 @@
   set_optab_libfunc (umod_optab, DImode, NULL);
   set_optab_libfunc (smod_optab, SImode, NULL);
   set_optab_libfunc (umod_optab, SImode, NULL);
+
+  if (TARGET_AAPCS_BASED)
+    synchronize_libfunc = init_one_libfunc ("__sync_synchronize");
 }

Index: testsuite/gcc.target/arm/synchronize.c
===================================================================
--- testsuite/gcc.target/arm/synchronize.c	(revision 0)
+++ testsuite/gcc.target/arm/synchronize.c	(revision 0)
@@ -0,0 +1,6 @@
+/* { dg-final { scan-assembler "__sync_synchronize" { target arm*-*-linux-*eabi } } } */
+
+void *foo (void)
+{
+  __sync_synchronize();
+}





	


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