From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13475 invoked by alias); 9 May 2006 14:44:00 -0000 Received: (qmail 13466 invoked by uid 22791); 9 May 2006 14:44:00 -0000 X-Spam-Check-By: sourceware.org Received: from sadr.equallogic.com (HELO sadr.equallogic.com) (66.155.203.134) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 09 May 2006 14:43:56 +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 k49Ehrkq014915 for ; Tue, 9 May 2006 10:43:54 -0400 Received: from M31.equallogic.com (M31.equallogic.com [172.16.1.31]) by sadr.equallogic.com (8.12.8/8.12.8) with SMTP id k49Ehr3L014910; Tue, 9 May 2006 10:43:53 -0400 Received: from pkoning.equallogic.com ([172.16.1.169]) by M31.equallogic.com with Microsoft SMTPSVC(6.0.3790.211); Tue, 9 May 2006 10:43:52 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17504.43687.511263.125714@gargle.gargle.HOWL> Date: Tue, 09 May 2006 16:10:00 -0000 From: Paul Koning To: drow@false.org Cc: ths@networkno.de, binutils@sourceware.org Subject: Re: [PATCH] Relax MIPS j/jal out-of-range check References: <20060509141637.GB27291@networkno.de> <20060509141949.GA4951@nevyn.them.org> X-Mailer: VM 7.17 under 21.5 (beta23) "daikon" XEmacs Lucid X-IsSubscribed: yes Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2006-05/txt/msg00175.txt.bz2 >>>>> "Daniel" == Daniel Jacobowitz writes: Daniel> On Tue, May 09, 2006 at 03:16:37PM +0100, Thiemo Seufer Daniel> wrote: >> Hello All, >> >> I applied the appended patch. It relaxes the range checking for j >> and jal addresses to a warning, since there are a few cases where >> the effect of an out of range jump can be the intended result. Daniel> Why? Especially bearing in mind that we're in the assembler Daniel> here. This doesn't make sense to me. If you have a routine that's sometimes called from uncached code, and the label is a KSEG0 address, you could call it from KSEG1 code simply with jal label and the machine will do the right thing (you end up at the KSEG1 address corresponding to "label"). It's a bit of a stretch, I suppose, but I've run into this. Without the patch you end up having to do this: jal label+0x20000000 or perhaps even uglier things, if that address arithmetic is invalid here. paul