diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-02-18 17:51:58 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-02-18 17:51:58 +0000 |
commit | d61726bc08c13097be02f2e7cb96932bfd821973 (patch) | |
tree | f0eab21139c029483c2daa202f4e15f29369101c | |
parent | e30880eb6320d4ad55398378184e84173d055ee2 (diff) | |
download | gcc-d61726bc08c13097be02f2e7cb96932bfd821973.tar.gz |
* function.c (assign_stack_temp_for_type): Round SIZE before calling
assign_stack_local for BLKmode slots.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@25290 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/function.c | 12 |
2 files changed, 17 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bdc71f9fb82..9e984068fea 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Thu Feb 18 18:47:09 1999 Jeffrey A Law (law@cygnus.com) + + * function.c (assign_stack_temp_for_type): Round SIZE before calling + assign_stack_local for BLKmode slots. + Fri Feb 19 01:45:06 1999 J"orn Rennecke <amylaar@cygnus.co.uk> * loop.c (strength_reduce): For derived givs, replace the diff --git a/gcc/function.c b/gcc/function.c index a14a886d4e8..05189d9c1b9 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; |