diff options
author | Jeffrey A Law <law@cygnus.com> | 1999-01-15 01:03:43 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1999-01-14 18:03:43 -0700 |
commit | 41b6ea681b5466b6bcbae045514f44792ef564a7 (patch) | |
tree | 110d68ca8b4f868d6f687d1a87f49033fca3dabf /gcc/config | |
parent | 86ab58b5f0cec0103f8f30cefe8c364db060e169 (diff) | |
download | gcc-41b6ea681b5466b6bcbae045514f44792ef564a7.zip gcc-41b6ea681b5466b6bcbae045514f44792ef564a7.tar.gz gcc-41b6ea681b5466b6bcbae045514f44792ef564a7.tar.bz2 |
pa.c (hppa_expand_epilogue): Save and restore the static chain around the call to mcount.
* pa.c (hppa_expand_epilogue): Save and restore the static chain
around the call to mcount.
From-SVN: r24672
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/pa/pa.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index 371bf9a..2bae75c 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -2834,6 +2834,8 @@ hppa_expand_prologue() hp_profile_label_rtx = gen_rtx_SYMBOL_REF (SImode, hp_profile_label_name); if (current_function_returns_struct) store_reg (STRUCT_VALUE_REGNUM, - 12 - offsetadj, basereg); + if (current_function_needs_context) + store_reg (STATIC_CHAIN_REGNUM, - 16 - offsetadj, basereg); for (i = 26, arg_offset = -36 - offsetadj; i >= 23; i--, arg_offset -= 4) if (regs_ever_live [i]) @@ -2858,6 +2860,8 @@ hppa_expand_prologue() if (current_function_returns_struct) load_reg (STRUCT_VALUE_REGNUM, -12 - offsetadj, basereg); + if (current_function_needs_context) + load_reg (STATIC_CHAIN_REGNUM, -16 - offsetadj, basereg); } /* Normal register save. |