]> gcc.gnu.org Git - gcc.git/commitdiff
expr.c (store_field): Use adjust_address, not PUT_MODE.
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>
Sat, 29 Dec 2001 21:35:02 +0000 (21:35 +0000)
committerRichard Kenner <kenner@gcc.gnu.org>
Sat, 29 Dec 2001 21:35:02 +0000 (16:35 -0500)
* expr.c (store_field): Use adjust_address, not PUT_MODE.
(expand_expr, case VIEW_CONVERT_EXPR): Likewise.
* reload1.c (eliminate_regs, case SUBREG): Likewise, but use
adjust_address_nv.
* varasm.c (make_decl_rtl): Likewise.
* integrate.c (copy_rtx_and_substitute, case MEM): Likewise, but use
replace_equiv_address_nv.

From-SVN: r48387

gcc/ChangeLog
gcc/expr.c
gcc/integrate.c
gcc/reload1.c
gcc/varasm.c

index 85930d6f0cb576d954b2f27730227b337556ed53..af84a629c8fa1e892c1fefc97e4819dc936b5de9 100644 (file)
@@ -1,5 +1,13 @@
 Sat Dec 29 15:48:54 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
 
+       * expr.c (store_field): Use adjust_address, not PUT_MODE.
+       (expand_expr, case VIEW_CONVERT_EXPR): Likewise.
+       * reload1.c (eliminate_regs, case SUBREG): Likewise, but use
+       adjust_address_nv.
+       * varasm.c (make_decl_rtl): Likewise.
+       * integrate.c (copy_rtx_and_substitute, case MEM): Likewise, but use
+       replace_equiv_address_nv.
+
        * varasm.c (decode_addr_const, case INTEGER_CST): Call
        output_constant_def instead of looking at TREE_CST_RTL.
 
index 1c320b98e015fccd66fd77d492dcd6b58f33f271..60c3431f73a053bdcef7ef91a4715d21fcb3ad52 100644 (file)
@@ -5006,9 +5006,7 @@ store_field (target, bitsize, bitpos, mode, exp, value_mode, unsignedp, type,
        = assign_temp
          (build_qualified_type (type, TYPE_QUALS (type) | TYPE_QUAL_CONST),
           0, 1, 1);
-      rtx blk_object = copy_rtx (object);
-
-      PUT_MODE (blk_object, BLKmode);
+      rtx blk_object = adjust_address (object, BLKmode, 0);
 
       if (bitsize != (HOST_WIDE_INT) GET_MODE_BITSIZE (GET_MODE (target)))
        emit_move_insn (object, target);
@@ -7340,12 +7338,11 @@ expand_expr (exp, target, tmode, modifier)
                       (HOST_WIDE_INT) GET_MODE_SIZE (TYPE_MODE (type)));
              rtx new = assign_stack_temp_for_type (TYPE_MODE (type),
                                                    temp_size, 0, type);
-             rtx new_with_op0_mode = copy_rtx (new);
+             rtx new_with_op0_mode = adjust_address (new, GET_MODE (op0), 0);
 
              if (TREE_ADDRESSABLE (exp))
                abort ();
 
-             PUT_MODE (new_with_op0_mode, GET_MODE (op0));
              if (GET_MODE (op0) == BLKmode)
                emit_block_move (new_with_op0_mode, op0,
                                 GEN_INT (GET_MODE_SIZE (TYPE_MODE (type))));
@@ -7355,7 +7352,7 @@ expand_expr (exp, target, tmode, modifier)
              op0 = new;
            }
       
-         PUT_MODE (op0, TYPE_MODE (type));
+         op0 = adjust_address (op0, TYPE_MODE (type), 0);
        }
 
       return op0;
index ea389815a28261b29b70319a51c30cd66194b3c8..47c4a4db1351890210ee627a1ef6896133ee5c06 100644 (file)
@@ -2263,10 +2263,9 @@ copy_rtx_and_substitute (orig, map, for_lhs)
          return validize_mem (force_const_mem (const_mode, constant));
        }
 
-      copy = rtx_alloc (MEM);
-      PUT_MODE (copy, mode);
-      XEXP (copy, 0) = copy_rtx_and_substitute (XEXP (orig, 0), map, 0);
-      MEM_COPY_ATTRIBUTES (copy, orig);
+     copy = replace_equiv_address_nv (orig,
+                                     copy_rtx_and_substitute (XEXP (orig, 0),
+                                                              map, 0));
 
       /* If inlining and this is not for the LHS, turn off RTX_UNCHANGING_P
         since this may be an indirect reference to a parameter and the
index 451a0906052380d618ee0e55dce9f01c58cf504a..5844932d4cd7761464c0cab778709213684167ad 100644 (file)
@@ -2552,14 +2552,7 @@ eliminate_regs (x, mem_mode, insn)
                   )
                  || x_size == new_size)
              )
-           {
-             int offset = SUBREG_BYTE (x);
-             enum machine_mode mode = GET_MODE (x);
-
-             PUT_MODE (new, mode);
-             XEXP (new, 0) = plus_constant (XEXP (new, 0), offset);
-             return new;
-           }
+           return adjust_address_nv (x, GET_MODE (x), SUBREG_BYTE (x));
          else
            return gen_rtx_SUBREG (GET_MODE (x), new, SUBREG_BYTE (x));
        }
index aabdd17a41ab4e61c594040b5741b475f7a22aee..419791d63630503064e110b1a8f3c3e23071429b 100644 (file)
@@ -840,10 +840,8 @@ make_decl_rtl (decl, asmspec)
     {
       /* If the old RTL had the wrong mode, fix the mode.  */
       if (GET_MODE (DECL_RTL (decl)) != DECL_MODE (decl))
-       {
-         rtx rtl = DECL_RTL (decl);
-         PUT_MODE (rtl, DECL_MODE (decl));
-       }
+       SET_DECL_RTL (decl, adjust_address_nv (DECL_RTL (decl),
+                                              DECL_MODE (decl), 0));
 
       /* ??? Another way to do this would be to do what halfpic.c does
         and maintain a hashed table of such critters.  */
This page took 0.094047 seconds and 5 git commands to generate.