Lecture 11 - Th The University of Texas at Dallas Erik...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
Erik Jonsson School of Engineering and h U i it f T t D ll Computer Science The University of Texas at Dallas Types of MIPS Instructions The MIPS instruction set is small, and SPIM adds only a few pseudo-instructions. In addition to instructions, there are other functions to learn, such as directives and labels. MIPS instructions are divided into several groups . The fundamental instruction types, with examples, are: egister- - gister instructions: Includes mathematical, Register to register instructions: Includes mathematical, logical, and manipulative instructions, such as add , subtract , multiply , divide , logical instructions such as AND , OR , and manipulations such as neg , move , rem , shift and rotate . We © N. B. Dodge 09/09 Lecture #11 – Registers, System Calls, and More Instructions 1 covered most of these last lecture.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Erik Jonsson School of Engineering and h U i it f T t D ll Computer Science The University of Texas at Dallas Types of MIPS Instructions (2) Instructions (continued): Special instructions: Nop (no operation), syscall (input/output). Decision-making instructions (program control): Branch ( beq , beqz , bge , ble , etc.), jump ( j , jal , jr ), comparison ( seq , sge , sgt ). Memory reference instructions (mainly load and store, since data in memory may only be accessed by loading and storing to/from a register – lw , lb , sw , sb ). Note: Load address (“ la ”) is covered with memory reference instructions, although it references a memory address only. Today we look at registers, instruction formats, some special instructions, system calls, directives, labels, © N. B. Dodge 09/09 Lecture #11 – Registers, System Calls, and More Instructions 2 comments, some examples, and a couple of exercises.
Background image of page 2
Erik Jonsson School of Engineering and h U i it f T t D ll Computer Science The University of Texas at Dallas Registers We remember that registers are collections of D flip-flops. Registers therefore can hold N-bit binary numbers, where N is the umber of ff’s in each register number of ff s in each register . The number of register bits (width) depends on the computer. The MIPS R-2000 computer has 32-bit data words, so that each register has 32 flip-flops. The MIPS computer has 32 fixed-point data registers. There are rules (actually suggestions or policies ) for register use. The rules may be violated; the assembler has no “Register Police.” However the violator does so at his/her own risk – usage violations can result in incompatible programs, which is very bad practice . © N. B. Dodge 09/09 Lecture #11 – Registers, System Calls, and More Instructions 3 In EE 2310, you must use registers as recommended in the rules .
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Erik Jonsson School of Engineering and h U i it f T t D ll Computer Science The University of Texas at Dallas MIPS Special-Purpose Registers These registers are generally used only for the purposes noted below: Register Name or Value Purpose PC Program Counter Address of next instruction 1 $0 Value always 0 Comparisons; clearing registers $1 $at Assembler temporary register 2 $2 $v0
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/16/2009 for the course EE 2310 taught by Professor Dodge during the Spring '09 term at University of Texas at Dallas, Richardson.

Page1 / 42

Lecture 11 - Th The University of Texas at Dallas Erik...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online