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] Fix PR 16660, attribute((aligned)) doesn't work for variables on the stack for greater than required alignment


On Tue, Oct 09, 2007 at 05:37:52PM -0700, Andrew_Pinski@PlayStation.Sony.Com wrote:
> "H.J. Lu" <hjl@lucon.org> wrote on 10/09/2007 05:31:30 PM:
> 
> > This patch doesn't solve the stack alignment problem on x86 where gcc
> > assumes the stack is 16byte aligned and ia32 psABI only specifies 4
> > byte alignment. To make gcc to conform ia32 psABI, we need to
> > align the stack when >4 byte alignment is needed for local variable
> > as well as register spill. If we align the stack, this patch isn't
> > needed for x86.
> 
> Again how many times do I have to mention, the proposal above does not 
> help out when you need a bigger alignment than what is required than 
> 16byte alignment.  If you take a look at the testcases which are added, 

What did you mean by "what is required than 16byte alignment"?
The alignment reqiurement of a local variable is the alignment
reqiurement of its type which can be a structure, a scalar or a
vector type.  My proposal treats the alignment reqiurement of
a structure the same as the alignment reqiurement of a scalar/vector
type. Why can't my proposal align stack to 256 byte? 



H.J.


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