summaryrefslogtreecommitdiff
path: root/gcc/function.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2012-08-01 20:41:16 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2012-08-01 20:41:16 +0000
commitf4dfbde222c4ee0b57883cb4cd94dd604558c3dd (patch)
tree040c558b53700de0429c84a129ccd952f1ec8dfb /gcc/function.c
parent573ff301ccc10599add70cdcf82acb2e646ab563 (diff)
downloadgcc-f4dfbde222c4ee0b57883cb4cd94dd604558c3dd.tar.gz
PR 34548
* function.h (struct rtl_data): Add max_dynamic_stack_alignment. * cfgexpand.c (gimple_expand_cfg): Initialise it. * explow.c (allocate_dynamic_stack_space): Set it. Simplify alignment requirements given the known alignment of dynamic_offset. * function.c (instantiate_virtual_regs): Align dtnamic_offset. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190051 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/function.c')
-rw-r--r--gcc/function.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/function.c b/gcc/function.c
index f1e0b2d3eba..827f687f421 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -1892,7 +1892,14 @@ instantiate_virtual_regs (void)
/* Compute the offsets to use for this function. */
in_arg_offset = FIRST_PARM_OFFSET (current_function_decl);
var_offset = STARTING_FRAME_OFFSET;
+
dynamic_offset = STACK_DYNAMIC_OFFSET (current_function_decl);
+ if (crtl->max_dynamic_stack_alignment)
+ {
+ int align = crtl->max_dynamic_stack_alignment / BITS_PER_UNIT;
+ dynamic_offset = (dynamic_offset + align - 1) & -align;
+ }
+
out_arg_offset = STACK_POINTER_OFFSET;
#ifdef FRAME_POINTER_CFA_OFFSET
cfa_offset = FRAME_POINTER_CFA_OFFSET (current_function_decl);