This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[gomp] Make MEM volatile in the __sync_compare_and_swap[qh]i emulation code
- From: Jakub Jelinek <jakub at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 1 Nov 2005 15:55:28 -0500
- Subject: [gomp] Make MEM volatile in the __sync_compare_and_swap[qh]i emulation code
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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