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
- Cc: binutils at sources dot redhat dot com
- Date: Sat, 12 Oct 2002 15:51:51 -0700
- Subject: Re: MIPS gas relaxation still doesn't work
- References: <20021012113423.A27894@lucon.org>
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?
>
I see there are 2 problems:
1. -relax-branch is not on by default.
2. I got
Warning: relaxed out-of-range branch into a jump
If I understand it correctly, -relax-branch is off by default since
it may generate correct, but worse, code under certain conditions.
My question is which ABI will generate code like
la $3,l2-l3
If only EMBEDDED_PIC does it, why not turn it on for other ABIs?
Is the warning really necessary? Do other gas targets issue a warning
for branch/jump relaxation? Does the native mips assembler issuse a
warning? I changed the mips gas to get rid of some warnings:
http://sources.redhat.com/ml/binutils/2001-06/msg00101.html
I hate to see the new ones added for no very good reasons.
H.J.