diff options
author | Geoff Keating <geoffk@cygnus.com> | 1999-08-05 00:59:54 -0600 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1999-08-05 00:59:54 -0600 |
commit | 906fb125a14fba63516ed295b779546f1ea6e631 (patch) | |
tree | 5a6ed65a2d8639b605eac6f0737afe3cea250b1c /gcc | |
parent | 14fe6c707fa8df05577b5480b7cc3e9c7d7fd860 (diff) | |
download | gcc-906fb125a14fba63516ed295b779546f1ea6e631.zip gcc-906fb125a14fba63516ed295b779546f1ea6e631.tar.gz gcc-906fb125a14fba63516ed295b779546f1ea6e631.tar.bz2 |
rs6000.c (rs6000_stack_info): For ABI_V4/ABI_SOLARIS -fpic...
* rs6000.c (rs6000_stack_info): For ABI_V4/ABI_SOLARIS -fpic, always
allocate space in the stack frame for the PIC register.
From-SVN: r28525
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 9 |
2 files changed, 13 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cc55b5e..7b37f79 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Thu Aug 5 00:56:30 1999 Geoffrey Keating <geoffk@cygnus.com> + + * rs6000.c (rs6000_stack_info): For ABI_V4/ABI_SOLARIS -fpic, always + allocate space in the stack frame for the PIC register. + Thu Aug 5 00:20:47 1999 Jeffrey A Law (law@cygnus.com) * m68k.md (xordi3, anddi3): These patterns are not available on diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 865ec92..2f49b37 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -3644,7 +3644,14 @@ rs6000_stack_info () /* Calculate which registers need to be saved & save area size */ info_ptr->first_gp_reg_save = first_reg_to_save (); - info_ptr->gp_size = reg_size * (32 - info_ptr->first_gp_reg_save); + /* Assume that we will have to save PIC_OFFSET_TABLE_REGNUM, + even if it currently looks like we won't. */ + if (flag_pic == 1 + && (abi == ABI_V4 || abi == ABI_SOLARIS) + && info_ptr->first_gp_reg_save > PIC_OFFSET_TABLE_REGNUM) + info_ptr->gp_size = reg_size * (32 - PIC_OFFSET_TABLE_REGNUM); + else + info_ptr->gp_size = reg_size * (32 - info_ptr->first_gp_reg_save); info_ptr->first_fp_reg_save = first_fp_reg_to_save (); info_ptr->fp_size = 8 * (64 - info_ptr->first_fp_reg_save); |