From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3392 invoked by alias); 15 Dec 2008 21:40:50 -0000 Received: (qmail 2720 invoked by alias); 15 Dec 2008 21:39:25 -0000 Date: Mon, 15 Dec 2008 21:40:00 -0000 Message-ID: <20081215213925.2719.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug target/38496] Gcc misaligns arrays when stack is forced follow the x8632 ABI In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "pinskia at gmail dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-12/txt/msg01556.txt.bz2 ------- Comment #16 from pinskia at gmail dot com 2008-12-15 21:39 ------- Subject: Re: Gcc misaligns arrays when stack is forced follow the x8632 ABI Sent from my iPhone On Dec 15, 2008, at 1:33 PM, "whaley at cs dot utsa dot edu" wrote: > > > ------- Comment #15 from whaley at cs dot utsa dot edu 2008-12-15 > 21:32 ------- >> GCC chose to change the *unwritten* standard for the ABI in use for >> IA32 GNU/Linux. > > This is not true. Prior to this change, gcc followed the *written* > standard > provided by the LSB. LSB was written years after we had already did this back in gcc 3.0. Please check the history before saying gcc followed a written standard when none existed when this change was done. > You chose to violate the standard, or to put as you seem > to prefer, you chose to declare that you followed no standard, as > the written > standard previously used by pretty much all OSes on the x86 was > suddenly > unusable. > >> The SCO document may have been useful before SSE, but processor >> architecture and language developments have made it problematic for >> many years. > > This is not even trivially true. SSE requires no change in the ABI > to support: > it is purely convenience to start with a known 16-byte alignment: an > andb and a > register save/restore fixes the problem completely, without > abandoning the > standard. I believe gcc still abides by this "problematic for many > years" > standard in all respects except stack alignment, which is a trivial > problem to > solve and still abide by the standard. So, you abandoned standard > compliance > to solve a minor irritant, that you yourself have fixed in the new > 4.4 series. > From 4.4 on, you broke the standard for no gain at all, since you > have now > added the minor complexity of manually aligning the stack anyway. > > Of course the standard seems outdated to us: it is supporting an > architecture > that is decades old, and that is the strength of it. If you want > the shiny new > stuff, you go to x86-64. > > > -- > > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38496 > -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38496