public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Alexandre Oliva <aoliva@redhat.com>
To: binutils@sources.redhat.com
Cc: echristo@redhat.com
Subject: Re: MIPS assembler branch relaxations
Date: Sun, 15 Sep 2002 01:00:00 -0000	[thread overview]
Message-ID: <orelbv7tfv.fsf@free.redhat.lsd.ic.unicamp.br> (raw)
In-Reply-To: <orr8fxdsby.fsf@free.redhat.lsd.ic.unicamp.br>

On Sep 14, 2002, Alexandre Oliva <aoliva@redhat.com> wrote:

> +      val = S_GET_VALUE (fragp->fr_symbol) + fragp->fr_offset;
> +
> +      addr = fragp->fr_address + fragp->fr_fix;
> +
> +      val -= addr;
> +
> +      toofar = val < - (0x8000 << 2) || val >= (0x8000 << 2);

I just realized this test is off by 4.  The base address added to the
branch offset is the address of the instruction in the delay slot, not
that of the branch instruction.  I'm amending the patch as follows:

         addr = fragp->fr_address + fragp->fr_fix + 4;

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer

      parent reply	other threads:[~2002-09-15  4:44 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-14  4:49 Alexandre Oliva
2002-09-14 14:28 ` Daniel Jacobowitz
2002-09-14 14:46   ` Eric Christopher
2002-09-14 21:33     ` Daniel Jacobowitz
2002-09-14 21:33       ` Eric Christopher
2002-09-14 15:00   ` Paul Koning
2002-09-14 16:35     ` Daniel Jacobowitz
2002-09-14 18:43       ` Paul Koning
2002-09-14 21:39   ` Thiemo Seufer
2002-09-14 22:18     ` Alexandre Oliva
2002-09-15  2:25       ` Thiemo Seufer
2002-09-15  3:38         ` Alexandre Oliva
2002-09-15  0:49   ` Alexandre Oliva
2002-09-15  9:15     ` Daniel Jacobowitz
2002-09-16 11:56     ` Richard Henderson
2002-09-17  0:09       ` Alexandre Oliva
2002-09-17  0:26         ` Richard Henderson
2002-09-17  0:38         ` Thiemo Seufer
2002-10-09 16:51           ` Alexandre Oliva
2002-10-09 16:54             ` Alexandre Oliva
2002-10-09 17:17               ` H. J. Lu
2002-10-11 13:08             ` Eric Christopher
2002-09-14 14:39 ` H. J. Lu
2002-09-14 23:12   ` Alexandre Oliva
2002-09-15  9:13     ` H. J. Lu
2002-09-15 15:32       ` Eric Christopher
2002-09-15 16:53         ` H. J. Lu
2002-09-15  1:00 ` Alexandre Oliva [this message]

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=orelbv7tfv.fsf@free.redhat.lsd.ic.unicamp.br \
    --to=aoliva@redhat.com \
    --cc=binutils@sources.redhat.com \
    --cc=echristo@redhat.com \
    /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).