Commit 307d8cd6 by Richard Kenner

(assign_stack_temp): When split a slot, set base_offset and full_size in the newly created slot.

(assign_stack_temp): When split a slot, set base_offset and full_size in the
newly created slot.
(combine_temp_slots): Update full_size when slots are combined.

From-SVN: r10185
parent e4931540
...@@ -847,6 +847,8 @@ assign_stack_temp (mode, size, keep) ...@@ -847,6 +847,8 @@ assign_stack_temp (mode, size, keep)
p = (struct temp_slot *) oballoc (sizeof (struct temp_slot)); p = (struct temp_slot *) oballoc (sizeof (struct temp_slot));
p->in_use = p->addr_taken = 0; p->in_use = p->addr_taken = 0;
p->size = best_p->size - rounded_size; p->size = best_p->size - rounded_size;
p->base_offset = best_p->base_offset + rounded_size;
p->full_size = best_p->full_size - rounded_size;
p->slot = gen_rtx (MEM, BLKmode, p->slot = gen_rtx (MEM, BLKmode,
plus_constant (XEXP (best_p->slot, 0), plus_constant (XEXP (best_p->slot, 0),
rounded_size)); rounded_size));
...@@ -942,12 +944,14 @@ combine_temp_slots () ...@@ -942,12 +944,14 @@ combine_temp_slots ()
{ {
/* Q comes after P; combine Q into P. */ /* Q comes after P; combine Q into P. */
p->size += q->size; p->size += q->size;
p->full_size += q->full_size;
delete_q = 1; delete_q = 1;
} }
else if (q->base_offset + q->full_size == p->base_offset) else if (q->base_offset + q->full_size == p->base_offset)
{ {
/* P comes after Q; combine P into Q. */ /* P comes after Q; combine P into Q. */
q->size += p->size; q->size += p->size;
q->full_size += p->full_size;
delete_p = 1; delete_p = 1;
break; break;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment