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]

How to make gcc psABI conformant


On Tue, Oct 09, 2007 at 08:00:52PM -0700, Andrew Pinski wrote:
> On 10/9/07, H.J. Lu <hjl@lucon.org> wrote:
> > 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?
> 
> If you want to implement something, that is ok with me but I have this
> patch now and have it on the table since May of this year and nobody
> complained about the patch for 5 months which seems like a long time.
> I also pinged this patch ~ once a month and nobody reviewed it.  This
> is getting annoying.  I had been asked to ping this patch again but
> some internal developers to be able to get this working for 4.3.  Your
> proposal has the ability to work but it is not implemented yet.  My
> works now and is really needed for Cell development.  If you want to
> go out and implement your proposal that is ok with me but the
> implementation I have should go in as a stop gap while yours is being
> worked on.  I am getting tried of pinging this patch anyways.  I have
> better things to do, like fix some CSE load/store missed optimizations
> (which is needed for some C++ cases).
> 

I am not against your patch per se.  Stack variable alignment is a
much larger issue. Your patch only fixes a small subset and a proper
fix may make your patch unnecessary.

There are STACK_BOUNDARY and PREFERRED_STACK_BOUNDARY. But they
don't provide psABI conformance. A psABI specifies a minimum
alignment for incoming stack. Unless a function is local to
translation unit, we can only assume the minimum alignment for
incoming stack. I think we need a new macro, INCOMING_STACK_BOUNDARY.
which can be PREFERRED_STACK_BOUNDARY only if all callers of the
function is local to translation unit.


H.J.


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