]> gcc.gnu.org Git - gcc.git/commitdiff
pa.c (hppa_expand_epilogue): Save and restore the static chain around the call to...
authorJeffrey A Law <law@cygnus.com>
Fri, 15 Jan 1999 01:03:43 +0000 (01:03 +0000)
committerJeff Law <law@gcc.gnu.org>
Fri, 15 Jan 1999 01:03:43 +0000 (18:03 -0700)
        * pa.c (hppa_expand_epilogue): Save and restore the static chain
        around the call to mcount.

From-SVN: r24672

gcc/ChangeLog
gcc/config/pa/pa.c

index 60cf86db92065ceabb38923beffa9b009321152e..fe84462ef48fd579c97867c04b9479f56931d38a 100644 (file)
@@ -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
index 371bf9a2ff1abfeaf73e4982e6573873deae6ac7..2bae75cc1d14889afc1da1527324d40bc918cade 100644 (file)
@@ -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.
This page took 0.103474 seconds and 5 git commands to generate.