]> gcc.gnu.org Git - gcc.git/commitdiff
sync.md (mem_thread_fence): Mask operands[0] with MEMMODEL_MASK to determine memory...
authorUros Bizjak <uros@gcc.gnu.org>
Sun, 13 Jan 2013 19:06:54 +0000 (20:06 +0100)
committerUros Bizjak <uros@gcc.gnu.org>
Sun, 13 Jan 2013 19:06:54 +0000 (20:06 +0100)
* config/i386/sync.md (mem_thread_fence): Mask operands[0] with
MEMMODEL_MASK to determine memory model.
(atomic_store<mode>): Ditto from operands[2].
* config/i386/i386.c (ix86_memmodel_check): Declare "strong" as bool.

From-SVN: r195137

gcc/ChangeLog
gcc/config/i386/i386.c
gcc/config/i386/sync.md
gcc/testsuite/ChangeLog

index 59a16bbdf635a4d7636a9a4538837d21df4c4440..853c2d789c659af410b1b6a15970eec74b0eaca3 100644 (file)
@@ -1,8 +1,14 @@
+2013-01-13  Uros Bizjak  <ubizjak@gmail.com>
+
+       * config/i386/sync.md (mem_thread_fence): Mask operands[0] with
+       MEMMODEL_MASK to determine memory model.
+       (atomic_store<mode>): Ditto from operands[2].
+       * config/i386/i386.c (ix86_memmodel_check): Declare "strong" as bool.
+
 2013-01-13  Jakub Jelinek  <jakub@redhat.com>
 
        PR fortran/55935
-       * gimple-fold.c (get_symbol_constant_value): Call
-       unshare_expr.
+       * gimple-fold.c (get_symbol_constant_value): Call unshare_expr.
        (fold_gimple_assign): Don't call unshare_expr here.
        (fold_ctor_reference): Call unshare_expr.
 
@@ -61,7 +67,7 @@
 
 2013-01-10  Richard Sandiford  <rdsandiford@googlemail.com>
 
-       Update copyright years
+       Update copyright years.
 
 2013-01-10  Vladimir Makarov  <vmakarov@redhat.com>
 
index 723c654edc70ad88d8996360e2ea84186f452d66..4f778c1c85592d2e92d317200d31c3f6163edb4e 100644 (file)
@@ -42082,7 +42082,7 @@ static unsigned HOST_WIDE_INT
 ix86_memmodel_check (unsigned HOST_WIDE_INT val)
 {
   unsigned HOST_WIDE_INT model = val & MEMMODEL_MASK;
-  unsigned HOST_WIDE_INT strong;
+  bool strong;
 
   if (val & ~(unsigned HOST_WIDE_INT)(IX86_HLE_ACQUIRE|IX86_HLE_RELEASE
                                      |MEMMODEL_MASK)
index a2ea7b24e84e0df6e5ff1d54e6460baff3129dbc..83198b93c0118e2188a2e345e134ccbddcc7d9f0 100644 (file)
   [(match_operand:SI 0 "const_int_operand")]           ;; model
   ""
 {
+  enum memmodel model = (enum memmodel) (INTVAL (operands[0]) & MEMMODEL_MASK);
+
   /* Unless this is a SEQ_CST fence, the i386 memory model is strong
      enough not to require barriers of any kind.  */
-  if (INTVAL (operands[0]) == MEMMODEL_SEQ_CST)
+  if (model == MEMMODEL_SEQ_CST)
     {
       rtx (*mfence_insn)(rtx);
       rtx mem;
                       UNSPEC_MOVA))]
   ""
 {
-  enum memmodel model = (enum memmodel) INTVAL (operands[2]);
+  enum memmodel model = (enum memmodel) (INTVAL (operands[2]) & MEMMODEL_MASK);
 
   if (<MODE>mode == DImode && !TARGET_64BIT)
     {
index 67671a86eca419a81dd023462ee8d0b5868b703f..f567a72683ac10e4ed1c2ee4c7604257b7340ac2 100644 (file)
@@ -52,7 +52,7 @@
 
 2013-01-10  Vladimir Makarov  <vmakarov@redhat.com>
 
-       PR rtl-optimization/pr55672
+       PR rtl-optimization/55672
        * gcc.target/i386/pr55672.c: New.
 
 2013-01-10  Jeff Law  <law@redhat.com>
This page took 0.098457 seconds and 5 git commands to generate.