diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1996-09-23 15:49:52 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1996-09-23 15:49:52 -0400 |
commit | 37c0e55fb7699d7dcc3e1553b0568728f12f8cf8 (patch) | |
tree | c82c9e25116052bdf745a491369468885c3f5a64 /gcc | |
parent | c7d13c76d5ca80718a1acdef9e42290ad97d1ece (diff) | |
download | gcc-37c0e55fb7699d7dcc3e1553b0568728f12f8cf8.zip gcc-37c0e55fb7699d7dcc3e1553b0568728f12f8cf8.tar.gz gcc-37c0e55fb7699d7dcc3e1553b0568728f12f8cf8.tar.bz2 |
(reload): Initialize the previous_offset fields in reg_eliminate
before calling setup_save_areas.
From-SVN: r12781
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/reload1.c | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c index a11053f..cac212b 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -1460,19 +1460,26 @@ reload (first, global, dumpfile) /* If we have caller-saves, set up the save areas and see if caller-save will need a spill register. */ - if (caller_save_needed - && ! setup_save_areas (&something_changed) - && caller_save_spill_class == NO_REGS) + if (caller_save_needed) { - /* The class we will need depends on whether the machine - supports the sum of two registers for an address; see - find_address_reloads for details. */ - - caller_save_spill_class - = double_reg_address_ok ? INDEX_REG_CLASS : BASE_REG_CLASS; - caller_save_group_size - = CLASS_MAX_NREGS (caller_save_spill_class, Pmode); - something_changed = 1; + /* Set the offsets for setup_save_areas. */ + for (ep = reg_eliminate; ep < ®_eliminate[NUM_ELIMINABLE_REGS]; + ep++) + ep->previous_offset = ep->max_offset; + + if ( ! setup_save_areas (&something_changed) + && caller_save_spill_class == NO_REGS) + { + /* The class we will need depends on whether the machine + supports the sum of two registers for an address; see + find_address_reloads for details. */ + + caller_save_spill_class + = double_reg_address_ok ? INDEX_REG_CLASS : BASE_REG_CLASS; + caller_save_group_size + = CLASS_MAX_NREGS (caller_save_spill_class, Pmode); + something_changed = 1; + } } /* See if anything that happened changes which eliminations are valid. |