(assign_stack_temp): When split a slot, set base_offset and full_size in the newly...
authorRichard Kenner <kenner@gcc.gnu.org>
Fri, 28 Jul 1995 13:09:22 +0000 (09:09 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Fri, 28 Jul 1995 13:09:22 +0000 (09:09 -0400)
(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

gcc/function.c

index 00790b268062254ac68115cc482743f5340ccaaa..acf46ceb7670a43ee38074145fe1b77ddda3e648 100644 (file)
@@ -847,6 +847,8 @@ assign_stack_temp (mode, size, keep)
              p = (struct temp_slot *) oballoc (sizeof (struct temp_slot));
              p->in_use = p->addr_taken = 0;
              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,
                                 plus_constant (XEXP (best_p->slot, 0),
                                                rounded_size));
@@ -942,12 +944,14 @@ combine_temp_slots ()
                  {
                    /* Q comes after P; combine Q into P.  */
                    p->size += q->size;
+                   p->full_size += q->full_size;
                    delete_q = 1;
                  }
                else if (q->base_offset + q->full_size == p->base_offset)
                  {
                    /* P comes after Q; combine P into Q.  */
                    q->size += p->size;
+                   q->full_size += p->full_size;
                    delete_p = 1;
                    break;
                  }