MIPS R4000 Microprocessor User's Manual A-7
CPU Instruction Set Details
A.4 Load and Store Instructions
In the R4000 implementation, the instruction immediately following a
load may use the loaded contents of the register. In such cases, the
hardware interlocks, requiring additional real cycles, so scheduling load
delay slots is still desirable, although not required for functional code.
Two special instructions are provided in the R4000 implementation of the
MIPS ISA, Load Linked and Store Conditional. These instructions are
used in carefully coded sequences to provide one of several
synchronization primitives, including test-and-set, bit-level locks,
semaphores, and sequencers/event counts.
In the load and store descriptions, the functions listed in Table A-2 are
used to summarize the handling of virtual addresses and physical
memory.
Table A-2 Load and Store Common Functions
Function Meaning
AddressTranslation
Uses the TLB to find the physical address given the virtual
address. The function fails and an exception is taken if the
required translation is not present in the TLB.
LoadMemory
Uses the cache and main memory to find the contents of
the word containing the specified physical address. The
low-order two bits of the address and the Access Type field
indicates which of each of the four bytes within the data
word need to be returned. If the cache is enabled for this
access, the entire word is returned and loaded into the
cache.
StoreMemory
Uses the cache, write buffer, and main memory to store the
word or part of word specified as data in the word
containing the specified physical address. The low-order
two bits of the address and the Access Type field indicates
which of each of the four bytes within the data word
should be stored.