Load/Store Instructions
The SPARC is a register architecture: Load and Store instructions transfer data between memory and registers. All operations are performed on registers. Operation instructions may specify up to three registers: two sources and a destination.
Stack Load/Store Instructions:
These instructions access local variables of a procedure on the
runtime stack (relative to frame pointer
FP).
ld [%fp-48],%l2 ! load into %l2
st %l2,[%fp-48] ! store %l2
where ld or st is the operation, %l2 is the
register, %fp is the frame pointer, and -48 is the
total offset (negative offset in the symbol table, minus
the size of the variable). The magnitude of the total offset must
be 4095 or less.
Floating variables may use ldd or std for double loads and stores; however, the address must be 8-aligned or a bus error will occur. Two single loads or stores may also be used for floats.
Contents    Page-10    Prev    Next    Page+10    Index