MIPS gas relaxation still doesn't work

H. J. Lu hjl@lucon.org
Sat Oct 12 15:51:00 GMT 2002


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.



More information about the Binutils mailing list