From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23032 invoked by alias); 12 Feb 2003 05:55:15 -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 23019 invoked from network); 12 Feb 2003 05:55:14 -0000 Received: from unknown (HELO mulga.cs.mu.OZ.AU) (128.250.1.22) by 172.16.49.205 with SMTP; 12 Feb 2003 05:55:14 -0000 Received: from hg.cs.mu.oz.au (hg.cs.mu.OZ.AU [128.250.33.14]) by mulga.cs.mu.OZ.AU with ESMTP id QAA11488; Wed, 12 Feb 2003 16:53:51 +1100 (EST) Received: (from fjh@localhost) by hg.cs.mu.oz.au (8.10.2/8.10.2/SuSE Linux 8.10.0-0.3) id h1C5rmV14207; Wed, 12 Feb 2003 16:53:48 +1100 Date: Wed, 12 Feb 2003 05:55:00 -0000 From: Fergus Henderson To: Mike Stump Cc: John David Anglin , gcc@gcc.gnu.org, gianni@scaramanga.co.uk, kenner@vlsi1.ultra.nyu.edu Subject: Re: Altivec + 16 byte alignment Message-ID: <20030212165348.A14176@hg.cs.mu.OZ.AU> References: <200302111959.h1BJxXMN007739@hiauly1.hia.nrc.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from mstump@apple.com on Tue, Feb 11, 2003 at 01:00:15PM -0800 X-SW-Source: 2003-02/txt/msg00756.txt.bz2 On 11-Feb-2003, Mike Stump wrote: > On Tuesday, February 11, 2003, at 11:59 AM, John David Anglin wrote: > > Another issue is GCC's alignment attribute is silently ignored for > > stack locals and the documentation doesn't say that. > > Let us agree that this is just a bug, or at least a bug for CPUs that > have hard requirements of say 16 bytes (Altivec, SSE) and the user asks > for 16 byte alignment and we silently only do 8 byte alignment. Please let us agree that this is just a bug, regardless of the CPU's requirements. The alignment declaration might be used by the programmer to ensure that the lower bits are available for use as tag bits. For example, the following program should result in either success or a compile error (if the requested alignment is not supported). But IMHO it should not result in an assertion failure. #include #define ALIGN 32 int main() { char c __attribute__((aligned(ALIGN))); assert ((((unsigned long) &c) & (ALIGN - 1)) == 0); return 0; } -- Fergus Henderson | "I have always known that the pursuit The University of Melbourne | of excellence is a lethal habit" WWW: | -- the last words of T. S. Garp.