This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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 RDHWR instruction reordering


Atsushi Nemoto <anemo@mba.ocn.ne.jp> writes:

> On 21 Jul 2006 10:06:34 -0700, Ian Lance Taylor <iant@google.com> wrote:
> > I also don't see why revision 108713 would affect this.
> > 
> > But I do note that this version is still bad.  The rdhwr instruction
> > is in the branch delay slot, and is therefore always executed.
> 
> Yes, and I think rdhwr should not be in delay slot anyway.  Just
> avoiding delay slot is quite easy.  Here is a proposal patch.
> 
> With this patch, it seems gcc 4.2 generate desired code for now,
> though there might be somewhere to fix.

This may be right, but I'm not sure that it is.  If it is OK to
unconditionally execute rdhwr, then it should be OK to put it in a
delay slot.  Unless that will break something when rdhwr is emulated.
Or will the emulation code run slower when rdhwr is in a delay slot?
That is, slower than it would if rdhwr were emulated without being in
a delay slot?

Ian


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