From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32372 invoked by alias); 15 Dec 2008 21:34:23 -0000 Received: (qmail 32139 invoked by uid 48); 15 Dec 2008 21:33:00 -0000 Date: Mon, 15 Dec 2008 21:34:00 -0000 Message-ID: <20081215213300.32138.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: "whaley at cs dot utsa dot edu" 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/msg01554.txt.bz2 ------- 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. 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