You are on page 1of 2

COMPUTER ORGANIZATION

MIPS Instruction Set


Integer Arithmetic and Logic instructions:
addiu rt, rs, imm16
addu rd, rs, rt
and rd, rs, rt
andi rt, rs, imm16
div rs, rt
divu rs, rt
mult rs, rt
multu rs, rt
nor rd, rs, rt
or rd, rs, rt
ori rt, rs, imm16
sll rd, rt, imm5
sllv rd, rt, rs
sra rd, rt, imm5
srav rd, rt, rs
srl rd, rt, imm5
srlv rd, rt, rs
subu rd, rs, rt
xor rd, rs, rt
xori rt, rs, imm16

Comparative Instructions (signed and unsigned):


slt rd, rs, rt
sltu rd, rs, rt
slti rt, rs, imm16
sltiu rt, rs, imm16
Memory Access:
lb rt, off16(rs)
lbu rt, off16(rs)
lh rt, off16(rs)
lhu rt, off16(rs)
lw rt, off16(rs)
sb rt, off16(rs)
sh rt, off16(rs)
sw rt, off16(rs)

Shift of data:
lui rt, imm16
mfhi rd
mflo rd
Branch and Jump:
beq rs, rt, etiq
bne rs, rt, etiq
j etiq
jal etiq
jr rs
Calls to the system:
syscall
Macros or pseudoinstructions:
b etiq
bge r1, r2, etiq
bgeu r1, r2, etiq
bgt r1, r2, etiq
bgtu r1, r2, etiq
ble r1, r2, etiq
bleu r1, r2, etiq
blt r1, r2, etiq
bltu r1, r2, etiq
la rdest, adr
li rdest, imm
move rdest, rfuente
Note:
rt, rs, rd: Indicates a general register.
rdest: indicates a destiny register to store the result.
rfuente: indicates a source register and its value can not be modified.
imm16: Indicates an integer constant of 16 bits in complement to 2.
imm5: Indicates a natural constant of 5 bits.
off16: Indicates an integer constant of 16 bits in complement of 2.
etiq: Indicates a tag of the programme.