summaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/alpha/alpha.c15
-rw-r--r--gcc/config/arm/arm.md50
-rw-r--r--gcc/config/clipper/clipper.md4
-rw-r--r--gcc/config/dsp16xx/dsp16xx.md4
-rw-r--r--gcc/config/fr30/fr30.c7
-rw-r--r--gcc/config/i370/i370.md21
-rw-r--r--gcc/config/i860/i860.md14
-rw-r--r--gcc/config/i960/i960.md15
-rw-r--r--gcc/config/mips/mips.c22
-rw-r--r--gcc/config/mips/mips.md4
-rw-r--r--gcc/config/pa/pa.md8
-rw-r--r--gcc/config/pdp11/pdp11.md8
-rw-r--r--gcc/config/rs6000/rs6000.c10
-rw-r--r--gcc/config/rs6000/rs6000.md18
-rw-r--r--gcc/config/sh/sh.md2
15 files changed, 90 insertions, 112 deletions
diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c
index ffd378674d0..3ddd7f3d9e1 100644
--- a/gcc/config/alpha/alpha.c
+++ b/gcc/config/alpha/alpha.c
@@ -2930,8 +2930,8 @@ alpha_expand_block_move (operands)
}
/* No appropriate mode; fall back on memory. */
- orig_src = change_address (orig_src, GET_MODE (orig_src),
- copy_addr_to_reg (XEXP (orig_src, 0)));
+ orig_src = replace_equiv_address (orig_src,
+ copy_addr_to_reg (XEXP (orig_src, 0)));
src_align = GET_MODE_BITSIZE (GET_MODE (tmp));
}
@@ -2961,9 +2961,7 @@ alpha_expand_block_move (operands)
for (i = 0; i < words; ++i)
emit_move_insn (data_regs[nregs + i],
- change_address (orig_src, SImode,
- plus_constant (XEXP (orig_src, 0),
- ofs + i * 4)));
+ adjust_address (orig_src, SImode, ofs + i * 4));
nregs += words;
bytes -= words * 4;
@@ -3076,8 +3074,8 @@ alpha_expand_block_move (operands)
/* No appropriate mode; fall back on memory. We can speed things
up by recognizing extra alignment information. */
- orig_dst = change_address (orig_dst, GET_MODE (orig_dst),
- copy_addr_to_reg (XEXP (orig_dst, 0)));
+ orig_dst = replace_equiv_address (orig_dst,
+ copy_addr_to_reg (XEXP (orig_dst, 0)));
dst_align = GET_MODE_BITSIZE (GET_MODE (tmp));
}
@@ -3229,8 +3227,7 @@ alpha_expand_block_clear (operands)
}
/* No appropriate mode; fall back on memory. */
- orig_dst = change_address (orig_dst, GET_MODE (orig_dst),
- copy_addr_to_reg (tmp));
+ orig_dst = replace_equiv_address (orig_dst, copy_addr_to_reg (tmp));
align = GET_MODE_BITSIZE (GET_MODE (XEXP (tmp, 0)));
}
diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md
index 663877de3e4..fea195483d5 100644
--- a/gcc/config/arm/arm.md
+++ b/gcc/config/arm/arm.md
@@ -4282,15 +4282,15 @@
"TARGET_ARM"
"
{
- rtx addr = XEXP (operands[1], 0);
+ rtx op1 = operands[1];
+ rtx addr = XEXP (op1, 0);
enum rtx_code code = GET_CODE (addr);
if ((code == PLUS && GET_CODE (XEXP (addr, 1)) != CONST_INT)
|| code == MINUS)
- addr = force_reg (SImode, addr);
+ op1 = replace_equiv_address (operands[1], force_reg (SImode, addr));
- operands[4] = change_address (operands[1], QImode,
- plus_constant (addr, 1));
+ operands[4] = adjust_address (op1, QImode, 1);
operands[1] = adjust_address (operands[1], QImode, 0);
operands[3] = gen_lowpart (QImode, operands[0]);
operands[0] = gen_lowpart (SImode, operands[0]);
@@ -4306,15 +4306,15 @@
"TARGET_ARM"
"
{
- rtx addr = XEXP (operands[1], 0);
+ rtx op1 = operands[1];
+ rtx addr = XEXP (op1, 0);
enum rtx_code code = GET_CODE (addr);
if ((code == PLUS && GET_CODE (XEXP (addr, 1)) != CONST_INT)
|| code == MINUS)
- addr = force_reg (SImode, addr);
+ op1 = replace_equiv_address (op1, force_reg (SImode, addr));
- operands[4] = change_address (operands[1], QImode,
- plus_constant (addr, 1));
+ operands[4] = adjust_address (op1, QImode, 1);
operands[1] = adjust_address (operands[1], QImode, 0);
operands[3] = gen_lowpart (QImode, operands[0]);
operands[0] = gen_lowpart (SImode, operands[0]);
@@ -4332,11 +4332,12 @@
{
HOST_WIDE_INT value = INTVAL (operands[1]);
rtx addr = XEXP (operands[0], 0);
+ rtx op0 = operands[0];
enum rtx_code code = GET_CODE (addr);
if ((code == PLUS && GET_CODE (XEXP (addr, 1)) != CONST_INT)
|| code == MINUS)
- addr = force_reg (SImode, addr);
+ op0 = replace_equiv_address (op0, force_reg (SImode, addr));
operands[1] = gen_reg_rtx (SImode);
if (BYTES_BIG_ENDIAN)
@@ -4362,8 +4363,7 @@
}
}
- operands[3] = change_address (operands[0], QImode,
- plus_constant (addr, 1));
+ operands[3] = adjust_address (op0, QImode, 1);
operands[0] = adjust_address (operands[0], QImode, 0);
}"
)
@@ -4550,18 +4550,16 @@
if (GET_CODE (operands[0]) == MEM
&& !memory_address_p (GET_MODE (operands[0]),
XEXP (operands[0], 0)))
- {
- rtx temp = copy_to_reg (XEXP (operands[0], 0));
- operands[0] = change_address (operands[0], VOIDmode, temp);
- }
+ operands[0]
+ = replace_equiv_address (operands[0],
+ copy_to_reg (XEXP (operands[0], 0)));
if (GET_CODE (operands[1]) == MEM
&& !memory_address_p (GET_MODE (operands[1]),
XEXP (operands[1], 0)))
- {
- rtx temp = copy_to_reg (XEXP (operands[1], 0));
- operands[1] = change_address (operands[1], VOIDmode, temp);
- }
+ operands[1]
+ = replace_equiv_address (operands[1],
+ copy_to_reg (XEXP (operands[1], 0)));
}
/* Handle loading a large integer during reload */
else if (GET_CODE (operands[1]) == CONST_INT
@@ -4850,17 +4848,15 @@
if (GET_CODE (operands[0]) == MEM
&& !memory_address_p (GET_MODE (operands[0]),
XEXP (operands[0], 0)))
- {
- rtx temp = copy_to_reg (XEXP (operands[0], 0));
- operands[0] = change_address (operands[0], VOIDmode, temp);
- }
+ operands[0]
+ = replace_equiv_address (operands[0],
+ copy_to_reg (XEXP (operands[0], 0)));
if (GET_CODE (operands[1]) == MEM
&& !memory_address_p (GET_MODE (operands[1]),
XEXP (operands[1], 0)))
- {
- rtx temp = copy_to_reg (XEXP (operands[1], 0));
- operands[1] = change_address (operands[1], VOIDmode, temp);
- }
+ operands[1]
+ = replace_equiv_address (operands[1],
+ copy_to_reg (XEXP (operands[1], 0)));
}
/* Handle loading a large integer during reload */
else if (GET_CODE (operands[1]) == CONST_INT
diff --git a/gcc/config/clipper/clipper.md b/gcc/config/clipper/clipper.md
index 95f402ed7bd..2d2a504d6b8 100644
--- a/gcc/config/clipper/clipper.md
+++ b/gcc/config/clipper/clipper.md
@@ -531,8 +531,8 @@
operands[6] = addr0;
operands[7] = addr1;
- operands[0] = change_address (operands[0], VOIDmode, addr0);
- operands[1] = change_address (operands[1], VOIDmode, addr1);
+ operands[0] = replace_equiv_address (operands[0], addr0);
+ operands[1] = replace_equiv_address (operands[1], addr1);
if (GET_CODE (operands[2]) != CONST_INT)
operands[2] = force_reg (SImode, operands[2]);
diff --git a/gcc/config/dsp16xx/dsp16xx.md b/gcc/config/dsp16xx/dsp16xx.md
index 2d821b5504a..4e851554b27 100644
--- a/gcc/config/dsp16xx/dsp16xx.md
+++ b/gcc/config/dsp16xx/dsp16xx.md
@@ -1131,8 +1131,8 @@
operands[5] = addr0;
operands[6] = addr1;
- operands[0] = change_address (operands[0], VOIDmode, addr0);
- operands[1] = change_address (operands[1], VOIDmode, addr1);
+ operands[0] = replace_equiv_address (operands[0], VOIDmode, addr0);
+ operands[1] = replace_equiv_address (operands[1], VOIDmode, addr1);
}")
(define_insn ""
diff --git a/gcc/config/fr30/fr30.c b/gcc/config/fr30/fr30.c
index 0c18c652e11..8fcad88314a 100644
--- a/gcc/config/fr30/fr30.c
+++ b/gcc/config/fr30/fr30.c
@@ -1007,7 +1007,7 @@ fr30_move_double (operands)
if (reverse)
{
emit_insn (gen_rtx_SET (VOIDmode, dest1,
- change_address (src, SImode, addr)));
+ adjust_address (src, SImode, 0)));
emit_insn (gen_rtx_SET (SImode, dest0,
gen_rtx_REG (SImode, REGNO (addr))));
emit_insn (gen_rtx_SET (SImode, dest0,
@@ -1021,7 +1021,7 @@ fr30_move_double (operands)
else
{
emit_insn (gen_rtx_SET (VOIDmode, dest0,
- change_address (src, SImode, addr)));
+ adjust_address (src, SImode, 0)));
emit_insn (gen_rtx_SET (SImode, dest1,
gen_rtx_REG (SImode, REGNO (addr))));
emit_insn (gen_rtx_SET (SImode, dest1,
@@ -1058,8 +1058,7 @@ fr30_move_double (operands)
src0 = operand_subword (src, 0, TRUE, mode);
src1 = operand_subword (src, 1, TRUE, mode);
- emit_insn (gen_rtx_SET (VOIDmode,
- change_address (dest, SImode, addr),
+ emit_insn (gen_rtx_SET (VOIDmode, adjust_address (dest, SImode, 0),
src0));
if (REGNO (addr) == STACK_POINTER_REGNUM
diff --git a/gcc/config/i370/i370.md b/gcc/config/i370/i370.md
index 7ef666e4323..c0d05e6e791 100644
--- a/gcc/config/i370/i370.md
+++ b/gcc/config/i370/i370.md
@@ -1380,21 +1380,6 @@ check_label_emit ();
""
"
{
-/*
- XXX bogus, i think, unless change_address has a side effet we need
- rtx op0;
-
- op0 = XEXP (operands[0], 0);
- if (GET_CODE (op0) == REG
- || (GET_CODE (op0) == PLUS && GET_CODE (XEXP (op0, 0)) == REG
- && GET_CODE (XEXP (op0, 1)) == CONST_INT
- && (unsigned) INTVAL (XEXP (op0, 1)) < 4096))
- op0 = operands[0];
- else
- op0 = change_address (operands[0], VOIDmode,
- copy_to_mode_reg (SImode, op0));
-
-*/
{
/* implementation suggested by Richard Henderson <rth@cygnus.com> */
rtx reg1 = gen_reg_rtx (DImode);
@@ -1442,8 +1427,7 @@ check_label_emit ();
&& (unsigned) INTVAL (XEXP (op0, 1)) < 4096))
op0 = operands[0];
else
- op0 = change_address (operands[0], VOIDmode,
- copy_to_mode_reg (SImode, op0));
+ op0 = replace_equiv_address (operands[0], copy_to_mode_reg (SImode, op0));
op1 = XEXP (operands[1], 0);
if (GET_CODE (op1) == REG
@@ -1452,8 +1436,7 @@ check_label_emit ();
&& (unsigned) INTVAL (XEXP (op1, 1)) < 4096))
op1 = operands[1];
else
- op1 = change_address (operands[1], VOIDmode,
- copy_to_mode_reg (SImode, op1));
+ op1 = replace_equiv_address (operands[1], copy_to_mode_reg (SImode, op1));
if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) < 256)
emit_insn (gen_rtx_PARALLEL (VOIDmode,
diff --git a/gcc/config/i860/i860.md b/gcc/config/i860/i860.md
index beeabe6927b..eda051c5b57 100644
--- a/gcc/config/i860/i860.md
+++ b/gcc/config/i860/i860.md
@@ -1022,8 +1022,8 @@
operands[7] = copy_to_mode_reg (SImode, XEXP (operands[0], 0));
operands[8] = copy_to_mode_reg (SImode, XEXP (operands[1], 0));
- operands[0] = change_address (operands[0], VOIDmode, operands[7]);
- operands[1] = change_address (operands[1], VOIDmode, operands[8]);
+ operands[0] = replace_equiv_address (operands[0], operands[7]);
+ operands[1] = replace_equiv_address (operands[1], operands[8]);
}")
(define_insn ""
@@ -2127,8 +2127,9 @@ fmul.ss %1,%0,%4\;fmul.ss %3,%4,%0\";
/* Make sure the address is just one reg and will stay that way. */
if (! call_insn_operand (operands[0], QImode))
operands[0]
- = change_address (operands[0], VOIDmode,
- copy_to_mode_reg (Pmode, XEXP (operands[0], 0)));
+ = replace_equiv_address (operands[0],
+ copy_to_mode_reg (Pmode,
+ XEXP (operands[0], 0)));
if (INTVAL (operands[1]) > 0)
{
emit_move_insn (arg_pointer_rtx, stack_pointer_rtx);
@@ -2195,8 +2196,9 @@ fmul.ss %1,%0,%4\;fmul.ss %3,%4,%0\";
/* Make sure the address is just one reg and will stay that way. */
if (! call_insn_operand (operands[1], QImode))
operands[1]
- = change_address (operands[1], VOIDmode,
- copy_to_mode_reg (Pmode, XEXP (operands[1], 0)));
+ = replace_equiv_address (operands[1],
+ copy_to_mode_reg (Pmode,
+ XEXP (operands[1], 0)));
if (INTVAL (operands[2]) > 0)
{
emit_move_insn (arg_pointer_rtx, stack_pointer_rtx);
diff --git a/gcc/config/i960/i960.md b/gcc/config/i960/i960.md
index 341d13c540c..282297d5a7d 100644
--- a/gcc/config/i960/i960.md
+++ b/gcc/config/i960/i960.md
@@ -1004,7 +1004,7 @@
{
int regno;
int count;
- rtx from;
+ int offset = 0;
if (GET_CODE (operands[0]) != MEM
|| GET_CODE (operands[1]) != REG
@@ -1016,30 +1016,29 @@
FAIL;
regno = REGNO (operands[1]);
- from = memory_address (SImode, XEXP (operands[0], 0));
while (count >= 4 && ((regno & 3) == 0))
{
- emit_move_insn (change_address (operands[0], TImode, from),
+ emit_move_insn (adjust_address (operands[0], TImode, offset),
gen_rtx_REG (TImode, regno));
count -= 4;
regno += 4;
- from = memory_address (TImode, plus_constant (from, 16));
+ offset += 16;
}
while (count >= 2 && ((regno & 1) == 0))
{
- emit_move_insn (change_address (operands[0], DImode, from),
+ emit_move_insn (adjust_address (operands[0], DImode, offset),
gen_rtx_REG (DImode, regno));
count -= 2;
regno += 2;
- from = memory_address (DImode, plus_constant (from, 8));
+ offset += 8;
}
while (count > 0)
{
- emit_move_insn (change_address (operands[0], SImode, from),
+ emit_move_insn (adjust_address (operands[0], SImode, offset),
gen_rtx_REG (SImode, regno));
count -= 1;
regno += 1;
- from = memory_address (SImode, plus_constant (from, 4));
+ offset += 4;
}
DONE;
}")
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index 0a614d90098..37cb19bc31b 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -3248,11 +3248,11 @@ block_move_loop (dest_reg, src_reg, bytes, align, orig_dest, orig_src)
rtx src_reg; /* register holding source address */
unsigned int bytes; /* # bytes to move */
int align; /* alignment */
- rtx orig_dest; /* original dest for change_address */
+ rtx orig_dest; /* original dest */
rtx orig_src; /* original source for making a reg note */
{
- rtx dest_mem = change_address (orig_dest, BLKmode, dest_reg);
- rtx src_mem = change_address (orig_src, BLKmode, src_reg);
+ rtx dest_mem = replace_equiv_address (orig_dest, dest_reg);
+ rtx src_mem = replace_equiv_address (orig_src, src_reg);
rtx align_rtx = GEN_INT (align);
rtx label;
rtx final_src;
@@ -3383,10 +3383,10 @@ expand_block_move (operands)
move_by_pieces (orig_dest, orig_src, bytes, align * BITS_PER_WORD);
else if (constp && bytes <= (unsigned)2 * MAX_MOVE_BYTES)
- emit_insn (gen_movstrsi_internal (change_address (orig_dest, BLKmode,
- dest_reg),
- change_address (orig_src, BLKmode,
- src_reg),
+ emit_insn (gen_movstrsi_internal (replace_equiv_address (orig_dest,
+ dest_reg),
+ replace_equiv_address (orig_src,
+ src_reg),
bytes_rtx, align_rtx));
else if (constp && align >= (unsigned) UNITS_PER_WORD && optimize)
@@ -3433,10 +3433,10 @@ expand_block_move (operands)
/* Bytes at the end of the loop. */
if (leftover)
- emit_insn (gen_movstrsi_internal (change_address (orig_dest, BLKmode,
- dest_reg),
- change_address (orig_src, BLKmode,
- src_reg),
+ emit_insn (gen_movstrsi_internal (replace_equiv_address (orig_dest,
+ dest_reg),
+ replace_equiv_address (orig_src,
+ src_reg),
GEN_INT (leftover),
GEN_INT (align)));
}
diff --git a/gcc/config/mips/mips.md b/gcc/config/mips/mips.md
index bba9645b4eb..c55c128f331 100644
--- a/gcc/config/mips/mips.md
+++ b/gcc/config/mips/mips.md
@@ -5066,7 +5066,7 @@ move\\t%0,%z4\\n\\
{
rtx memword, offword, hi_word, lo_word;
rtx addr = find_replacement (&XEXP (operands[1], 0));
- rtx op1 = change_address (operands[1], VOIDmode, addr);
+ rtx op1 = replace_equiv_address (operands[1], addr);
scratch = gen_rtx_REG (SImode, REGNO (scratch));
memword = adjust_address (op1, SImode, 0);
@@ -5146,7 +5146,7 @@ move\\t%0,%z4\\n\\
{
rtx scratch, memword, offword, hi_word, lo_word;
rtx addr = find_replacement (&XEXP (operands[0], 0));
- rtx op0 = change_address (operands[0], VOIDmode, addr);
+ rtx op0 = replace_equiv_address (operands[0], addr);
scratch = gen_rtx_REG (SImode, REGNO (operands[2]));
memword = adjust_address (op0, SImode, 0);
diff --git a/gcc/config/pa/pa.md b/gcc/config/pa/pa.md
index ab587b391b6..59b4c766fa2 100644
--- a/gcc/config/pa/pa.md
+++ b/gcc/config/pa/pa.md
@@ -2814,11 +2814,11 @@
/* Fall through means we're going to use our block move pattern. */
operands[0]
- = change_address (operands[0], VOIDmode,
- copy_to_mode_reg (SImode, XEXP (operands[0], 0)));
+ = replace_equiv_address (operands[0],
+ copy_to_mode_reg (SImode, XEXP (operands[0], 0)));
operands[1]
- = change_address (operands[1], VOIDmode,
- copy_to_mode_reg (SImode, XEXP (operands[1], 0)));
+ = replace_equiv_address (operands[1],
+ copy_to_mode_reg (SImode, XEXP (operands[1], 0)));
operands[4] = gen_reg_rtx (SImode);
operands[5] = gen_reg_rtx (SImode);
operands[6] = gen_reg_rtx (SImode);
diff --git a/gcc/config/pdp11/pdp11.md b/gcc/config/pdp11/pdp11.md
index 93fac95be81..98a10c01e48 100644
--- a/gcc/config/pdp11/pdp11.md
+++ b/gcc/config/pdp11/pdp11.md
@@ -696,11 +696,11 @@
"
{
operands[0]
- = change_address (operands[0], VOIDmode,
- copy_to_mode_reg (Pmode, XEXP (operands[0], 0)));
+ = replace_equiv_address (operands[0],
+ copy_to_mode_reg (Pmode, XEXP (operands[0], 0)));
operands[1]
- = change_address (operands[1], VOIDmode,
- copy_to_mode_reg (Pmode, XEXP (operands[1], 0)));
+ = replace_equiv_address (operands[1],
+ copy_to_mode_reg (Pmode, XEXP (operands[1], 0)));
operands[5] = XEXP (operands[0], 0);
operands[6] = XEXP (operands[1], 0);
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index b9f2348c5ef..2f35583bb34 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -1866,14 +1866,16 @@ rs6000_emit_move (dest, source, mode)
if (GET_CODE (operands[0]) == MEM
&& GET_CODE (XEXP (operands[0], 0)) != REG
&& ! reload_in_progress)
- operands[0] = change_address (operands[0], TImode,
- copy_addr_to_reg (XEXP (operands[0], 0)));
+ operands[0]
+ = replace_equiv_address (operands[0],
+ copy_addr_to_reg (XEXP (operands[0], 0)));
if (GET_CODE (operands[1]) == MEM
&& GET_CODE (XEXP (operands[1], 0)) != REG
&& ! reload_in_progress)
- operands[1] = change_address (operands[1], TImode,
- copy_addr_to_reg (XEXP (operands[1], 0)));
+ operands[1]
+ = replace_equiv_address (operands[1],
+ copy_addr_to_reg (XEXP (operands[1], 0)));
break;
default:
diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
index 5be801da94b..e23e289ec33 100644
--- a/gcc/config/rs6000/rs6000.md
+++ b/gcc/config/rs6000/rs6000.md
@@ -1,6 +1,6 @@
;; Machine description for IBM RISC System 6000 (POWER) for GNU C compiler
;; Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-;; 1999, 2000 Free Software Foundation, Inc.
+;; 1999, 2000, 2001 Free Software Foundation, Inc.
;; Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
;; This file is part of GNU CC.
@@ -8257,7 +8257,7 @@ operands[2] = GEN_INT (INTVAL (operands[1]) >> 32);
{
int regno;
int count;
- rtx from;
+ rtx op1;
int i;
/* Support only loading a constant number of fixed-point registers from
@@ -8275,13 +8275,13 @@ operands[2] = GEN_INT (INTVAL (operands[1]) >> 32);
regno = REGNO (operands[0]);
operands[3] = gen_rtx_PARALLEL (VOIDmode, rtvec_alloc (count));
- from = force_reg (SImode, XEXP (operands[1], 0));
+ op1 = replace_equiv_address (operands[1],
+ force_reg (SImode, XEXP (operands[1], 0)));
for (i = 0; i < count; i++)
XVECEXP (operands[3], 0, i)
= gen_rtx_SET (VOIDmode, gen_rtx_REG (SImode, regno + i),
- change_address (operands[1], SImode,
- plus_constant (from, i * 4)));
+ adjust_address (op1, SImode, i * 4));
}")
(define_insn ""
@@ -8354,6 +8354,7 @@ operands[2] = GEN_INT (INTVAL (operands[1]) >> 32);
int regno;
int count;
rtx to;
+ rtx op0;
int i;
/* Support only storing a constant number of fixed-point registers to
@@ -8372,18 +8373,17 @@ operands[2] = GEN_INT (INTVAL (operands[1]) >> 32);
operands[3] = gen_rtx_PARALLEL (VOIDmode, rtvec_alloc (count + 1));
to = force_reg (SImode, XEXP (operands[0], 0));
+ op0 = replace_equiv_address (operands[0], to);
XVECEXP (operands[3], 0, 0)
- = gen_rtx_SET (VOIDmode, change_address (operands[0], SImode, to),
- operands[1]);
+ = gen_rtx_SET (VOIDmode, op0, operands[1]);
XVECEXP (operands[3], 0, 1) = gen_rtx_CLOBBER (VOIDmode,
gen_rtx_SCRATCH (SImode));
for (i = 1; i < count; i++)
XVECEXP (operands[3], 0, i + 1)
= gen_rtx_SET (VOIDmode,
- change_address (operands[0], SImode,
- plus_constant (to, i * 4)),
+ adjust_address (op0, SImode, i * 4),
gen_rtx_REG (SImode, regno + i));
}")
diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md
index eb3c88b0c61..c625b702a05 100644
--- a/gcc/config/sh/sh.md
+++ b/gcc/config/sh/sh.md
@@ -5028,7 +5028,7 @@
emit_insn (gen_movsi (shift_reg, operands[3]));
addr_target = copy_addr_to_reg (plus_constant (orig_address, size - 1));
- operands[0] = change_address (operands[0], QImode, addr_target);
+ operands[0] = replace_equiv_address (operands[0], addr_target);
emit_insn (gen_movqi (operands[0], gen_rtx_SUBREG (QImode, shift_reg, 0)));
while (size -= 1)