Mips Instruction Format Cheat Sheet Page 4

ADVERTISEMENT

MIPS Addressing Modes
What are the different ways to access an operand?
• Register addressing
Operand is in register
add $s1, $s2, $s3 means
$s1 ¨ $s2 + $s3
• Base addressing
Operand is in memory.
The address is the sum of a register and a constant.
lw $s1, 32($s3) means
$s1 ¨ M[s3 + 32]
As special cases, you can implement
Direct addressing
$s1 ¨ M[32]
Indirect addressing
$s1 ¨ M[s3]
Which helps implement pointers.

ADVERTISEMENT

00 votes

Related Articles

Related forms

Related Categories

Parent category: Education