public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Thiemo Seufer <ths@networkno.de>
Cc: Paul Koning <pkoning@equallogic.com>, binutils@sourceware.org
Subject: Re: [PATCH] Relax MIPS j/jal out-of-range check
Date: Wed, 10 May 2006 17:05:00 -0000	[thread overview]
Message-ID: <20060510151359.GA7159@nevyn.them.org> (raw)
In-Reply-To: <20060510150442.GB27394@networkno.de>

On Wed, May 10, 2006 at 04:04:42PM +0100, Thiemo Seufer wrote:
> > How could you get the assembler to do this?  Normally you can't tell if
> > this is going to overflow until you've linked!  Linker errors are a
> > different kettle of fish.
> > 
> > I think the warning is just bogus, after looking at it.  We're warning
> > for "jal 0x10000000".  But we don't know the location of the jal yet,
> > so we haven't a clue if it's out of range, do we?
> 
> The patch is correct, but our explanation was misleading: The code
> checks for absolute addresses, and warns now if it crosses a 256 MB
> memory area. This allows e.g. to jump between KSEG0 and KSEG1 without
> hassles.

I don't think we're communicating.

drow@caradoc:~% cat a.s
        jal 0x10000000
drow@caradoc:~% /space/fsf/mips/install/bin/mips64-linux-as a.s
a.s: Assembler messages:
a.s:1: Error: jump address range overflow (0x10000000)

So... how can the assembler know that?  If you link the file into an
executable such that a.o(.text) is at 0x10000010, then the jal does not
overflow.

-- 
Daniel Jacobowitz
CodeSourcery

  reply	other threads:[~2006-05-10 15:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-09 14:58 Thiemo Seufer
2006-05-09 15:04 ` Daniel Jacobowitz
2006-05-09 16:10   ` Paul Koning
2006-05-09 16:11     ` Daniel Jacobowitz
2006-05-10 15:24       ` Thiemo Seufer
2006-05-10 17:05         ` Daniel Jacobowitz [this message]
2006-05-10 17:17           ` Thiemo Seufer
2006-05-10 20:13             ` Daniel Jacobowitz
2006-05-11  3:11               ` Eric Christopher
2006-05-11 12:26                 ` Richard Sandiford
2006-05-11 19:03               ` Thiemo Seufer
2006-05-09 18:26     ` Thiemo Seufer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060510151359.GA7159@nevyn.them.org \
    --to=drow@false.org \
    --cc=binutils@sourceware.org \
    --cc=pkoning@equallogic.com \
    --cc=ths@networkno.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).