Re: ARM Xscale stack alignment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tom St Denis <tstdenis@xxxxxxxxxxxxxxxx> writes:

> I need to get GCC to align all auto variables on an 8 byte boundary. 
> Which internally seems to be happening, but the stack frame is never
> 8-byte aligned (it is 4-byte aligned).  The problem is that on the
> xscale [e.g. PXA255] 64-bit loads are done in one memory reference which
> means that ifyou try to load a 64-bit variable that isn't 8-byte aligned
> you get a memory trap.
> 
> Is there a GCC switch or a patch I could use to ensure the stack frames
> are aligned properly?

If the stack pointer starts at an 8-byte boundary, gcc for XScale
should preserve that.  So you need to arrange for your startup file to
set an 8-byte boundary.  gcc doesn't have any way to do that itself.

Ian

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux