This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: MIPS gas relaxation still doesn't work
- From: "H. J. Lu" <hjl at lucon dot org>
- To: aoliva at redhat dot com, linux-mips at linux-mips dot org, gcc at gcc dot gnu dot org
- Cc: binutils at sources dot redhat dot com
- Date: Mon, 14 Oct 2002 08:28:10 -0700
- Subject: Re: MIPS gas relaxation still doesn't work
- References: <20021012113423.A27894@lucon.org> <20021013145423.A10174@lucon.org>
On Sun, Oct 13, 2002 at 02:54:23PM -0700, H. J. Lu wrote:
> On Sat, Oct 12, 2002 at 11:34:23AM -0700, H. J. Lu wrote:
> > Hi Alexandre,
> >
> > I don't think your MIPS gas relaxation works. I got
> >
> > # mipsel-linux-gcc /export/gnu/src/gcc-3.2/gcc/gcc/testsuite/g++.dg/opt/longbranch1.C
> > /tmp/cc0rrnMz.s: Assembler messages:
> > /tmp/cc0rrnMz.s:33733: Error: Branch out of range
> > /tmp/cc0rrnMz.s:33740: Error: Branch out of range
> >
> > Could you please verify it?
> >
>
> Here is a small testcase extracted from gcc. I got
>
> # mipsel-linux-gcc -c foo.s
> foo.s: Assembler messages:
> foo.s:7: Error: Branch out of range
>
> You may say it is a gcc bug. But I don't remember to see SGI assmebler
> have any problem with g++.dg/opt/longbranch1.C. Does gcc generate
> different code for Irix from Linux? Is it really unsafe to do branch
> relaxation when macro is off.
>
>
Here is a testcase which gas refuses to relax. I have 2 questions:
1. Does the SGI mips assembler relax it?
2. Is noreorder/nomacro really needed for gas? If I remeber right, it
is safe for gas to use
foo:
j foo
Can gcc be be modified not to generate noreorder/nomacro for branchs if
gas is used?
H.J.
--foo.s---
foo:
.space 0x20000
.set noreorder
.set nomacro
j foo
nop
.set macro
.set reorder