Professional Documents
Culture Documents
MIPS Addressing
MIPS Addressing
MIPS Addressing
PREPARED BY
G.JEEVANANTHAM,
AP/CSE,
NIET.
MIPS Addressing for 32-bit Immediates and Addresses
Although keeping all MIPS instructions 32 bits long simplifies the hardware, there are
times where it would be convenient to have a 32-bit constant or 32-bit address.
32-Bit Immediate Operands
Example
Answer
2
MIPS Addressing for 32-bit Immediates and Addresses
CE
Note: The instruction lui transfers the 16-bit immediate constant field value into the
leftmost 16 bits of the register, filling the lower 16 bits with 0s.
3
MIPS Addressing for 32-bit Immediates and Addresses
1. Immediate addressing, where the operand is a constant within the instruction itself
4
MIPS Addressing for 32-bit Immediates and Addresses
3. Base or displacement addressing, where the operand is at the memory location whose
address is the sum of a register and a constant in the instruction
4. PC-relative addressing, where the branch address is the sum of the PC and a constant in the
instruction
5. Pseudo direct addressing, where the jump address is the 26 bits of the instruction
concatenated with the upper bits of the PC
5
MIPS Addressing for 32-bit Immediates and Addresses
Example
6
Instructions: Language of the Computer
1. Introduction
2. Operations of the Computer Hardware
3. Operands of the Computer Hardware
4. Signed and Unsigned number
5. Representing Instructions in the Computer
6. Logical Operations
7. Instructions for Making Decisions
8. Supporting Procedures in Computer Hardware
9. Communicating with People
10. MIPS Addressing for 32-Bit Immediates and Addresses
11. Translating and Starting a Program
7
Translating and Starting a
Program
This section describes the four steps in transforming a C program in a file on
disk into a program running on a computer.