aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>2000-01-01 00:07:54 +0000
committerRichard Kenner <kenner@gcc.gnu.org>1999-12-31 19:07:54 -0500
commit700f19f09fdeb75c173cd31b38acee11f6f88356 (patch)
treeba1be5dc0460b0f5df814a49d8c3db765366ce78
parent2c33b220da50f14dd23e40cadcca51232a781579 (diff)
downloadgcc-700f19f09fdeb75c173cd31b38acee11f6f88356.zip
gcc-700f19f09fdeb75c173cd31b38acee11f6f88356.tar.gz
gcc-700f19f09fdeb75c173cd31b38acee11f6f88356.tar.bz2
function.c (update_temp_slot_address): Handle case where sum of temporary address plus offset in register is a valid...
* function.c (update_temp_slot_address): Handle case where sum of temporary address plus offset in register is a valid address. From-SVN: r31153
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/function.c19
2 files changed, 20 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 4bcdb47..acf044a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+Fri Dec 31 19:10:31 1999 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * function.c (update_temp_slot_address): Handle case where sum of
+ temporary address plus offset in register is a valid address.
+
1999-12-30 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
* genrecog.c (change_state) Corrected typo.
diff --git a/gcc/function.c b/gcc/function.c
index 77b1941..a551e24 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -978,12 +978,23 @@ update_temp_slot_address (old, new)
p = find_temp_slot_from_address (old);
- /* If we didn't find one, see if both OLD and NEW are a PLUS and if
- there is a register in common between them. If so, try a recursive
- call on those values. */
+ /* If we didn't find one, see if both OLD is a PLUS. If so, and NEW
+ is a register, see if one operand of the PLUS is a temporary
+ location. If so, NEW points into it. Otherwise, if both OLD and
+ NEW are a PLUS and if there is a register in common between them.
+ If so, try a recursive call on those values. */
if (p == 0)
{
- if (GET_CODE (old) != PLUS || GET_CODE (new) != PLUS)
+ if (GET_CODE (old) != PLUS)
+ return;
+
+ if (GET_CODE (new) == REG)
+ {
+ update_temp_slot_address (XEXP (old, 0), new);
+ update_temp_slot_address (XEXP (old, 1), new);
+ return;
+ }
+ else if (GET_CODE (new) != PLUS)
return;
if (rtx_equal_p (XEXP (old, 0), XEXP (new, 0)))