aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2009-07-11 19:40:29 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2009-07-11 19:40:29 +0200
commitae58e548884f696e600966549867df23de3ff2d3 (patch)
treef7d7a64b4ca810edf1a746863dde1086ecd8cbd9 /gcc/function.c
parentdd67163fa487933aff300fd75228b6889c9c6f6e (diff)
downloadgcc-ae58e548884f696e600966549867df23de3ff2d3.zip
gcc-ae58e548884f696e600966549867df23de3ff2d3.tar.gz
gcc-ae58e548884f696e600966549867df23de3ff2d3.tar.bz2
re PR target/40667 (stack frames are generated even with -fomit-frame-pointer)
PR rtl-optimization/40667 * defaults.h (MINIMUM_ALIGNMENT): Define if not defined. * doc/tm.texi (MINIMUM_ALIGNMENT): Document it. * config/i386/i386.h (MINIMUM_ALIGNMENT): Define. * config/i386/i386.c (ix86_minimum_alignment): New function. * config/i386/i386-protos.h (ix86_minimum_alignment): New prototype. * cfgexpand.c (expand_one_var): Use MINIMIM_ALIGNMENT. * emit-rtl.c (gen_reg_rtx): Likewise. * function.c (assign_parms): Likewise. If nominal_type needs bigger alignment than FUNCTION_ARG_BOUNDARY, use its alignment rather than passed_type's alignment. From-SVN: r149513
Diffstat (limited to 'gcc/function.c')
-rw-r--r--gcc/function.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/function.c b/gcc/function.c
index 258f594..e31c12a 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -3146,8 +3146,12 @@ assign_parms (tree fndecl)
{
unsigned int align = FUNCTION_ARG_BOUNDARY (data.promoted_mode,
data.passed_type);
+ align = MINIMUM_ALIGNMENT (data.passed_type, data.promoted_mode,
+ align);
if (TYPE_ALIGN (data.nominal_type) > align)
- align = TYPE_ALIGN (data.passed_type);
+ align = MINIMUM_ALIGNMENT (data.nominal_type,
+ TYPE_MODE (data.nominal_type),
+ TYPE_ALIGN (data.nominal_type));
if (crtl->stack_alignment_estimated < align)
{
gcc_assert (!crtl->stack_realign_processed);