alignment of variables in stack slots

Michael Staudenmaier (r46720) michael.staudenmaier@motorola.com
Wed Apr 4 09:06: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.

Thanks for your help!

Michael



More information about the Gcc mailing list