MIPS Addressing

You might also like

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 9

NEHRU INSTITUTE OF ENGINEERING AND TECHNOLOGY

“Nehru Gardens” T. M. PALAYAM, COIMBATORE-105


(Approved by AICTE and Affiliated to Anna University, Chennai)
(Accredited by NAAC, Recognized by UGC with 2(f) and 12(B))
NBA Accredited UG Courses: AERO, CSE, MECH
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

CS8491 – COMPUTER ARCHITECTURE

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

Example: The effect of the lui instruction

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

MIPS Addressing Mode Summary


Multiple forms of addressing are generically called addressing modes. Addressing mode is one of
several addressing regimes delimited by their varied use of operands and/or addresses.

1. Immediate addressing, where the operand is a constant within the instruction itself

2. Register addressing, where the operand is a register

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

Decoding Machine Language


Sometimes you are forced to reverse-engineer machine language to create the original assembly
language. One example is when looking at “core dump.”

Example

Answer: (look the MIPS instruction encoding and format table)

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.

Fig.12 A translation hierarchy for C 62


THANK YOU

You might also like