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]

[gomp] Make MEM volatile in the __sync_compare_and_swap[qh]i emulation code


Hi!

Missed making the new memory volatile...

2005-11-01  Jakub Jelinek  <jakub@redhat.com>

	* config/sparc/sparc.c (sparc_expand_compare_and_swap_12): Copy
	MEM_VOLATILE_P flag from MEM to MEMSI.

--- gcc/config/sparc/sparc.c.jj	2005-11-01 14:30:33.000000000 +0100
+++ gcc/config/sparc/sparc.c	2005-11-01 21:34:49.000000000 +0100
@@ -8734,6 +8734,7 @@ sparc_expand_compare_and_swap_12 (rtx re
 			  gen_rtx_AND (SImode, addr1, GEN_INT (3))));
 
   memsi = gen_rtx_MEM (SImode, addr);
+  MEM_VOLATILE_P (memsi) = MEM_VOLATILE_P (mem);
 
   val = force_reg (SImode, memsi);
 

	Jakub


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