Instructions from Text and Notes for Instructions from Text and Notes for Exam 1
Instruction ExampleFunction
addadd $2,$3,$4 $2 = $3 + $4
addiaddi $2,$3,10 $2 = $3 + 10 (signed constant)
addiuaddiu $2,$3,10 $2 = $3 + 10 (overflow undetected and signed constant)
subsub $2,$3,$4 $2 = $3 - $4
subusubu $2,$3,$4 $2 = $3 - $4 (overflow undetected)
lwlw $2,8 ($3)load word at address $3 + 8 into $2
lblb $2,8 ($3)load byte at address $3 + 8 into $2
luilui $3, 2 load 2 into upper 16 bits of $3
swsw $2,8 ($3)store word in $2 to word at address $3 + 8
sbsb $2,8 ($3)store byte in $2 to byte at address $3 + 8
sllsll $2,$3, 10$2 = $3 << 10
sllvsllv $2,$3, $10$2 = $3 << $10
srlsrl $2,$3, 10$2 = $3 >> 10
srlvsrlv $2,$3, $10$2 = $3 >> $10
andand $2,$3,$4 $2 = $3 & $4
andiandi $2,$3,15 $2 = $3 & 15 (zero extended constant)
oror $2,$3,$4 $2 = $3 | $4
oriori $2,$3,15 $2 = $3 | 15 (zero extended constant)
sltslt $2,$3,$4if($3 < $4) $2 = 1 else $2 = 0
sltislti $2,$3,5if($3 < 5) $2 = 1 else $2 = 0 (signed constant)
sltiusltiu $2,$3,5if($3 < 5) $2 = 1 else $2 = 0 (unsigned constant)
beqbeq $3,$4, Labelif($3 = $4) go to Label
bnebne $3,$4, Labelif($3 != $4) go to Label
jj Labelgo to Label
jrjr $31go to instruction at address in $31 (return from function)
jaljal Labelsave address of next instruction and go to Label



File translated from TEX by TTH, version 3.00.
On 25 Jan 2002, 12:26.