In all instructions below, Src2 can either be a register or an immediate value (integer). The immediate forms of the instructions are only included for reference. The assembler will translate the more general form of an instruction (e.g., add) into the immediate form (e.g., addi) if the second argument is constant.
abs Rdest, RsourceValue
Put the absolute value of the integer from register Rsource in
register Rdest.
add Rdest, Rsrc1, Src2(with overflow)
addi Rdest, Rsrc1, ImmImmediate (with overflow)
addu Rdest, Rsrc1, Src2(without overflow)
addiu Rdest, Rsrc1, ImmImmediate (without overflow)
Put the sum of the integers from register Rsrc1 and
Src2 (or Imm) into register Rdest.
and Rdest, Rsrc1, Src2
andi Rdest, Rsrc1, ImmImmediate
Put the logical AND of the integers from register Rsrc1 and
Src2 (or Imm) into register Rdest.
div Rsrc1, RSrc2(with overflow)
divu Rsrc1, RSrc2(without overflow)
Divide the contents of the two registers. Leave the quotient in
register LO and the remainder in register HI. Note that
if an operand is negative, the remainder is unspecified by the MIPS
architecture and depends on the conventions of the machine on which
SPIM is run.
div Rdest, Rsrc1, Src2(with overflow)
divu Rdest, Rsrc1, Src2(without overflow)
Put the quotient of the integers from register Rsrc1 and
Src2 into register Rdest.
mul Rdest, Rsrc1, Src2(without overflow)
mulo Rdest, Rsrc1, Src2(with overflow)
mulou Rdest, Rsrc1, Src2Multiply (with overflow)
Put the product of the integers from register Rsrc1 and
Src2 into register Rdest.
mult Rsrc1, RSrc2
multu Rsrc1, RSrc2Multiply
Multiply the contents of the two registers. Leave the low-order word
of the product in register LO and the high-word in register
HI.
neg Rdest, RsourceValue (with overflow)
negu Rdest, RsourceValue (without overflow)
Put the negative of the integer from register Rsource into
register Rdest.
nor Rdest, Rsrc1, Src2
Put the logical NOR of the integers from register Rsrc1 and
Src2 into register Rdest.
not Rdest, Rsource
Put the logical negation of the integer from register Rsource into
register Rdest.
or Rdest, Rsrc1, Src2
ori Rdest, Rsrc1, ImmImmediate
Put the logical OR of the integers from register Rsrc1 and
Src2 (or Imm) into register Rdest.
rem Rdest, Rsrc1, Src2
remu Rdest, Rsrc1, Src2Remainder
Put the remainder from dividing the integer in register Rsrc1 by
the integer in Src2 into register Rdest. Note that if an
operand is negative, the remainder is unspecified by the MIPS
architecture and depends on the conventions of the machine on which
SPIM is run.
rol Rdest, Rsrc1, Src2Left
ror Rdest, Rsrc1, Src2Right
Rotate the contents of register Rsrc1 left (right) by the
distance indicated by Src2 and put the result in register
Rdest.
sll Rdest, Rsrc1, Src2Left Logical
sllv Rdest, Rsrc1, Rsrc2Left Logical Variable
sra Rdest, Rsrc1, Src2Right Arithmetic
srav Rdest, Rsrc1, Rsrc2Right Arithmetic Variable
srl Rdest, Rsrc1, Src2Right Logical
srlv Rdest, Rsrc1, Rsrc2Right Logical Variable
Shift the contents of register Rsrc1 left (right) by the
distance indicated by Src2 (Rsrc2) and put the
result in register Rdest.
sub Rdest, Rsrc1, Src2(with overflow)
subu Rdest, Rsrc1, Src2(without overflow)
Put the difference of the integers from register Rsrc1 and
Src2 into register Rdest.
xor Rdest, Rsrc1, Src2
xori Rdest, Rsrc1, ImmImmediate
Put the logical XOR of the integers from register Rsrc1 and
Src2 (or Imm) into register Rdest.