MIPS ASSEMBLY LANGUAGE

MIPS ASSEMBLY LANGUAGE - Srl $1,$2,5 $1 = $2>> 5 Load...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
MIPS ASSEMBLY LANGUAGE Instruction Example Meaning Add Add $1,$2,$3 $1 = $2 + $3 Subtract Sub $1,$2,$3 $1 = $2 - $3 Add immediate Addi $1,$2,100 $1 = $2 + 100 Add unsigned Addu $1,$2,$3 $1 = $2 + $3 Subtract unsigned Subu $1,$2,$3 $1 = $2 - $3 Add immediate unsigned Addiu $1,$2,100 $1 = $2 + 100 Move from coproc. Register mfc0 $1,$epc $1 = $epc Multiply mult $2,$3 Hi, lo = $2 * $3 Multiply unsigned Multu $2,$3 Hi, lo = $2 * $3 Divide Div $2,$3 Lo = $2 / $3; hi $2 mod $3 Divide unsigned Divu $2,$3 Lo = $2 / $3; hi $2 mod $3 Move from Hi Mfhi $1 $1 = Hi Move from Lo Mflo $1 $1 = Lo And And $1,$2,$3 Or Or $1,$2,$3 $1 = $2 | $3 And immediate Andi $1,$2,100 Or immediate Ori $1,$2,100 $1 = $2 | 100 Shift left logical Sll $1,$2,5 $1 = $2 << 5 Shift right logical
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Srl $1,$2,5 $1 = $2 >> 5 Load word Lw $1,100($2) $1 = memory [$2 + 100] Store word Sw $1, 100($2) memory [$2 + 100] = $1 Load upper immediate Lui $1,100 $1 = 100 x 2 16 Branch if equal Beq $1,$2,100 if ($1 = $2), PC = PC + 4 + 100 Branch if not equal Bne $1,$2,100 if ($1 ≠ $2), PC = PC + 4 + 100 Set if less than Slt $1,$2,$3 if ($2 < $3), $1 = 1 else $1 = 0 Set if less than immediate Slti $1,$2,100 if ($2 < 100), $1= 1 else $1 = 0 Set if less than unsigned Sltu $1,$2,$3 if ($2 < $3), $1 = 1 else $1 = 0 Set if less than imm.uns. Sltiu $1,$2,100 if ($2 < 100), $1 = 1 else $1 = 0 Jump J 10000 PC = 10000 Jump register Jr $31 PC = $31 Jump and link Jal 10000 $31 = PC + 4; PC = 10000...
View Full Document

This note was uploaded on 10/26/2011 for the course ECE 2030 taught by Professor Wolf during the Spring '07 term at Georgia Tech.

Ask a homework question - tutors are online