This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: g++ 3.4.0 cygwin, codegen SSE & alignement issues
- From: rridge at csclub dot uwaterloo dot ca (Ross Ridge)
- To: gcc at gcc dot gnu dot org
- Date: Wed, 28 Apr 2004 23:05:43 -0400 (EDT)
- Subject: 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 //