aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Law <law@gcc.gnu.org>1993-10-06 13:29:13 -0600
committerJeff Law <law@gcc.gnu.org>1993-10-06 13:29:13 -0600
commit68386e1e3cbcd64346749e822babf7e576fa16aa (patch)
treeb449a5381fe62d3113bb6d49614999e85673cbc1
parent3f259d6dfb2155820ed569dd479c82561800ebf3 (diff)
downloadgcc-68386e1e3cbcd64346749e822babf7e576fa16aa.zip
gcc-68386e1e3cbcd64346749e822babf7e576fa16aa.tar.gz
gcc-68386e1e3cbcd64346749e822babf7e576fa16aa.tar.bz2
pa.c (output_function_prologue): Pass on information about the number of callee saved general and floating point...
* pa.c (output_function_prologue): Pass on information about the number of callee saved general and floating point registers which are saved by the current function's prologue. (hppa_expand_prologue): Keep track of the number of callee register saves done for general and floating point registers. From-SVN: r5641
-rw-r--r--gcc/config/pa/pa.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c
index 1f6611d..215cfc1 100644
--- a/gcc/config/pa/pa.c
+++ b/gcc/config/pa/pa.c
@@ -46,6 +46,10 @@ rtx hppa_save_pic_table_rtx;
/* Set by the FUNCTION_PROFILER macro. */
int hp_profile_labelno;
+/* Counts for the number of callee-saved general and floating point
+ registers which were saved by the current function's prologue. */
+static int gr_saved, fr_saved;
+
static rtx find_addr_reg ();
/* Return non-zero only if OP is a register of mode MODE,
@@ -2018,6 +2022,10 @@ output_function_prologue (file, size)
if (frame_pointer_needed)
fprintf (file, ",SAVE_SP");
+ /* Pass on information about the number of callee register saves
+ performed in the prologue. */
+ fprintf (file, ",ENTRY_GR=%d,ENTRY_FR=%d", gr_saved, fr_saved);
+
fprintf (file, "\n\t.ENTRY\n");
/* Horrid hack. emit_function_prologue will modify this RTL in
@@ -2036,6 +2044,8 @@ hppa_expand_prologue()
rtx tmpreg, size_rtx;
+ gr_saved = 0;
+ fr_saved = 0;
save_fregs = 0;
local_fsize = size + (size || frame_pointer_needed ? 8 : 0);
actual_fsize = compute_frame_size (size, &save_fregs);
@@ -2167,6 +2177,7 @@ hppa_expand_prologue()
{
store_reg (i, offset, FRAME_POINTER_REGNUM);
offset += 4;
+ gr_saved++;
}
}
/* No frame pointer needed. */
@@ -2188,6 +2199,7 @@ hppa_expand_prologue()
else
store_reg (i, offset, STACK_POINTER_REGNUM);
offset += 4;
+ gr_saved++;
}
/* If we wanted to merge the SP adjustment with a GR save, but we never
@@ -2216,12 +2228,13 @@ hppa_expand_prologue()
if (! TARGET_SNAKE)
{
for (i = 43; i >= 40; i--)
- {
- if (regs_ever_live[i])
+ if (regs_ever_live[i])
+ {
emit_move_insn (gen_rtx (MEM, DFmode,
gen_rtx (POST_INC, DFmode, tmpreg)),
gen_rtx (REG, DFmode, i));
- }
+ fr_saved++;
+ }
}
else
{
@@ -2231,6 +2244,7 @@ hppa_expand_prologue()
emit_move_insn (gen_rtx (MEM, DFmode,
gen_rtx (POST_INC, DFmode, tmpreg)),
gen_rtx (REG, DFmode, i));
+ fr_saved++;
}
}
}