Another possibility :
loopentry r3
...
lload r1,[r2] --> r1 =
*r2; lock LSU entry
...
lstore r1,[r2],r3 --> if
locked, *r2 = r1, unlock LSU entry.
if not, jump to r3
we jump instead of setting false a register
when we cannot store because the lock is discarded in the LSU
entry.
The only interest to do so, is to reduce
instructions since we can expect having a conditional jumping after a failed
lstore.
But the counterpart is that you cannot sandwitch
some instructions between lstore and conditional jump or just want to jump when
lstore suceeds.
|