http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55981



--- Comment #8 from Uros Bizjak <ubizjak at gmail dot com> 2013-01-15 19:37:55 
UTC ---

Actually, the patch from comment(In reply to comment #6)

> Created attachment 29169 [details]

> Patch that prevents non-atomic immediates in moves to volatile memory location



This patch doesn't actually work. Floating point moves split to DImode move

pattern, and they assume that all immediates can be passed.



Original test can be fixed on 4.8 by following patch:



--cut here--

Index: sync.md

===================================================================

--- sync.md     (revision 195207)

+++ sync.md     (working copy)

@@ -225,11 +225,8 @@

        }



       /* Otherwise use a store.  */

-      if (INTVAL (operands[2]) & IX86_HLE_RELEASE)

-       emit_insn (gen_atomic_store<mode>_1 (operands[0], operands[1],

-                                            operands[2]));

-      else

-       emit_move_insn (operands[0], operands[1]);

+      emit_insn (gen_atomic_store<mode>_1 (operands[0], operands[1],

+                                          operands[2]));

     }

   /* ... followed by an MFENCE, if required.  */

   if (model == MEMMODEL_SEQ_CST)

--cut here--

Reply via email to