aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1994-03-08 16:12:01 -0500
committerRichard Kenner <kenner@gcc.gnu.org>1994-03-08 16:12:01 -0500
commit2cca6e3f3dd2b10d8a136a15d994c9511f2fc932 (patch)
treeca48568c1ce7117d93329edfe83078a8e6e99503
parent2fe204da02529a9a1449fd5c32df6e412fe2d0eb (diff)
downloadgcc-2cca6e3f3dd2b10d8a136a15d994c9511f2fc932.zip
gcc-2cca6e3f3dd2b10d8a136a15d994c9511f2fc932.tar.gz
gcc-2cca6e3f3dd2b10d8a136a15d994c9511f2fc932.tar.bz2
(break_out_memory_refs): Don't call mark_reg_pointer here.
(memory_address): Call it here if X changed and is now a REG or REG + CONST_INT. From-SVN: r6729
-rw-r--r--gcc/explow.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/gcc/explow.c b/gcc/explow.c
index 96c7c12..914abc8 100644
--- a/gcc/explow.c
+++ b/gcc/explow.c
@@ -274,19 +274,17 @@ break_out_memory_refs (x)
if (GET_CODE (x) == MEM
|| (CONSTANT_P (x) && CONSTANT_ADDRESS_P (x)
&& GET_MODE (x) != VOIDmode))
- {
- register rtx temp = force_reg (GET_MODE (x), x);
- mark_reg_pointer (temp);
- x = temp;
- }
+ x = force_reg (GET_MODE (x), x);
else if (GET_CODE (x) == PLUS || GET_CODE (x) == MINUS
|| GET_CODE (x) == MULT)
{
register rtx op0 = break_out_memory_refs (XEXP (x, 0));
register rtx op1 = break_out_memory_refs (XEXP (x, 1));
+
if (op0 != XEXP (x, 0) || op1 != XEXP (x, 1))
x = gen_rtx (GET_CODE (x), Pmode, op0, op1);
}
+
return x;
}
@@ -435,6 +433,17 @@ memory_address (mode, x)
done:
+ /* If we didn't change the address, we are done. Otherwise, mark
+ a reg as a pointer if we have REG or REG + CONST_INT. */
+ if (oldx == x)
+ return x;
+ else if (GET_CODE (x) == REG)
+ mark_reg_pointer (x);
+ else if (GET_CODE (x) == PLUS
+ && GET_CODE (XEXP (x, 0)) == REG
+ && GET_CODE (XEXP (x, 1)) == CONST_INT)
+ mark_reg_pointer (XEXP (x, 0));
+
/* OLDX may have been the address on a temporary. Update the address
to indicate that X is now used. */
update_temp_slot_address (oldx, x);