aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.c
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 /gcc/function.c
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
Diffstat (limited to 'gcc/function.c')
-rw-r--r--gcc/function.c19
1 files changed, 15 insertions, 4 deletions
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)))