From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7543 invoked by alias); 15 Apr 2005 17:35:47 -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 7484 invoked from network); 15 Apr 2005 17:35:41 -0000 Received: from unknown (HELO sadr.equallogic.com) (66.155.203.134) by sourceware.org with SMTP; 15 Apr 2005 17:35:41 -0000 Received: from sadr.equallogic.com (localhost.localdomain [127.0.0.1]) by sadr.equallogic.com (8.12.8/8.12.8) with ESMTP id j3FHZeje002411; Fri, 15 Apr 2005 13:35:40 -0400 Received: from M30.equallogic.com (m30 [172.16.1.30]) by sadr.equallogic.com (8.12.8/8.12.8) with SMTP id j3FHZdIT002406; Fri, 15 Apr 2005 13:35:39 -0400 Received: from pkoning.equallogic.com ([172.16.1.106]) by M30.equallogic.com with Microsoft SMTPSVC(5.0.2195.6713); Fri, 15 Apr 2005 13:35:39 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16991.64361.508338.807589@gargle.gargle.HOWL> Date: Fri, 15 Apr 2005 17:35:00 -0000 From: Paul Koning To: ths@networkno.de Cc: macro@linux-mips.org, echristo@redhat.com, newlib@sources.redhat.com, binutils@sources.redhat.com, cgd@broadcom.com Subject: Re: [patch] adjust libgloss addresses for 64-bit References: <1113516346.4591.39.camel@localhost.localdomain> <20050414223754.GI32470@hattusa.textio> <1113583817.4591.68.camel@localhost.localdomain> <20050415171813.GG21496@hattusa.textio> X-OriginalArrivalTime: 15 Apr 2005 17:35:39.0596 (UTC) FILETIME=[8A6FD8C0:01C541E1] X-SW-Source: 2005-04/txt/msg00432.txt.bz2 >>>>> "Thiemo" == Thiemo Seufer writes: >> Of course it is zero-extended. Otherwise it would be a different >> one; actually in the CKSEG0 space rather than XKUSEG. If you want >> the former, what's wrong with 0xffffffff80000000? -- please keep >> in mind we are talking about 64-bit addressing. Thiemo> But people used to use "la $2, 0x80000000" in order to get a Thiemo> sign-extended address. Loading two different addresses with Thiemo> the same code is at least surprising. I see la in 64bit mode Thiemo> as backward compatibility legacy, and this suggests not to Thiemo> change its behaviour. Agreed. Addresses are signed values on MIPS. Dxx opcodes are 64 bit operations; xx opcodes (when Dxx also exists) are 32 bit operations. So DLI loads a 64 bit int and LI a 32 bit int. DLA loads a 64 bit address and LA a 32 bit address. So the operand of LA should be a construct that is a valid 32 bit address (and 0x80000000 is one such) and it should be expanded into instructions that produce a valid representation of that address in a register (i.e., with sign extension if the registers are 64 bits). paul