Atsushi Nemoto <[EMAIL PROTECTED]> writes: > On 21 Jul 2006 10:06:34 -0700, Ian Lance Taylor <[EMAIL PROTECTED]> 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