From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8633 invoked by alias); 30 Nov 2004 13:43:22 -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 8605 invoked from network); 30 Nov 2004 13:43:18 -0000 Received: from unknown (HELO NUTMEG.CAM.ARTIMI.COM) (217.40.111.177) by sourceware.org with SMTP; 30 Nov 2004 13:43:18 -0000 Received: from mace ([192.168.1.25]) by NUTMEG.CAM.ARTIMI.COM with Microsoft SMTPSVC(6.0.3790.211); Tue, 30 Nov 2004 13:41:51 +0000 From: "Dave Korn" To: "'Robert Dewar'" , "'Sam Lauber'" Cc: Subject: RE: Useless assembly Date: Tue, 30 Nov 2004 14:12:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit In-Reply-To: <41ABF5C3.8030206@gnat.com> Message-ID: X-OriginalArrivalTime: 30 Nov 2004 13:41:51.0609 (UTC) FILETIME=[58ECE690:01C4D6E2] X-SW-Source: 2004-11/txt/msg01197.txt.bz2 > -----Original Message----- > From: gcc-owner On Behalf Of Robert Dewar > Sent: 30 November 2004 04:24 > Sam Lauber wrote: > > What's the stack have to do with it? I thought I had a 32-bit i686. > > Why would we have to align the stack to a 16-bit boundry? > > It's 16-byte alignment, and the code you eliminated was > performing many critical > functions including this alignment, which is required for > maximum efficiency. Not just efficiency but correctness also, when using vector instructions. Throw away the stack alignment code in main and everything down the call hierarchy will not have the alignment it expects from the stack, meaning it will place local variables at unaligned addresses. I don't know whether the mmx/sse unit would trap or just round the unaligned addresses (thereby causing locals to stomp all over each other) but the resulting mess would _not_ be a pretty sight. > > And why would there have to be a stack at all? > > That's a peculiar question, the stack is fundamental to the calling > sequence and the call instruction. I guess now would not be a good time to mention stackless python ? :-) cheers, DaveK -- Can't think of a witty .sigline today....