From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30588 invoked by alias); 6 Apr 2005 18:37:13 -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 30358 invoked from network); 6 Apr 2005 18:36:55 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 6 Apr 2005 18:36:55 -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 j36IatOS027670; Wed, 6 Apr 2005 14:36:55 -0400 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id j36IarO07738; Wed, 6 Apr 2005 14:36:53 -0400 Received: from [10.4.24.189] (vpn26-1.sfbay.redhat.com [172.16.26.1]) by potter.sfbay.redhat.com (8.12.8/8.12.8) with ESMTP id j36IanYE021724; Wed, 6 Apr 2005 14:36:50 -0400 Subject: Re: [patch] modify crt0.S for 64-bit address targets From: Eric Christopher To: cgd@broadcom.com Cc: newlib@sources.redhat.com, binutils@sources.redhat.com In-Reply-To: References: <1112768205.5493.2.camel@localhost.localdomain> Content-Type: text/plain Date: Wed, 06 Apr 2005 18:37:00 -0000 Message-Id: <1112812609.5554.2.camel@localhost.localdomain> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-SW-Source: 2005-04/txt/msg00170.txt.bz2 On Tue, 2005-04-05 at 23:46 -0700, cgd@broadcom.com wrote: > (added cc: to binutils list.) > > Eric, > > My take on this is that the problem is **not** that addu/subu are > incorrect, but rather that the address being loaded is not what's > intended! > > The intended address (K0BASE) is 0xffffffff80000000, and based on your > comments (and the detection of the UNPREDICTABLE condition), I believe > that 0x0000000080000000 is being loaded instead. > Assuredly this is the case. I think the problem might be from using the ori instead of addi for the address. ori zero extends the constant, addi sign extends. IIRC all addresses should be sign extended and as such we should be using addi here yes? I seem to recall that we changed this a while back because the ori was some small amount faster. Maciej? Thiemo? This ringing any bells? > The address is a sign-extended 32-bit value, the addu/subu should be > OK. You are correct. -eric