Hi all,
> > NESTED(except_vec3, 0, sp)
> > .set noat
> >
> > SAVE_ALL
> >
> > lw t0, jiffies
> > add t0, 1
> > sw t0, jiffies
>
> sequence above, try:
>
> la k0,jiffies
> lw k1,(k0)
> addiu k1,1
> sw k1,(k0)
>
> ...which seems correct to me, but still doesn't make them jiffies jump
> the way I think it should... <sigh> Maybe I've been away from MIPS
> assembler too long...
The problem might be that you're assembling that code in noreorder mode.
In that case there will be no nop be inserted after the lw instruction
and the effect of the addiu is undefined.
This will assemble into the shortest code for all CPUs:
.set push
.set reorder
lui k0,%hi(jiffies)
lw k1,%lo(jiffies)(k0)
addiu k1,1
sw k1,%lo(jiffies)(k0)
.set pop
> The BogoMips will only print if the console driver is working, unless
Ralf
|