This is the mail archive of the binutils@sources.redhat.com 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]

Re: Patch: Updates on mips testcases


> Date: Sat, 9 Jun 2001 08:42:16 -0700
> From: "H . J . Lu" <hjl@lucon.org>

> On Sun, Jun 10, 2001 at 12:03:33AM +0930, Alan Modra wrote:
> > On Fri, Jun 08, 2001 at 11:29:46PM -0700, H . J . Lu wrote:
> > > +++ gas/mips/relax.s	Fri Jun  8 23:12:46 2001
> > > @@ -0,0 +1,7 @@
> > > +# Source file used to test relaxation.
> > > +
> > > +	.text
> > > +foo:
> > > +	move    $2, $3          # just something
> > > +        .space  0x20000         # to make a 128kb loop body
> > > +        beq     $2, $3, foo
> > 
> > This isn't exactly a failure of relaxation.  It's just that the branch
> > offset is too big.
> > 
> 
> 1. You may see it when compiling certain version of gcc with -O0.

That's not supposed to happen.  GCC is supposed to deal with this
by performing the substitution below.  This often breaks, typically
because GCC is misinformed about the length of some instruction,
but it is also easily fixed.

> 2. The IRIX assembler can handle it just fine. It is turned into
> 
> 	bneq     $2, $3, bar
> 	jump to foo
> bar:

-- 
- Geoffrey Keating <geoffk@geoffk.org>


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