aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorTimothy Moore <moore@gnu.org>1992-10-15 15:57:18 +0000
committerTimothy Moore <moore@gnu.org>1992-10-15 15:57:18 +0000
commit8a9c76f3c232a8c6a38c2616419d8a55ecaf4e98 (patch)
treec9a1e76cb118e19a40c28143c0bbdf38fe1f9d05 /gcc
parent459a2653258e24af006f1d66015307cf73c67f74 (diff)
downloadgcc-8a9c76f3c232a8c6a38c2616419d8a55ecaf4e98.zip
gcc-8a9c76f3c232a8c6a38c2616419d8a55ecaf4e98.tar.gz
gcc-8a9c76f3c232a8c6a38c2616419d8a55ecaf4e98.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/pa/pa.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c
index ddc7f9e..9f7477d 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;