From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3288 invoked by alias); 15 Apr 2005 10:32:16 -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 3154 invoked from network); 15 Apr 2005 10:31:59 -0000 Received: from unknown (HELO pollux.ds.pg.gda.pl) (153.19.208.7) by sourceware.org with SMTP; 15 Apr 2005 10:31:59 -0000 Received: from localhost (localhost [127.0.0.1]) by pollux.ds.pg.gda.pl (Postfix) with ESMTP id 9896FE1CA6; Fri, 15 Apr 2005 12:31:55 +0200 (CEST) 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 31432-01; Fri, 15 Apr 2005 12:31:55 +0200 (CEST) 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 4175EE1C9A; Fri, 15 Apr 2005 12:31:55 +0200 (CEST) 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 j3FAVuav010404; Fri, 15 Apr 2005 12:31:57 +0200 Date: Fri, 15 Apr 2005 10:32:00 -0000 From: "Maciej W. Rozycki" To: Thiemo Seufer Cc: Eric Christopher , newlib@sources.redhat.com, binutils@sources.redhat.com, cgd@broadcom.com Subject: Re: [patch] adjust libgloss addresses for 64-bit In-Reply-To: <20050414223754.GI32470@hattusa.textio> Message-ID: References: <1113516346.4591.39.camel@localhost.localdomain> <20050414223754.GI32470@hattusa.textio> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Status: Clean X-SW-Source: 2005-04/txt/msg00413.txt.bz2 On Fri, 15 Apr 2005, Thiemo Seufer wrote: > > Here's another shot at this. The problem that we encounter is that for > > 64-bit addresses "la" (or dla for that matter) does not sign extend the > > constant passed in the case of: > > > > la $2,0x80000000 > > > > leaving us with a zero-extended value in a register which is > > unpredictable as far as the standard (and at least one chip out there) Hmm, 0x80000000 should be a valid XKUSEG address... > > is concerned. One option would be to modify the assembler to > > automatically sign-extend when in the presence of constants that are > > smaller than a single register. > > I think la should load a proper address for 32bit address space, even > when used in code with 64bit addresses. That's the most useful > behaviour for it. So what should "la $2,0x80000000($3)" do when using 64-bit addresses? Replace/supplement the offset with a symbol as suitable... Maciej