From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17948 invoked by alias); 10 Apr 2003 00:40:19 -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 17937 invoked from network); 10 Apr 2003 00:40:18 -0000 Received: from unknown (HELO faui11.informatik.uni-erlangen.de) (131.188.31.2) by sources.redhat.com with SMTP; 10 Apr 2003 00:40:18 -0000 Received: (from weigand@localhost) by faui11.informatik.uni-erlangen.de (8.9.1/8.1.4-FAU) id CAA24017; Thu, 10 Apr 2003 02:40:10 +0200 (MET DST) From: Ulrich Weigand Message-Id: <200304100040.CAA24017@faui11.informatik.uni-erlangen.de> Subject: Re: DATA_ALIGNMENT vs. DECL_USER_ALIGNMENT To: rth@redhat.com (Richard Henderson) Date: Thu, 10 Apr 2003 03:10:00 -0000 Cc: weigand@immd1.informatik.uni-erlangen.de (Ulrich Weigand), gcc@gcc.gnu.org In-Reply-To: <20030409235853.GC23063@redhat.com> from "Richard Henderson" at Apr 09, 2003 04:58:53 PM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2003-04/txt/msg00408.txt.bz2 Richard Henderson wrote: > I think I'd prefer that we somehow generate an error for > alignments that cannot be supported (for some definition > of cannot; I have trouble understanding why labels can't > be byte aligned on a byte-addressable machine). The problem is the LOAD ADDRESS RELATIVE LONG instruction which is used to load the address of a label into a register; this instruction can only load even addresses. This is somewhat reasonable as *code* must always be 2-byte aligned anyway on s390 or execution will trap. For data labels, it would of course be possible to use some other means to load the address (e.g. from the literal pool); however as the backend has no way to find out for which labels this would be necessary, the alternative would mean not to use LARL for any label. We've decided to simply force 2-byte alignment for all data labels as well (which can't really hurt anyone), and then be able to use LARL for all labels. > As is clear from the Irix problem you quote, the user > might have some real need for a particular alignment, > and forcing something on them may break things. At least > this way we'll fail to compile instead of DTWT. If we want an error message, the safest place to generate that would probably be the linker (it gets a R_390_PC32DBL relocation to an odd address, which cannot be correct). But this does not solve my problem that Ada does not bootstrap; for some reason the Ada frontend sets the USER_ALIGN flag for a huge number of variables, even those that were defined without any special 'Alignment attributes ... Bye, Ulrich -- Dr. Ulrich Weigand weigand@informatik.uni-erlangen.de