Intro & ISA.1 1/14 Instruction Set Architecture (ISA) (Ch: 2.1- 2.7, 2.10 4 th ed) Instructions: Language of the Computer Dr. Khaled El-Ayat.

Slides:



Advertisements
Similar presentations
1 Lecture 3: MIPS Instruction Set Today’s topic:  More MIPS instructions  Procedure call/return Reminder: Assignment 1 is on the class web-page (due.
Advertisements

Goal: Write Programs in Assembly
CEG3420 Lec2.1 ©UCB Fall 1997 ISA Review CEG3420 Computer Design Lecture 2.
ISA Issues; Performance Considerations. Testing / System Verilog: ECE385.
CML CML CS 230: Computer Organization and Assembly Language Aviral Shrivastava Department of Computer Science and Engineering School of Computing and Informatics.
ECE 232 L6.Assemb.1 Adapted from Patterson 97 ©UCBCopyright 1998 Morgan Kaufmann Publishers ECE 232 Hardware Organization and Design Lecture 6 MIPS Assembly.
CMPE 325 Computer Architecture II Cem Ergün Eastern Mediterranean University Assembly Language (cont)
10/9: Lecture Topics Starting a Program Exercise 3.2 from H+P Review of Assembly Language RISC vs. CISC.
CS1104 – Computer Organization PART 2: Computer Architecture Lecture 5 MIPS ISA & Assembly Language Programming.
1  1998 Morgan Kaufmann Publishers and UCB CEG3420 Computer Design Lecture 4 MIPS Instruction Set Philip Leong.
Comp Sci instruction encoding 1 Instruction Encoding MIPS machine language Binary encoding of instructions MIPS instruction = 32 bits Three instruction.
331 Week 3. 1Spring 2005 Review: MIPS Organization Processor Memory 32 bits 2 30 words read/write addr read data write data word address (binary) 0…0000.
EECC550 - Shaaban #1 Lec # 2 Winter Reduced Instruction Set Computer (RISC) Focuses on reducing the number and complexity of instructions.
Reduced Instruction Set Computer (RISC)
331 W02.1Spring 05 Announcements  HW1 is due on this Friday  Appendix A (on CD) is very helpful to HW1.
1 CSE SUNY New Paltz Chapter 3 Machine Language Instructions.
S. Barua – CPSC 440 CHAPTER 2 INSTRUCTIONS: LANGUAGE OF THE COMPUTER Goals – To get familiar with.
RISC Concepts, MIPS ISA and the Mini–MIPS project
Lecture 5 Sept 14 Goals: Chapter 2 continued MIPS assembly language instruction formats translating c into MIPS - examples.
331 W02.1Fall 2003 Announcements  HW1 is due on this Friday (Sept 12 th )  Appendix A is very helpful to HW1. Check out system calls on Page A-48. 
331 Week 3. 1Fall 2003 Head’s Up  This week’s material l MIPS control flow operations (for, while, if-the-else, …) -Reading assignment - PH 3.5  Reminders.
ECE 232 L5 Assembl.1 Adapted from Patterson 97 ©UCBCopyright 1998 Morgan Kaufmann Publishers ECE 232 Hardware Organization and Design Lecture 5 MIPS Assembly.
EECC550 - Shaaban #1 Lec # 2 Winter Reduced Instruction Set Computer (RISC) Focuses on reducing the number and complexity of instructions.
331 Practice Exam.1Fall 2003 Naming Conventions for Registers 0$zero constant 0 (Hdware) 1$atreserved for assembler 2$v0expression evaluation & 3$v1function.
EECC550 - Shaaban #1 Lec # 2 Winter (Chapter 2) Reduced Instruction Set Computer (RISC) Focuses on reducing the number and complexity of.
The MIPS 32 Our objective is to get an appreciation with: working with a “typical” computer machine language. programming in assembly language. debuging.
Lecture 4 section 2.4-?? As opposed to CISC – Complicated Instruction Set Architecture (ala the x86)
Some material taken from Assembly Language for x86 Processors by Kip Irvine © Pearson Education, 2010 Slides revised 2/2/2014 by Patrick Kelley.
IT253: Computer Organization Lecture 5: Assembly Language and an Introduction to MIPS Tonga Institute of Higher Education.
CSE331 W02.1Irwin Fall 2001 PSU Computer Architecture Discussion Lecture # 2 MIPS Programming.
CS35101 Computer Architecture Spring 2006 Week 5 Paul Durand ( Course url:
CPE 442 Lec4.1 Intro Computer Architectures CpE 442 Computer Architecture and Engineering MIPS Instruction Set Architecture.
Lecture 4: MIPS Subroutines and x86 Architecture Professor Mike Schulte Computer Architecture ECE 201.
1 (Based on text: David A. Patterson & John L. Hennessy, Computer Organization and Design: The Hardware/Software Interface, 3 rd Ed., Morgan Kaufmann,
1. 2 Instructions: Words of the language understood by CPU Instruction set: CPU’s vocabulary Instruction Set Architecture (ISA): CPU’s vocabulary together.
EECC250 - Shaaban #1 lec #21 Winter Complex Instruction Set Computer (CISC) Emphasizes doing more with each instruction. Motivated by the high.
1 IKI20210 Pengantar Organisasi Komputer Kuliah Minggu ke-4b: Bahasa Rakitan MIPS I diadaptasikan dari materi kuliah CS61C/2000 & CS152/1997  2000/1997.
1 Computer Architecture COSC 3430 Lecture 3: Instructions.
11/02/2009CA&O Lecture 03 by Engr. Umbreen Sabir Computer Architecture & Organization Instructions: Language of Computer Engr. Umbreen Sabir Computer Engineering.
1  1998 Morgan Kaufmann Publishers Machine Instructions: Language of the Machine Lowest level of programming, control directly the hardware Assembly instructions.
CSIE30300 Computer Architecture Unit 02: MIPS ISA Review Hsin-Chou Chi [Adapted from material by and
6.S078 - Computer Architecture: A Constructive Approach Introduction to SMIPS Li-Shiuan Peh Computer Science & Artificial Intelligence Lab. Massachusetts.
April 23, 2001Systems Architecture I1 Systems Architecture I (CS ) Lecture 9: Assemblers, Linkers, and Loaders * Jeremy R. Johnson Mon. April 23,
Lecture 4: MIPS Instruction Set
Oct. 25, 2000Systems Architecture I1 Systems Architecture I (CS ) Lecture 9: Alternative Instruction Sets * Jeremy R. Johnson Wed. Oct. 25, 2000.
Csci 136 Computer Architecture II – Summary of MIPS ISA Xiuzhen Cheng
Chapter 2 CSF 2009 The MIPS Assembly Language. Stored Program Computers Instructions represented in binary, just like data Instructions and data stored.
Computer Organization and Design Jair Gonzalez Enero 2004 MIPS ISA.
Computer Organization CS224 Fall 2012 Lessons 7 and 8.
MIPS Instructions Instructions: Language of the Machine
Chapter 2 — Instructions: Language of the Computer — 1 Conditional Operations Branch to a labeled instruction if a condition is true – Otherwise, continue.
DR. SIMING LIU SPRING 2016 COMPUTER SCIENCE AND ENGINEERING UNIVERSITY OF NEVADA, RENO Session 7, 8 Instruction Set Architecture.
MIPS Instruction Set Architecture Prof. Sirer CS 316 Cornell University.
Lecture 2: Instruction Set Architecture part 1 (Introduction) Mehran Rezaei.
Instructor: Prof. Hany H Ammar, LCSEE, WVU
Instructions: Language of the Computer
RISC Concepts, MIPS ISA Logic Design Tutorial 8.
ENGR 3410 – Computer Architecture Mark L. Chang Fall 2006
Computer Architecture (CS 207 D) Instruction Set Architecture ISA
Instructions - Type and Format
Appendix A Classifying Instruction Set Architecture
MPIS Instructions Functionalities of instructions Instruction format
The University of Adelaide, School of Computer Science
ECE232: Hardware Organization and Design
Instruction encoding The ISA defines Format = Encoding
UCSD ECE 111 Prof. Farinaz Koushanfar Fall 2018
MIPS Instruction Set Architecture
CS352H Computer Systems Architecture
Reduced Instruction Set Computer (RISC)
Presentation transcript:

Intro & ISA.1 1/14 Instruction Set Architecture (ISA) (Ch: , th ed) Instructions: Language of the Computer Dr. Khaled El-Ayat

Intro & ISA.2 Instructions = Language of the Machine Instruction: words of machine’s language Instruction set: instructions – CPU vocabulary Chapter overview: –difference in design principles of RISC & CISC –other instruction set architectures –MIPS instruction set architecture instruction type instruction format addressing modes No. of registers 1/14

Intro & ISA.3 1/14 RISC vs CISC RISC -- Reduced Instruction Set Computer -- philosophy –fixed instruction length –load/store architecture all operands of ALU instructions must be in registers –limited addressing modes –limited operations Implies –fewer instructions –larger register file –longer program –good for pipelining –simpler control CISC: Complex Instruction Set Computer

Intro & ISA.4 1/14 Characteristics of some CISC & RISC CPUs

Intro & ISA.5 1/14 CISC Ex: 80x86 Registers 031 GPR 0EAX GPR 3EBX GPR 1ECX GPR 2EDX GPR 6ESI Code segment pointer CS Stack segment pointer (top of stack) SS Data segment pointer 0 DS Data segment pointer1 ES Data segment pointer2 FS Data segment pointer3 GS GPR 7EDI GPR 5EBP GPR 4ESP EIPInstruction pointer (PC) EFLAGSCondition codes Name Use

Intro & ISA.6 1/14 CISC Ex: x86 Instructions have Variable lengths! Variability is an issue, but is solved by MicroArchitecture e.g. Pentium II, III, IV JE JE EIP + displacement Offset CALL MOV EBX, [EDI + 45] PUSH PUSH ESI ADD w ADD EAX, #6765 Reg Immediate Condition MOV 1 w 1 d 88 TEST EDX, # TEST Postbyte Immediate w Reg f. e. d. c. b. a. CALL Displacement r-m postbyte Displacement

Intro & ISA.7 1/14 Examples of Instruction Format Widths Variable: Fixed: Hybrid: … … X86, VAX,. MIPS, Sparc, PowerPC IBM 360/370, MIPS16, TMS320C54

Intro & ISA.8 1/14 Instruction Formats If code size is most important, use variable length instructions If performance is most important, use fixed length instructions Recent embedded machines (ARM, MIPS) added optional mode to execute subset of 16-bit wide instructions (Thumb, MIPS16); per procedure decide performance or density Some architectures actually exploring on-the-fly decompression for more density.

Intro & ISA.9 1/14 Instruction Set Architecture: What Must be Specified? Instruction Fetch Instruction Decode Operand Fetch Execute Result Store Next Instruction Instruction Format or Encoding –how is it decoded? Location of operands and result –where other than memory? –how many explicit operands? –how are memory operands located? –which can or cannot be in memory? Data type and Size Operations –what are supported Successor instruction –jumps, conditions, branches –fetch-decode-execute is implicit!

Intro & ISA.10 1/14 Typical Operations Data Movement Load (from memory) Store (to memory) memory-to-memory move register-to-register move input (from I/O device) output (to I/O device) push, pop (to/from stack) Arithmetic integer (binary + decimal) or FP Add, Subtract, Multiply, Divide Logical not, and, or, set, clear Shift shift left/right, rotate left/right Control (Jump/Branch) unconditional, conditional Subroutine Linkage call, return Interrupt trap, return Synchronization test & set (atomic r-m-w) String search, translate Graphics (MMX) parallel subword ops (4 16bit add)

Intro & ISA.11 1/14 Basic ISA Classes Accumulator (1 register): 1 address add A acc  acc + mem[A] 1+x address addx A acc  acc + mem[A + x] Stack: 0 address add tos  tos + next General Purpose Register : 2 address add A B EA[A]  EA[A] + EA[B] 3 address add A B C EA[A]  [B] + EA[C] Load/Store: 3 address add Ra Rb Rc Ra  Rb + Rc load Ra Rb Ra  mem[Rb] store Ra Rb mem[Rb]  Ra Most real machines are hybrids of these:

Intro & ISA.12 1/14 General Purpose Registers Dominate ° all machines use general purpose registers °Advantages of registers registers are faster than memory registers are easier for a compiler to use - e.g., (A*B) – (C*D) – (E*F) can do multiplies in any order vs. stack registers can hold variables -memory traffic is reduced, so program is sped up (since registers are faster than memory) - code density improves (since register named with fewer bits than memory location)

Intro & ISA.13 1/14 MIPS R3000 Instruction Set Architecture: Registers Registers--32 general purpose registers –$zero (0) : 0 3 special purpose registers PC: program counter Hi, Lo for multiply and divide Word length=32 bits In memory: byte addressable

Intro & ISA.14 1/14 MIPS ISA: Instruction Categories Arithmetic & logic (AL) add $s1, $s2, $s3# $s1  $s2 + $s3 sub $s1, $s2, $s3# $s1  $s2 - $s3 –each AL inst. has exactly 3 operands all in registers Load/store -- data transfer instruction lw $s1, x($s2)# $s1 = memory [$s2+x] sw $s1, x($s2)# memory[$s2+x]=$s1 Jump & branch beq $s2, $s3, L1#branch to (PC)+L1 when ($s2) = ($s3) bne $s2, $s3, L1#branch to (PC)+L1 when ($s2) ($s3) slt $s2, $s3, $s4#set on less than, $s2=1 if ($s3) < ($s4) j L1# goto L1 floating point, memory management, etc.(will not be covered)

Intro & ISA.15 1/14 MIPS Instruction Formats Instruction format: layout of the instruction 3 types of formats: R-type (regular) I-type (Immediate) J-type (Jump) R-type: 6 fields –op: operation code (6 bits) –rs: 1st register source operand (5) –rt: 2nd register source operand (5) –rd: register destination (5) –sa: shift amount (5) –function: select the variant of operation in op field (6) OP rs rt rd sa funct OP rs rt immediate OP Target

Intro & ISA.16 1/14 Instruction Format::R-Type Example: add $8, $17, $18 OP=00, FUNC=40 Other R-type instructions sub $1, $2, $3 slt $1, $2, $3 jr $ra(31)#jump register, for returning to the calling procedure OP rs rt rd sa funct

Intro & ISA.17 1/14 Instruction Format/I-type 4 fields, 32 bits Immediate (address ) field: 16 bits, holds a constant Example: load word -- lw $s1, 50($s2) lw $s1, 48($s2)# $s1 = memory [$s2+48] Other I-type inst. add immediate -- addi $8, $9, 100 branch on equal -- beq $1, $2, 25: goto (PC+4)+100 if $1=$2

Intro & ISA.18 1/14 Instruction Format/J-Type 2 fields: 32 bits op: 6 bits address field: 26 bits Example: j 200# go to location f(4*200) Other J type inst.: jal 200 # jump & link, goto location f(4*200) $31(ra)= PC + 4

Intro & ISA.19 1/14 j label#go to label Jump Instruction Basics Instruction Format (J Format): op 26-bit address PC

Intro & ISA.20 1/14 MIPS Addressing Modes Register addressing –operand is in a register e.g. add $8, $19, $18 Base or displacement addressing –operand: at memory location reg. + constant (base) e.g. lw $8, 200($19) Immediate addressing –operand: constant, in inst. e.g. addi $8, $8, 4 PC-relative addressing –address = (PC) + constant in inst. e.g., bne $8, $21, Exit Pseudodirect addressing: jump address = PC(31-28) (concatenated with) jump constant*4

Intro & ISA.21 1/14 MIPS Addressing Mode Summary

Intro & ISA.22 1/14 MIPS Organization So Far Processor Memory 32 bits 2 30 words read/write addr read data write data word address (binary) 0…0000 0…0100 0…1000 0…1100 1…1100 Register File src1 addr src2 addr dst addr write data 32 bits src1 data src2 data 32 registers ($zero - $ra) PC ALU byte address (big Endian) Fetch PC = PC+4 DecodeExec Add 32 4 Add 32 branch offset

Intro & ISA.23 1/14 bne $s0, $s1, Lbl#go to Lbl if $s0  $s1 beq $s0, $s1, Lbl#go to Lbl if $s0=$s1 –Ex: if (i==j) h = i + j; bne $s0, $s1, Lbl1 add $s3, $s0, $s1 Lbl1:... MIPS Conditional Branch Instructions Instruction Format (I format): op rs rt 16 bit offset Target Address = PC +4 + (offset * 4)

Intro & ISA.24 1/14 Fr other type of branch conditions Use slt Set on less than instruction: slt $t0, $s0, $s1 # if $s0 < $s1 then # $t0 = 1else # $t0 = 0 Instruction format (R format): 2 More Branch Instructions op rs rt rd funct

Intro & ISA.25 1/14 More Branch Instructions, Con’t Can use slt, beq, bne, and the value 0 in register $zero to create other conditions –less than blt $s1, $s2, Label –less than or equal to ble $s1, $s2, Label –greater than bgt $s1, $s2, Label –great than or equal to bge $s1, $s2, Label slt $at, $s1, $s2#$at set to 1 if bne $at, $zero, Label# $s1 < $s2 Such branches are included in the instruction set as pseudo instructions - recognized (and expanded) by the assembler

Intro & ISA.26 1/14 addi$sp, $sp, 4#$sp = $sp + 4 slti $t0, $s2, 15#$t0 = 1 if $s2<15 Machine format (I format): MIPS Immediate Instructions op rs rt 16 bit immediate I format Small constants are used often in typical code Constant kept inside the instruction –Immediate format limits values to the range –1 to -2 15

Intro & ISA.27 1/14 To load a 32 bit constant into a register, we use two instructions a new "load upper immediate" instruction lui $t0, Then must get the lower order bits right, use ori $t0, $t0, How About Larger Constants?

Intro & ISA.28 1/14 MIPS ISA So Far CategoryInstrOp CodeExampleMeaning Arithmetic (R & I format) add0 and 32add $s1, $s2, $s3$s1 = $s2 + $s3 subtract0 and 34sub $s1, $s2, $s3$s1 = $s2 - $s3 add immediate8addi $s1, $s2, 6$s1 = $s2 + 6 or immediate13ori $s1, $s2, 6$s1 = $s2 v 6 Data Transfer (I format) load word35lw $s1, 24($s2)$s1 = Memory($s2+24) store word43sw $s1, 24($s2)Memory($s2+24) = $s1 load byte32lb $s1, 25($s2)$s1 = Memory($s2+25) store byte40sb $s1, 25($s2)Memory($s2+25) = $s1 load upper imm15lui $s1, 6$s1 = 6 * 2 16 Cond. Branch (I & R format) br on equal4beq $s1, $s2, Lif ($s1==$s2) go to L br on not equal5bne $s1, $s2, Lif ($s1 !=$s2) go to L set on less than0 and 42slt $s1, $s2, $s3if ($s2<$s3) $s1=1 else $s1=0 set on less than immediate 10slti $s1, $s2, 6if ($s2<6) $s1=1 else $s1=0 Uncond. Jump (J & R format) jump2j 2500go to jump register0 and 8jr $t1go to $t1 jump and link3jal 2500go to 10000; $ra=PC+4

Intro & ISA.29 1/14 MIPS arithmetic instructions InstructionExampleMeaningComments add add $1,$2,$3$1 = $2 + $33 operands; exception possible subtractsub $1,$2,$3$1 = $2 – $33 operands; exception possible add immediateaddi $1,$2,100$1 = $ constant; exception possible add unsignedaddu $1,$2,$3$1 = $2 + $33 operands; no exceptions subtract unsignedsubu $1,$2,$3$1 = $2 – $33 operands; no exceptions add imm. unsign.addiu $1,$2,100$1 = $ constant; no exceptions multiply mult $2,$3Hi, Lo = $2 x $364-bit signed product multiply unsignedmultu$2,$3Hi, Lo = $2 x $364-bit unsigned product divide div $2,$3Lo = $2 ÷ $3,Lo = quotient, Hi = remainder Hi = $2 mod $3 divide unsigned divu $2,$3Lo = $2 ÷ $3,Unsigned quotient & remainder Hi = $2 mod $3 Move from Himfhi $1$1 = HiUsed to get copy of Hi Move from Lomflo $1$1 = LoUsed to get copy of Lo

Intro & ISA.30 1/14 MIPS logical instructions InstructionExampleMeaningComment and and $1,$2,$3$1 = $2 & $33 reg. operands; Logical AND oror $1,$2,$3$1 = $2 | $33 reg. operands; Logical OR xorxor $1,$2,$3$1 = $2  $33 reg. operands; Logical XOR nornor $1,$2,$3$1 = ~($2 |$3)3 reg. operands; Logical NOR and immediateandi $1,$2,10$1 = $2 & 10Logical AND reg, constant or immediateori $1,$2,10$1 = $2 | 10Logical OR reg, constant xor immediate xori $1, $2,10 $1 = ~$2 &~10Logical XOR reg, constant shift left logicalsll $1,$2,10$1 = $2 << 10Shift left by constant shift right logicalsrl $1,$2,10$1 = $2 >> 10Shift right by constant shift right arithm.sra $1,$2,10$1 = $2 >> 10Shift right (sign extend) shift left logicalsllv $1,$2,$3$1 = $2 << $3 Shift left by variable shift right logicalsrlv $1,$2, $3 $1 = $2 >> $3 Shift right by variable shift right arithm.srav $1,$2, $3 $1 = $2 >> $3 Shift right arith. by variable

Intro & ISA.31 1/14 MIPS data transfer instructions InstructionComment SW 500(S4), S3Store word SH 502(S2), S3Store half SB 41(S3), S2Store byte LW S1, 30(S2)Load word LH S1, 40(S3)Load halfword LHU S1, 40(S3)Load halfword unsigned (no sign extension) LB S1, 40(S3)Load byte LBU S1, 40(S3)Load byte unsigned (no sign extension) LUI S5, 40Load Upper Immediate (16 bits shifted left by 16) Why need LUI? 0000 … 0000 LUI S5 S5

Intro & ISA.32 1/14 How shift instructions are implemented Two kinds: logical-- value shifted in is always "0" arithmetic-- on right shifts, sign extend No arithmetic Left Shift – Overflow result msblsb"0" msblsb Note: these are single bit shifts. A given instruction might request 0 to 32 bits to be shifted!

Intro & ISA.33 1/14 When does MIPS sign extend? When value is sign extended, copy upper bit to full value: Examples of sign extending 8 bits to 16 bits:   When is an immediate operand sign extended? –Arithmetic instructions (add, sub, etc.) always sign extend immediates –Logical instructions do not sign extend immediates (They are zero extended) –Load/Store address computations always sign extend immediates Multiply/Divide have no immediate operands however: –“unsigned”  treat operands as unsigned The data loaded by the instructions lb and lh are extended as follows (“unsigned”  don’t extend ) : –lbu, lhu are zero extended –lb, lh are sign extended

Intro & ISA.34 1/14 MIPS Compare and Branch Summary Compare and Branch –BEQ rs, rt, offset if R[rs] == R[rt] then PC-relative branch –BNE rs, rt, offset <> Compare to zero and Branch –BLEZ rs, offset if R[rs] <= 0 then PC-relative branch –BGTZ rs, offset > –BLT < –BGEZ >= –BLTZAL rs, offset if R[rs] < 0 then branch and link (into R 31) –BGEZAL >=! Almost all comparisons are against zero!

Intro & ISA.35 1/14 MIPS jump, branch, compare instructions InstructionExampleMeaning branch on equalbeq $1,$2,25if ($1 == $2) go to PC Equal test; PC relative branch. Note: Offset field = 25 branch on not eq.bne $1,$2,25if ($1!= $2) go to PC Not equal test; PC relative Note: Offset field = 25 set on less thanslt $1,$2,$3if ($2 < $3) $1=1; else $1=0 Compare less than; 2’s comp. set less than imm.slti $1,$2,100if ($2 < 100) $1=1; else $1=0 Compare < constant; 2’s comp. set less than uns.sltu $1,$2,$3if ($2 < $3) $1=1; else $1=0 Compare less than; natural numbers set l. t. imm. uns.sltiu $1,$2,100if ($2 < 100) $1=1; else $1=0 Compare < constant; natural numbers jumpj 2500go to Jump to target address Note: jump field = 2500 jump registerjr $31go to $31 For switch, procedure return jump and linkjal 2500$31 = PC + 4; go to For procedure call. Note: jump field = 2500

Intro & ISA.36 1/14 Subroutine Calls & Stacks Stacking of Subroutine Calls & Returns and Environments: A: CALL B CALL C C: RET B: A AB ABC AB A Some machines provide a memory stack as part of the architecture (e.g., VAX) Sometimes stacks are implemented via software convention (e.g., MIPS) Some machines provide stack support in hardware (Embedded processor)

Intro & ISA.37 1/14 0zero constant 0 1atreserved for assembler 2v0expression evaluation & 3v1function results 4a0arguments 5a1 6a2 7a3 8t0temporary: caller saves...(callee can clobber) 15t7 MIPS: Software conventions for Registers 16s0callee saves... (callee must save) 23s7 24t8 temporary (cont’d) 25t9 26k0reserved for OS kernel 27k1 28gpPointer to global area 29spStack pointer 30fpframe pointer 31raReturn Address (HW)

Intro & ISA.38 1/14 Summary of MIPS I ISA 32-bit fixed format inst (3 instruction formats / types) bit GPR (R0 contains zero) and 32 FP registers (and HI LO) – partitioned by software convention 3-address, reg-reg arithmetic instr. Single address mode for load/store: base+displacement 16-bit immediate plus LUI Simple branch conditions – compare against zero or two registers for =,  – no integer condition codes