[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Fix GCC's preferred stack alignment to match psABI
On Tue, Sep 18, 2012 at 06:13:08PM +0100, David Laight wrote:
> This is really because there is a subtle difference between
> a 'required alignment' and a 'preferred alignment'.
> For 8 byte items the alignment is only ever 'preferred', it the
> alignment is wrong the code won't fault.
This is plainly wrong. GCC has code to reduce the required alignment for
double and long long, if the stack alignment is smaller. This got fixed
as part of this changes to actually work now. Just because the CPU
doesn't require the alignment doesn't mean other parts don't. E.g. it
makes sense to require 64bit alignment to be able to use the low 3bits
of a pointer for other purposes. Violating this is plainly a compiler
bug. Now there might be some combination of incoming stack boundary and
-mstackrealign that actually gives the desired behavior...
Main Index |
Thread Index |