Port-mips archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: COP0_SYNC definition



Hello,

On Mon, 20 Jun 2016 15:58:41 +0000
<Paul_Koning%Dell.com@localhost> wrote:

> > On Jun 18, 2016, at 9:35 AM, coypu%SDF.ORG@localhost wrote:
> > 
> > Hi,
> > 
> > We define in sys/arch/mips/include/cpuregs.h:157
> > #  define JR_HB_RA              .set push; .set mips32r2; jr.hb ra; nop;
> > 
> > for case of MIPSnnR2 only.
> > 
> > I think that either this nop is superfluous, or it should be ehb/ssnop.
> > I can't imagine a new implementation will ever require just a simple nop
> > as padding, aren't they all likely superscalar?
> 
> ehb and ssnop tend to show up in "hazards", where the whole pipeline
> needs to be delayed for some number of cycles.  I don't know what a
> jr.hb is, but that looks like the standard MIPS branch delay slot.
> Branch delay slots are filled with plain NOP when there's nothing
> useful to put in them.

Hmm, according to the docs I've been reading lately you just need to
make sure that whatever ends up in the delay slot isn't any kind of
jump. IIRC Loongson has a bug that needs additional voodoo around some
jumps in kernel mode though.

have fun
Michael


Home | Main Index | Thread Index | Old Index