summaryrefslogtreecommitdiffstats
path: root/gcc/integrate.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2000-02-07 17:39:40 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2000-02-07 17:39:40 +0000
commitd0285dd8918af5a76cce9552a79e6729d264f643 (patch)
treefbcc1dc384eab7f572ca46df0b98ef599a28ec0b /gcc/integrate.c
parent680cf83fbce73bf0ededf5398977759a73ebb63a (diff)
downloadppe42-gcc-d0285dd8918af5a76cce9552a79e6729d264f643.tar.gz
ppe42-gcc-d0285dd8918af5a76cce9552a79e6729d264f643.zip
* calls.c (compute_argument_block_size): New argument
preferred_stack_boundary. (expand_call): update cfun->preferred_stack_boundary, update call of compute_argument_block_size (emit_library_call): Increate cfun->preferred_stack_boundary to PREFERRED_STACK_BOUNDARY (emit_library_call_value): Likewise. * explow.c (allocate_dynamic_stack_spave): Likewise. * function.c (prepare_function_start): Set cfun->preferred_stack_boundary * function.h (struct function): Add preferred_stack_boundary field. * integrate.c (expand_inline_function): Update cfun->preferred_stack_boundary and cfun->stack_alignment_needed. (copy_rtx_and_substitute): Align frame to stack_alignment_needed only. * i386.c (compute_frame_size): Use cfun->preferred_stack_boundary. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31831 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/integrate.c')
-rw-r--r--gcc/integrate.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/integrate.c b/gcc/integrate.c
index 0cbff9d05f3..865b4bb6faa 100644
--- a/gcc/integrate.c
+++ b/gcc/integrate.c
@@ -602,6 +602,12 @@ expand_inline_function (fndecl, parms, target, ignore, type,
nargs = list_length (DECL_ARGUMENTS (fndecl));
+ if (cfun->preferred_stack_boundary < inl_f->preferred_stack_boundary)
+ cfun->preferred_stack_boundary = inl_f->preferred_stack_boundary;
+
+ if (cfun->stack_alignment_needed < inl_f->stack_alignment_needed)
+ cfun->stack_alignment_needed = inl_f->stack_alignment_needed;
+
/* Check that the parms type match and that sufficient arguments were
passed. Since the appropriate conversions or default promotions have
already been applied, the machine modes should match exactly. */
@@ -1619,13 +1625,17 @@ copy_rtx_and_substitute (orig, map, for_lhs)
{
rtx loc, seq;
int size = get_func_frame_size (DECL_SAVED_INSNS (map->fndecl));
+ int alignment
+ = (DECL_SAVED_INSNS (map->fndecl)->stack_alignment_needed
+ / BITS_PER_UNIT);
#ifdef FRAME_GROWS_DOWNWARD
/* In this case, virtual_stack_vars_rtx points to one byte
higher than the top of the frame area. So make sure we
allocate a big enough chunk to keep the frame pointer
aligned like a real one. */
- size = CEIL_ROUND (size, BIGGEST_ALIGNMENT / BITS_PER_UNIT);
+ if (alignment)
+ size = CEIL_ROUND (size, alignment);
#endif
start_sequence ();
loc = assign_stack_temp (BLKmode, size, 1);
OpenPOWER on IntegriCloud