![](http://datasheet.mmic.net.cn/230000/79RC32438-200BB_datasheet_15568909/79RC32438-200BB_620.png)
IDT
Instruction Set
79RC32355 User Reference Manual
A - 70
November 4, 2002
Notes
LL
Format:
LL rt, offset(base)
MIPS32
Purpose:
To load a word from memory for an atomic read-modify-write
Description:
rt
←
memory[base+offset]
The LL and SC instructions provide the primitives to implement atomic read-modify-write (RMW)
operations for cached memory locations.
The 16-bit signed
offset
is added to the contents of GPR
base
to form an effective address. The
contents of the 32-bit word at the memory location specified by the aligned effective address are
fetched, sign-extended to the GPR register length if necessary, and written into GPR
rt
.
This begins a RMW sequence on the current processor. There can be only one active RMW
sequence per processor.
When an LL is executed it starts an active RMW sequence replacing any other sequence that
was active.
The RMW sequence is completed by a subsequent SC instruction that either completes the RMW
sequence atomically and succeeds, or does not and fails.
Executing LL on one processor does not cause an action that, by itself, causes an SC for the
same block to fail on another processor.
An execution of LL does not have to be followed by execution of SC; a program is free to aban-
don the RMW sequence without attempting a write.
Restrictions:
The addressed location must be cached; if it is not, the result is undefined.
The effective address must be naturally-aligned. If either of the 2 least-significant bits of the effec-
tive address is non-zero, an Address Error exception occurs.
Operation:
vAddr
if vAddr
1..0
≠
0
2
then
SignalException(AddressError)
endif
(pAddr, CCA)
←
AddressTranslation (vAddr, DATA, LOAD)
memword
←
LoadMemory (CCA, WORD, pAddr, vAddr, DATA)
GPR[rt]
←
memword
LLbit
←
1
←
sign_extend(offset) + GPR[base]
31
26 25
21 20
16 15
0
LL
110000
base
rt
offset
6
5
5
16
Load Linked Word
LL