diff options
author | Jeffrey A Law <law@cygnus.com> | 1999-02-18 17:51:58 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1999-02-18 10:51:58 -0700 |
commit | c87a0a3994b20fcf69a9d4072516929c08a96746 (patch) | |
tree | f0eab21139c029483c2daa202f4e15f29369101c /gcc/function.c | |
parent | 743f9f5dfdca8dfa597125b06edddfb61a968d06 (diff) | |
download | gcc-c87a0a3994b20fcf69a9d4072516929c08a96746.zip gcc-c87a0a3994b20fcf69a9d4072516929c08a96746.tar.gz gcc-c87a0a3994b20fcf69a9d4072516929c08a96746.tar.bz2 |
function.c (assign_stack_temp_for_type): Round SIZE before calling assign_stack_local for BLKmode slots.
* function.c (assign_stack_temp_for_type): Round SIZE before calling
assign_stack_local for BLKmode slots.
From-SVN: r25290
Diffstat (limited to 'gcc/function.c')
-rw-r--r-- | gcc/function.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/function.c b/gcc/function.c index a14a886..05189d9 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -963,6 +963,18 @@ assign_stack_temp_for_type (mode, size, keep, type) p = (struct temp_slot *) oballoc (sizeof (struct temp_slot)); + /* We are passing an explicit alignment request to assign_stack_local. + One side effect of that is assign_stack_local will not round SIZE + to ensure the frame offset remains suitably aligned. + + So for requests which depended on the rounding of SIZE, we go ahead + and round it now. We also make sure ALIGNMENT is at least + BIGGEST_ALIGNMENT. */ + if (mode == BLKmode) + { + align = MAX (align, BIGGEST_ALIGNMENT / BITS_PER_UNIT); + size = CEIL_ROUND (size, align); + } p->slot = assign_stack_local (mode, size, align); p->align = align; |