
5-14
16-Bit Instructions
Table 5.14
16-Bit Immediate Arithmetic Instruction Descriptions
Instruction
Format and Description
Load Immediate
LI rx, immediate
Zero-extends the 8-bit
immediate
and loads this value into register
rx
.
Add Immediate
Unsigned
ADDIU ry, rx, immediate
Adds the 4-bit, sign-extended
immediate
to the contents of register
rx
and
stores the 32-bit result into register
ry
. Does not trap on overflow.
ADDIU rx, immediate
Adds the 8-bit, sign-extended
immediate
to the contents of register
rx
and
stores the 32-bit result into register
rx
. Does not trap on overflow.
ADDIU sp, immediate
Shifts the 8-bit
immediate
left three bits, sign-extends and adds this value to
the contents of register
sp,
and then stores the 32-bit result into register
sp
.
Does not trap on overflow.
ADDIU rx, pc, immediate
Clears the two lower bits of the BasePC Value
1
associated with the instruction
to form the masked BasePC Value. Shifts the 8-bit
immediate
left two bits,
zero-extends and adds this value to the masked BasePC Value and stores the
resulting address into register
rx
. Does not trap on overflow.
ADDIU rx, sp, immediate
Shifts the 8-bit
immediate
left two bits, zero-extends and adds this value to the
contents of register
sp,
then stores the 32-bit result into register
rx
. Does not
trap on overflow.
Set on Less Than
Immediate
SLTI rx, immediate
Compares the 8-bit, zero-extended
immediate
with the contents of register
rx
as signed 32-bit integers. If the contents of register
rx
are less than the zero-
extended
immediate
, stores a one into register
T
(
$24
); otherwise, it stores a
zero into register
T
(
$24
).
Set on Less Than
Immediate Unsigned
SLTIU rx, immediate
Compares the 8-bit, zero-extended
immediate
with the contents of register
rx
as unsigned 32-bit integers. If the contents of register
rx
are less than the
zero-extended
immediate
, stores a one into register
T
(
$24
); otherwise, it
stores a zero into register
T
(
$24
).
Compare Immediate
CMPI rx, immediate
Zero-extends the 8-bit
immediate
, and bit wise exclusive ORs this value with
the contents of register
rx
. Stores the result into register
T
(
$24
).
1. See Table 5.12 for the definition of the BasePC Value.