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 | |
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
-rw-r--r-- | gcc/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/config/pa/pa.c | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 60cf86d..fe84462 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,8 @@ Thu Jan 14 22:38:41 1999 Jeffrey A Law (law@cygnus.com) + * pa.c (hppa_expand_epilogue): Save and restore the static chain + around the call to mcount. + * h8300.h (ASM_OUTPUT_LABELREF): Use asm_fprintf, not fprintf. * stmt.c (expand_end_case): Use emit_cmp_and_jump_insns to avoid 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. |