This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Relax MIPS j/jal out-of-range check

Paul Koning wrote:
> >>>>> "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.

Exactly that's the reason for the change. Since it is only needed in a
few cases like cache probing routines I kept the warning about it.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]