From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1242 invoked by alias); 29 Apr 2004 00:48:29 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 1235 invoked from network); 29 Apr 2004 00:48:28 -0000 Received: from unknown (HELO perpugilliam.csclub.uwaterloo.ca) (129.97.134.31) by sources.redhat.com with SMTP; 29 Apr 2004 00:48:28 -0000 Received: by perpugilliam.csclub.uwaterloo.ca (Postfix, from userid 20006) id D81B6A8555; Wed, 28 Apr 2004 20:48:27 -0400 (EDT) Subject: RE: g++ 3.4.0 cygwin, codegen SSE & alignement issues To: gcc@gcc.gnu.org Date: Thu, 29 Apr 2004 04:49:00 -0000 MIME-Version: 1.0 Message-Id: <20040429004827.D81B6A8555@perpugilliam.csclub.uwaterloo.ca> From: rridge@csclub.uwaterloo.ca (Ross Ridge) X-SW-Source: 2004-04/txt/msg01351.txt.bz2 > Well, it's quicker to allocate a constant size stack frame than to >dynamically calculate the alignment requirements, but only by two or >three fairly trivial instructions. And although aligning the frame just >once at startup and keeping it aligned by always allocating aligned-size >stack frames, in some situations stack memory is a limited resource, and >particularly since not all code uses vector registers, there's a lot of >stack memory usage to be saved by not making all the stack frames bigger >just for the sake of the very few frames for functions that actually >use the vector regs. So I'd say it's probably one of those trade-offs >for which there's no one 'right' answer. 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. Ross Ridge -- l/ // Ross Ridge -- The Great HTMU [oo][oo] rridge@csclub.uwaterloo.ca -()-/()/ http://www.csclub.uwaterloo.ca/u/rridge/ db //