From d4b0a7a049724e029148cc11e71e4bf51a10b092 Mon Sep 17 00:00:00 2001 From: Doug Evans Date: Wed, 7 Dec 1994 20:58:08 +0000 Subject: [PATCH] (locate_and_pad_parm): Do padding before rounding so pad_below knows how much is needed. From-SVN: r8622 --- gcc/function.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gcc/function.c b/gcc/function.c index 3811835b028..7e50c844b7e 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -4015,15 +4015,16 @@ locate_and_pad_parm (passed_mode, type, in_regs, fndecl, sizetree = size_int (PUSH_ROUNDING (TREE_INT_CST_LOW (sizetree))); #endif + /* Pad_below needs the pre-rounded size to know how much to pad below + so this must be done before rounding up. */ + if (where_pad == downward) + pad_below (offset_ptr, passed_mode, sizetree); + if (where_pad != none && (TREE_CODE (sizetree) != INTEGER_CST || ((TREE_INT_CST_LOW (sizetree) * BITS_PER_UNIT) % PARM_BOUNDARY))) sizetree = round_up (sizetree, PARM_BOUNDARY / BITS_PER_UNIT); - /* This must be done after rounding sizetree, so that it will subtract - the same value that we explicitly add below. */ - if (where_pad == downward) - pad_below (offset_ptr, passed_mode, sizetree); ADD_PARM_SIZE (*arg_size_ptr, sizetree); #endif /* ARGS_GROW_DOWNWARD */ }