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]
Other format: [Raw text]

Re: MIPS gas relaxation still doesn't work


On Oct 12, 2002, "H. J. Lu" <hjl@lucon.org> wrote:

> 1. -relax-branch is not on by default.
> 2. I got

> Warning: relaxed out-of-range branch into a jump

Just as designed.  The message in which I posted the last version of
the patch explains why it's off by default.  The warning is printed
as suggested by others.

The reasoning is that out-of-range branches are not supposed to appear
in compiler-generated code.  Ever.  The compiler should be able to
generate correct, optimized code.  If it doesn't, it's a bug, and
that's why we have branch-relaxing off by default, and warning even
when enabled.

> If I understand it correctly, -relax-branch is off by default since
> it may generate correct, but worse, code under certain conditions.

Right.

> 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.

I'd say -relax-branch turns the hard errors into warnings.  I'm open
to changes in this regard.  I don't care either way.  In fact, I
posted the original patch with branch relaxation enabled by default
and without warnings, but I was convinced both of them were good ideas
and changed the patch to comply.  Now the burden of convincing others
otherwise is yours :-)

-- 
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


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