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: nop in load-delay-slot (on MIPS o32 PIC code)


On Tue, 20 Apr 2004 cgd@broadcom.com wrote:

> > In MIPS PIC code, mips-linux-as produces a nop for load-delay-slot in
> > many case even if -march=mips2 was specified.
> > [ ... ]
> > I think this nop can be omitted on "!gpr_interlocks" condition.  Is
> > this nop required by MIPS ABI(o32) ?  The march=mips2 option should
> > not override this behavior ?
> 
> You are correct.  This is an issue, but probably not worth fixing IMO.

 Fixing it shouldn't actually be that tough these days.

> I've got patches against an old version of binutils that did this for
> lots of the cases that we cared about.  But, it was fairly invasive,
> and, if i recall correctly, involved touching variant frags in some

 The current way of handling variant frags (thanks, Richard) makes such
changes to them quite easy to handle.  That may mean your patch requires a
major update, though.

> cases.  There aren't enough test cases for these code paths, either,
> which means that if one did this 'right' then it should also include a
> bunch of new test cases (which we didn't do, for our own use here).

 Hmm, I guess it's just a matter of adjusting exiting test cases for the 
-march=mips2 case.  If there is no test case for a particular variation, 
then it should probably be added whether changing the code involved or 
not. ;-)

> IMO The right solution is to use a newer compiler (3.4 8-) that
> generates explicit relocs and .set noreorder code, so when the
> explicit relocs code came along I dropped the patch from my source
> tree.

 That's a good workaround for compiled code, indeed.  There's handcoded
assembly out there, though, as well.

  Maciej

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +


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