
A CPU Instruction Set Details

LL rt, offset(base)
Description:
The 16-bit offset is sign-extended and added to the contents of general register base to form a virtual address. The contents of the word at the memory location specified by the effective address are loaded into general register rt. In 64-bit mode, the loaded word is sign-extended.
The processor begins checking the accessed word for modification by other processor and devices.
Load Linked and Store Conditional can be used to atomically update memory locations as shown:![]()
This atomically increments the word addressed by T0. Changing the ADD to an OR changes this to an atomic bit set. This instruction is available in User mode, and it is not necessary for CP0 to be enabled.
The operation of LL is undefined if the addressed location is uncached and, for synchronization between multiple processors, the operation of LL is undefined if the addressed location is noncoherent. A cache miss that occurs between LL and SC may cause SC to fail, so no load or store operation should occur between LL and SC, otherwise the SC may never be successful. Exceptions also cause SC to fail, so persistent exceptions must be avoided. If either of the two least-significant bits of the effective address are non-zero, an address error exception takes place.
Exceptions:
TLB refill exception
TLB invalid exception
Bus error exception
Address error exception





Generated with CERN WebMaker
![]()