aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2005-07-07 14:04:31 -0700
committerRichard Henderson <rth@gcc.gnu.org>2005-07-07 14:04:31 -0700
commitc7e777b576030f9357a037122e219684da1ad201 (patch)
treef0ab442030fe647a2509c7676bfff0d4eb3fa429 /gcc/function.c
parentbde1427e3bb677f5120db529c16e3a0b2d3d0eae (diff)
downloadgcc-c7e777b576030f9357a037122e219684da1ad201.zip
gcc-c7e777b576030f9357a037122e219684da1ad201.tar.gz
gcc-c7e777b576030f9357a037122e219684da1ad201.tar.bz2
function.c (locate_and_pad_parm): Record parameter alignment in stack_alignment_needed.
* function.c (locate_and_pad_parm): Record parameter alignment in stack_alignment_needed. From-SVN: r101732
Diffstat (limited to 'gcc/function.c')
-rw-r--r--gcc/function.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/function.c b/gcc/function.c
index 1979185..3fcc8b8 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -3256,7 +3256,7 @@ locate_and_pad_parm (enum machine_mode passed_mode, tree type, int in_regs,
{
tree sizetree;
enum direction where_pad;
- int boundary;
+ unsigned int boundary;
int reg_parm_stack_space = 0;
int part_size_in_regs;
@@ -3291,6 +3291,13 @@ locate_and_pad_parm (enum machine_mode passed_mode, tree type, int in_regs,
locate->where_pad = where_pad;
locate->boundary = boundary;
+ /* Remember if the outgoing parameter requires extra alignment on the
+ calling function side. */
+ if (boundary > PREFERRED_STACK_BOUNDARY)
+ boundary = PREFERRED_STACK_BOUNDARY;
+ if (cfun->stack_alignment_needed < boundary)
+ cfun->stack_alignment_needed = boundary;
+
#ifdef ARGS_GROW_DOWNWARD
locate->slot_offset.constant = -initial_offset_ptr->constant;
if (initial_offset_ptr->var)