]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
revert: backport: function.c (fixup_var_refs): Save volatile_ok and set to 1.
authorMark Mitchell <mark@codesourcery.com>
Wed, 11 May 2005 21:19:54 +0000 (21:19 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Wed, 11 May 2005 21:19:54 +0000 (21:19 +0000)
Revert:
2005-05-10  H.J. Lu  <hongjiu.lu@intel.com>
Backport from mainline
2004-02-12  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
* function.c (fixup_var_refs): Save volatile_ok and set to 1.
* expr.c (emit_block_move_via_movstr): Save and restore
volatile_ok.
2005-05-09  Grigory Tolstolytkin  <gtolstolytkin@ru.mvista.com>
Backport from mainline
2004-02-12  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
* emit-rtl.c (set_mem_attributes_minus_bitpos): Don't kill previous
MEM_VOLATILE in REF.

From-SVN: r99595

gcc/ChangeLog
gcc/emit-rtl.c
gcc/expr.c
gcc/function.c

index 6be5a36b676f2e1442c016f52b7dbfaa99c6fc6c..8b6d26aa49eea0c2e3d71f3136edb98e97651c1e 100644 (file)
@@ -1,3 +1,18 @@
+2005-05-11  Mark Mitchell  <mark@codesourcery.com>
+
+       Revert:
+       2005-05-10  H.J. Lu  <hongjiu.lu@intel.com>
+       Backport from mainline
+       2004-02-12  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
+       * function.c (fixup_var_refs): Save volatile_ok and set to 1.
+       * expr.c (emit_block_move_via_movstr): Save and restore
+       volatile_ok.
+       2005-05-09  Grigory Tolstolytkin  <gtolstolytkin@ru.mvista.com>
+       Backport from mainline
+       2004-02-12  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
+       * emit-rtl.c (set_mem_attributes_minus_bitpos): Don't kill previous
+       MEM_VOLATILE in REF.
+
 2005-05-11  Ben Elliston  <bje@au.ibm.com>
 
        * dwarf2out.c: Revert my 2005-05-10 patch.
index 92832256f93bf8302b4b3e7baef2e4e059ac8f1e..9df2d6c4f8ddb75498e5447c71f427ca996e0362 100644 (file)
@@ -1592,7 +1592,7 @@ set_mem_attributes_minus_bitpos (rtx ref, tree t, int objectp,
      front-end routine) and use it.  */
   alias = get_alias_set (t);
 
-  MEM_VOLATILE_P (ref) |= TYPE_VOLATILE (type);
+  MEM_VOLATILE_P (ref) = TYPE_VOLATILE (type);
   MEM_IN_STRUCT_P (ref) = AGGREGATE_TYPE_P (type);
   RTX_UNCHANGING_P (ref)
     |= ((lang_hooks.honor_readonly
index 1ce2fa4b793c63645f714550ce91446071c8fcd3..fcb5b0c78d68f3d611b0274a23e2f05e3dcd5710 100644 (file)
@@ -1452,7 +1452,6 @@ static bool
 emit_block_move_via_movstr (rtx x, rtx y, rtx size, unsigned int align)
 {
   rtx opalign = GEN_INT (align / BITS_PER_UNIT);
-  int save_volatile_ok = volatile_ok;
   enum machine_mode mode;
 
   /* Since this is a move insn, we don't care about volatility.  */
@@ -1502,7 +1501,7 @@ emit_block_move_via_movstr (rtx x, rtx y, rtx size, unsigned int align)
          if (pat)
            {
              emit_insn (pat);
-             volatile_ok = save_volatile_ok;
+             volatile_ok = 0;
              return true;
            }
          else
@@ -1510,7 +1509,7 @@ emit_block_move_via_movstr (rtx x, rtx y, rtx size, unsigned int align)
        }
     }
 
-  volatile_ok = save_volatile_ok;
+  volatile_ok = 0;
   return false;
 }
 
index 206b11ddddeef9ba8eab911ab8f7e03260ff3260..087467cc0cddbbf50b8b5574ba566581fff98af3 100644 (file)
@@ -1517,7 +1517,6 @@ fixup_var_refs (rtx var, enum machine_mode promoted_mode, int unsignedp,
   rtx first_insn = get_insns ();
   struct sequence_stack *stack = seq_stack;
   tree rtl_exps = rtl_expr_chain;
-  int save_volatile_ok = volatile_ok;
 
   /* If there's a hash table, it must record all uses of VAR.  */
   if (ht)
@@ -1529,9 +1528,6 @@ fixup_var_refs (rtx var, enum machine_mode promoted_mode, int unsignedp,
       return;
     }
 
-  /* Volatile is valid in MEMs because all we're doing in changing the
-     address inside.  */
-  volatile_ok = 1;
   fixup_var_refs_insns (first_insn, var, promoted_mode, unsignedp,
                        stack == 0, may_share);
 
@@ -1559,8 +1555,6 @@ fixup_var_refs (rtx var, enum machine_mode promoted_mode, int unsignedp,
          end_sequence ();
        }
     }
-
-  volatile_ok = save_volatile_ok;
 }
 \f
 /* REPLACEMENTS is a pointer to a list of the struct fixup_replacement and X is