This is the mail archive of the gcc@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: g++ 3.4.0 cygwin, codegen SSE & alignement issues


Ross Ridge wrote:
> I think a happy middle-way, at least for the i386 port, would be to
> implement a special function attribute, say __attribute__((align_stack)),
> that only dynamically aligns the stack of functions defined with the
> attribute.

DJ Delorie wrote:
> The existing align-stack code is target independent.  Why not create a
> target independent attribute?  The x86 isn't the only target that has
> this problem, just the only one with an OS that makes it so obvious
> (although Windows runs on various embedded chips also).

Well, the existing target independent forced align-stack code, which only
handles main(), is less than ideal on i386 Windows targets.  It generates
an unnecessary call to __alloca and wastes 16-bytes of stack space.
This isn't a problem since it currently only happens in main(), but it
would probably better to have the forced, dynamic, stack alignment code
done more intelligently in the backend where all the other prologue
stack allocation is handled.

						Ross Ridge

-- 
 l/  //	  Ross Ridge -- The Great HTMU
[oo][oo]  rridge@csclub.uwaterloo.ca
-()-/()/  http://www.csclub.uwaterloo.ca/u/rridge/ 
 db  //	  


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