This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: alignment bug in gcc i386 crtfastmath.c


On Sat, Mar 18, 2006 at 12:30:01PM -0500, Andrew Pinski wrote:
> 
> On Mar 18, 2006, at 12:19 PM, H. J. Lu wrote:
> >What is the the required stack alignment that the compiler can
> >guaranteed when not all files are compiled at the same time with
> >the same option by the same person? Basically, compiler doesn't
> >really know for sure what the stack alignment at the function
> >entry point is.
> 
> Well the compiler cannot guarantee the stack alignment on x86 because
> the ABI says it is only required to be 4 byte aligned.  On other
> targets like PowerPC, the compile has to guarantee a stack alignment of
> 16bytes as it is required by the ABI.

So should gcc warn/error __attribute__ ((aligned (XX))) on stack
variables where XX is greater than the ABI requirement?


H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]