From 8a9c76f3c232a8c6a38c2616419d8a55ecaf4e98 Mon Sep 17 00:00:00 2001 From: Timothy Moore Date: Thu, 15 Oct 1992 15:57:18 +0000 Subject: [PATCH] pa.c (compute_frame_size): Take an fregs_live parameter instead of setting the static variable save_fregs. * pa.c (compute_frame_size): Take an fregs_live parameter instead of setting the static variable save_fregs. (output_function_prologue): Initialize save_fregs to 0 and pass to compute_frame_size. From-SVN: r2477 --- gcc/config/pa/pa.c | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index ddc7f9e9eb5..9f7477d03cc 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -44,13 +44,6 @@ enum cmp_type hppa_branch_type; /* Set by the FUNCTION_PROFILER macro. */ int hp_profile_labelno; -/* Global variables set by FUNCTION_PROLOGUE. */ -/* Size of frame. Need to know this to emit return insns from - leaf procedures. */ -int apparent_fsize; -int actual_fsize; -int local_fsize, save_fregs; - /* Name of where we pretend to think the frame pointer points. Normally, this is "4", but if we are in a leaf procedure, this is "something(30)". Will this work? */ @@ -1429,10 +1422,18 @@ print_ldw (file, r, disp, base) disp, r); } +/* Global variables set by FUNCTION_PROLOGUE. */ +/* Size of frame. Need to know this to emit return insns from + leaf procedures. */ +int apparent_fsize; +int actual_fsize; +int local_fsize, save_fregs; + int -compute_frame_size (size, leaf_function) +compute_frame_size (size, leaf_function, fregs_live) int size; int leaf_function; + int *fregs_live; { extern int current_function_outgoing_args_size; int i; @@ -1454,7 +1455,9 @@ compute_frame_size (size, leaf_function) for (i = 47; i >= 44; i--) if (regs_ever_live[i]) { - actual_fsize += 8; save_fregs++; + actual_fsize += 8; + if (fregs_live) + *fregs_live = 1; } } else @@ -1462,7 +1465,9 @@ compute_frame_size (size, leaf_function) for (i = 90; i >= 72; i -= 2) if (regs_ever_live[i] || regs_ever_live[i + 1]) { - actual_fsize += 8; save_fregs++; + actual_fsize += 8; + if (fregs_live) + *fregs_live = 1; } } return actual_fsize + current_function_outgoing_args_size; @@ -1479,7 +1484,8 @@ output_function_prologue (file, size, leaf_function) extern int current_function_returns_struct; int i, offset; - actual_fsize = compute_frame_size (size, leaf_function) + 32; + save_fregs = 0; + actual_fsize = compute_frame_size (size, leaf_function, &save_fregs) + 32; if (TARGET_SNAKE) actual_fsize = (actual_fsize + 63) & ~63; -- 2.30.2