From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23162 invoked by alias); 25 Feb 2005 16:03:54 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 23137 invoked from network); 25 Feb 2005 16:03:48 -0000 Received: from unknown (HELO pollux.ds.pg.gda.pl) (153.19.208.7) by sourceware.org with SMTP; 25 Feb 2005 16:03:48 -0000 Received: from localhost (localhost [127.0.0.1]) by pollux.ds.pg.gda.pl (Postfix) with ESMTP id 35D7FF5943; Fri, 25 Feb 2005 17:03:44 +0100 (CET) Received: from pollux.ds.pg.gda.pl ([127.0.0.1]) by localhost (pollux [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 28750-02; Fri, 25 Feb 2005 17:03:44 +0100 (CET) Received: from piorun.ds.pg.gda.pl (piorun.ds.pg.gda.pl [153.19.208.8]) by pollux.ds.pg.gda.pl (Postfix) with ESMTP id ED1B4E1D01; Fri, 25 Feb 2005 17:03:43 +0100 (CET) Received: from blysk.ds.pg.gda.pl (macro@blysk.ds.pg.gda.pl [153.19.208.6]) by piorun.ds.pg.gda.pl (8.13.1/8.13.1) with ESMTP id j1PG3hOS025713; Fri, 25 Feb 2005 17:03:43 +0100 Date: Sat, 26 Feb 2005 00:02:00 -0000 From: "Maciej W. Rozycki" To: Richard Sandiford Cc: cgd@broadcom.com, binutils@sources.redhat.com Subject: Re: [patch] MIPS: Fix synthesized doubleword transfers (ping) In-Reply-To: <87oee9ha6p.fsf@firetop.home> Message-ID: References: <87sm3lhdo1.fsf@firetop.home> <87oee9ha6p.fsf@firetop.home> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Status: Clean X-SW-Source: 2005-02/txt/msg00645.txt.bz2 On Thu, 24 Feb 2005, Richard Sandiford wrote: > What I meant by the quote above was: suppose we have: > > ld ,sym + offset > > on a 32-bit target and: > > sym = 0x....4 > offset = 0x....4 > > sym + offset is aligned, but the individual values aren't. That might > or might not be interpreted as satisfying any hypothetical "32-bit lds > must be to aligned addresses" requirement. > > It's an assembler interface thing really. Does the assembler require > the macros to use aligned addresses? If so, does it require any symbol > part to be aligned too? (Obviously the individual "lw"s don't care > about doubleword alignment, but that wasn't the point.) For whatever reason you may have e.g: sym = 0x87654321 and offset = 0x7fff. It's valid for a dword transfer, because the effective address is aligned. > ...if we want to support unaligned accesses, fair enough. > I guess the user can always use explicit relocs if they > know the address is aligned. A user shouldn't use these macros in the first place, but if he does, then they should still produce valid code. Therefore I'd prefer correctness over performance and code size. What about the other patch? It's not the same issue, despite looking close. Maciej