From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19507 invoked by alias); 4 Feb 2008 14:45:17 -0000 Received: (qmail 19491 invoked by uid 22791); 4 Feb 2008 14:45:16 -0000 X-Spam-Check-By: sourceware.org Received: from cerber.ds.pg.gda.pl (HELO cerber.ds.pg.gda.pl) (153.19.208.18) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 04 Feb 2008 14:44:45 +0000 Received: from localhost (unknown [127.0.0.17]) by cerber.ds.pg.gda.pl (Postfix) with ESMTP id A62EC400CD; Mon, 4 Feb 2008 15:44:43 +0100 (CET) Received: from cerber.ds.pg.gda.pl ([153.19.208.18]) by localhost (cerber.ds.pg.gda.pl [153.19.208.18]) (amavisd-new, port 10024) with ESMTP id dODZ4sluuMlp; Mon, 4 Feb 2008 15:44:38 +0100 (CET) Received: from piorun.ds.pg.gda.pl (piorun.ds.pg.gda.pl [153.19.208.8]) by cerber.ds.pg.gda.pl (Postfix) with ESMTP id CEDF3400BD; Mon, 4 Feb 2008 15:44:38 +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.8/8.13.8) with ESMTP id m14Eif3g025429; Mon, 4 Feb 2008 15:44:41 +0100 Date: Mon, 04 Feb 2008 14:45:00 -0000 From: "Maciej W. Rozycki" To: Daniel Jacobowitz cc: Joel Brobecker , Pedro Alves , Jim Blandy , gdb-patches Subject: Re: arm_addr_bits_remove In-Reply-To: <20080204134132.GB28485@caradoc.them.org> Message-ID: References: <479752C8.8030201@portugalmail.pt> <8f2776cb0801231121r3fe9aea0q6f3c3d6887fcb251@mail.gmail.com> <20080123192842.GA22477@caradoc.them.org> <8f2776cb0801231311o19c31781h8a4663c405bcd22b@mail.gmail.com> <479819E2.1030603@portugalmail.pt> <8f2776cb0801232227n64502d4akef4642b051e77772@mail.gmail.com> <4798871B.4080207@codesourcery.com> <20080124133844.GA15771@caradoc.them.org> <20080124214849.GF3979@adacore.com> <20080204134132.GB28485@caradoc.them.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Status: Clean X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-02/txt/msg00070.txt.bz2 On Mon, 4 Feb 2008, Daniel Jacobowitz wrote: > > For the record -- to ever hit this case on MIPS you would have to run the > > test suite in the 32-bit kernel mode, so IRIX certainly does not apply > > here. One of the embedded targets might fit, e.g. using newlib and the > > GNU sim. Still this would be a bug if it mattered these days as proper > > sign-extension of addresses is meant to be done for MIPS now. > > Really? This is for removing low bits, not high bits - I'd be more > worried about MIPS16. Well, for MIPS the function only removes high bits if any at all: static CORE_ADDR mips_addr_bits_remove (CORE_ADDR addr) { struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); if (mips_mask_address_p (tdep) && (((ULONGEST) addr) >> 32 == 0xffffffffUL)) return addr &= 0xffffffffUL; /* sic! */ else return addr; } See the comment in the sources for some background which I can understand based on my experience with the issues over the years and which I skipped here due to its length. Maciej