This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix for alignment bug in assign_stack_local
- To: Jan Hubicka <hubicka at atrey dot karlin dot mff dot cuni dot cz>
- Subject: Re: Fix for alignment bug in assign_stack_local
- From: Jeffrey A Law <law at upchuck dot cygnus dot com>
- Date: Fri, 16 Apr 1999 12:14:06 -0600
- cc: egcs-patches at egcs dot cygnus dot com
- Reply-To: law at cygnus dot com
In message <19990416192534.06363@atrey.karlin.mff.cuni.cz>you write:
>
> Hi
> When you set alignment 32 for 16bit value (or any other case where size !=
> align) and have FRAME_GROWS_DOWNWARD and big endian machine,
> assign_stack_local always allocate slots in a way that they are missaligned
> (i.e base-2, base-6, base-10 etc...). Also I expect that on the same setup
> and little endian machines, the returned value will actually point outside
> allocated slot!
>
> I am not sure if this is feature and someone demands this behaviour, but
> I expect this is a bug. This patch changes function.c to allocate
> slots nicely (i.e base-4, base-8, base-12 for big endian and base-2, base-10
> etc for little endian, so it can be read as whole aligned 32bit value).
> The behaviour is now same as for !FRAME_GROWS_DOWNWARD machines.
>
> I also believe that this change is neccesary to make PREFFERED_STACK_BOUNDARY
> changes work on long doubles.
This is very complex code. I would prefer to see a testcase and additional
technical analysis.
jeff