alignment of variables in stack slots
Joern Rennecke
amylaar@cambridge.redhat.com
Wed Apr 4 11:45:00 GMT 2001
> hi,
> i am porting gcc to a new platform and have currently encountered a
> problem with the alignment of variables that end up in the stack frame.
> The core itself supports the following memory accesses:
>
> SImode (32bit): address must be word aligned (address%4 ==0)
> HImode : address must be halfword aligned (address%2 ==0)
> QImode : no limitations
>
> Missaligned access is not supported, the lower bit(s) are ignored so
> this may even corrupt other variables.
> I defined STRICT_ALIGNMENT but i could not find out where i must declare
> the limitations mentioned above.
> The stackpointer is already aligned to a 4byte boundary (#define
> STACK_BOUNDARY 32) which seems to work.
Define BIGGEST_ALIGNMENT to be 32, and you should be all set.
More information about the Gcc
mailing list