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 Sun, Oct 13, 2002 at 07:18:29PM -0200, Alexandre Oliva wrote:
> 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.

MIPS isn't the only gas target which does relaxation. I don't see
other targets have warnings. If gcc wants to catch its own bug, gcc
should tell gas to do so. It is not the job of gas to second guess.
Besides, I don't remeber to see the native mips assembler issue a
warning on it.

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

It is not a real problem for me. It is trivial to add another mips
patch to my Linux binutils. I am planning to do just that.


H.J.


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