
4-12
32-Bit Instructions
Table 4.9
32-Bit Load and Store Instruction Descriptions
Instruction
Format and Description
Load Byte
LB rt, offset(base)
Sign-extends the 16-bit
offset
and adds this value to the contents of register
base
to
create an address. Sign-extends the contents of the addressed byte and loads this
value into register
rt
.
Load Byte
Unsigned
LBU rt, offset(base)
Sign-extends the 16-bit
offset
and adds this value to the contents of register
base
to
create an address. Zero-extends the contents of the addressed byte and loads this
value into register
rt
.
Load
Halfword
LH rt, offset(base)
Sign-extends the 16-bit
offset
and adds this value to the contents of register
base
to
create an address. Sign-extends the contents of the addressed halfword and loads this
value into register
rt
.
Load
Halfword
Unsigned
LHU rt, offset(base)
Sign-extends the 16-bit
offset
and adds this value to the contents of register
base
to
create an address. Zero-extends the contents of the addressed halfword and loads this
value into register
rt
.
Load Word
LW rt, offset(base)
Sign-extends the 16-bit
offset
and adds this value to the contents of register
base
to
create an address. Loads the addressed word into register
rt
.
Load Word
Left
LWL rt, offset(base)
Sign-extends the 16-bit
offset
and adds this value to the contents of register
base
to
create a byte address. Loads the addressed word, shifts this word left so that the
addressed byte is the leftmost byte of the word. Merges the bytes from this word with
the contents of register
rt
and loads the result into register
rt
.
Load Word
Right
LWR rt, offset(base)
Sign-extends the 16-bit
offset
and adds this value to the contents of register
base
to
create a byte address. Shifts the addressed word right so that the addressed byte is
the rightmost byte of a word. Merges the bytes from memory with the contents of
register
rt
and loads the result into register
rt
.
Store Byte
SB rt, offset(base)
Sign-extends the 16-bit
offset
and adds this value to the contents of register
base
to
create an address. Stores the least-significant byte of register
rt
into the addressed
location.
Store
Halfword
SH rt, offset(base)
Sign-extends the 16-bit
offset
and adds this value to the contents of register
base
to
create an address. Stores the least-significant halfword of register
rt
into the addressed
location.
(Sheet 1 of 2)