From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8932 invoked by alias); 24 Feb 2005 22:20:48 -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 8825 invoked from network); 24 Feb 2005 22:20:41 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 24 Feb 2005 22:20:41 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id j1OMKaZh019271 for ; Thu, 24 Feb 2005 17:20:41 -0500 Received: from firetop.home (vpn50-46.rdu.redhat.com [172.16.50.46]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id j1OMKZK00431; Thu, 24 Feb 2005 17:20:35 -0500 Received: from rsandifo by firetop.home with local (Exim 4.34) id 1D4RLS-0001n5-7K; Thu, 24 Feb 2005 22:20:30 +0000 To: cgd@broadcom.com Cc: "Maciej W. Rozycki" , binutils@sources.redhat.com Subject: Re: [patch] MIPS: Fix synthesized doubleword transfers (ping) References: <87sm3lhdo1.fsf@firetop.home> From: Richard Sandiford Date: Fri, 25 Feb 2005 00:04:00 -0000 In-Reply-To: (cgd@broadcom.com's message of "24 Feb 2005 13:55:47 -0800") Message-ID: <87oee9ha6p.fsf@firetop.home> User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2005-02/txt/msg00624.txt.bz2 cgd@broadcom.com writes: > At Thu, 24 Feb 2005 21:05:49 +0000 (UTC), "Richard Sandiford" wrote: >> I suppose bad things could happen if you composed an aligned >> address from an unaligned symbol and an unaligned offset, >> but is that allowed? > > yes, at least as far as the ISA is concerned. I don't follow. The ISA has no concept of symbols vs. offsets. 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.) I thought the answer to both was "yes", and what with the ABI requirements, it'll be by far the common case. OTOH... > Also, it's perfectly well defined -- if a little bit strange (and > remarkably slow, since you take an exception 8-) -- to do these > accesses to odd addresses. ...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. Richard