MIPS Instructions: 64-bit Core Subset
|
|
- Horace Sullivan
- 6 years ago
- Views:
Transcription
1 MIPS Instructions: 64-bit Core Subset Spring 2008 General notes: a. R s, R t, and R d specify 64-bit general purpose registers b. F s, F t, and F d specify 64-bit floating point registers c. C d specifies 32-bit coprocessor 0 registers d. PC (Program Counter specifies the instruction address register and contains address of instruction in execution e. Square brackets ([] indicate the contents of f. I specifies part of instruction and its subscripts indicate bit positions of sub-fields g. indicates concatenation of bit fields h. << indicates shift left i. >> indicates shift (arithmetic or logicalright j. Superscripts indicate repetition of a binary value k. M{i} is contents of the doubleword (64 bits at the memory address i l. m{i} is contents of the byte (8 bits at the memory address i m. mm{i} is contents of the word (32 bits at the memory address i n. all integers are in 2 s complement representation if not indicated as unsigned 1. Doubleword Add: DADD [R s ] + [R t (If overflow then exception Assembly format: DADD R d 2. Doubleword Add Unsigned: DADDU As DADD instruction, except Funct=45 dec and overflow ignored Note: the term unsigned in the instruction name is a misnomer. 3. Doubleword Subtract: DSUB [R s ] - [R t (Overflow exception possible Assembly format: DSUB R d 4. Doubleword Subtract Unsigned: DSUBU As DSUB instruction, except Funct=47 dec and overflow ignored Note: the term unsigned in the instruction name is a misnomer. 1
2 5. Doubleword Multiply: DMULT Effects: Hi Lo [R s ] * [R t Assembly format: DMULT R s 6. Doubleword Multiply Unsigned: DMULTU As DMULT instruction, except: - Funct = 29 dec - contents of R s and R t are considered as unsigned integers 7. Doubleword Divide: DDIV Effects: Lo [R s ] / [R t ]; Hi [R s ]mod[r t (Note: No exception on zero divide, and results is unpredicable Assembly format: DDIV R s 8. Doubleword Divide Unsigned: DDIVU As DDIV instruction, except: - Funct = 31 dec - contents of R s and R t are considered as unsigned integers 9. Set on Less Than: SLT Effects: if [R s ] < [R t ] then R d else R d 0 64 ; PC [PC] + 4 Assembly format: SLT R d 10. Set on Less Than Unsigned: SLTU As SLT instruction, except: - Funct = 43 dec - contents of R s and R t are considered as unsigned integers. 2
3 11. Logical And: AND [R s ] AND [R t Assembly format: AND R d 12. Logical Or: OR As AND instruction, except: - Funct=37 dec - or function performed instead of logical and 13. Logical Not Or: NOR As AND instruction, except: - Funct=39 dec - nor function performed instead of logical and 14. Logical Exclusive Or: XOR As AND instruction, except: - Funct=38 dec - exclusive or function performed instead of logical and 15. Doubleword Add Immediate: DADDI I-type format: R s immediate Effects: R t [R s ] + ([I 15 ]; PC [PC] + 4 (Overflow exception possible Assembly format: DADDI R t,immediate 16. Doubleword Add Immediate Unsigned: DADDIU As DADDI instruction, except Op-code=25 dec and overflow ignored Note: the term unsigned in the instruction name is a misnomer. 3
4 17. Set on Less Than Immediate: SLTI I-type format: R s immediate Effects: if [R s ]<([I 15 ] 48 [I ] then R t else R t 0 64 PC [PC] + 4 Assembly format: SLTI R t,immediate 18. Set on Less Than Immediate Unsigned: SLTIU As SLTI instruction, except: - Op-code = 11 dec - contents in the comparison are considered as unsigned integers. 19. Logical And Immediate: ANDI I-type format: R s immediate Effects: R t [R s ] AND (0 48 [I ]; PC [PC] + 4 Assembly format: ANDI R t,immediate 20. Logical Or Immediate: ORI As ANDI instruction, except: - Op-code=13 dec - or function performed instead of logical and 21. Exclusive Or Immediate: XORI As ANDI instruction, except: - Op-code=14 dec - exclusive or function performed instead of logical and 22. Doubleword Shift Left Logical: DSLL R-type format SA [R t ] << SA; (0 s shifted in on right PC [PC]+4 Assembly format: DSLL R d,sa 4
5 23. Doubleword Shift Left Logical Variable: DSLLV [R t ] << [R s ]; (0 s shifted in on right PC [PC]+4 Assembly format: DSLLV R d 24. Doubleword Shift Right Logical: DSRL R-type format SA [R t ] >> SA ; (0 s shifted in on left PC [PC]+4 Assembly format: DSRL R d,sa 25. Doubleword Shift Right Logical Variable: DSRLV As DSLLV instruction, except Funct=22 dec, shift right & 0 s shifted in on left 26. Doubleword Shift Right Arithmetic: DSRA R-type format SA [R t ]>>SA; (sign bit shifted in on left; PC [PC]+4 Assembly format: DSRA R d,sa 27. Doubleword Shift Right Arithmetic Variable: DSRAV As DSLLV instruction, except Funct=23 dec, shift right & sign bit shifted in on left 28. Load Doubleword: LD I-type format: R s Effects: R t M{[R s ]}; PC [PC] + 4 Assembly format: LD R t 5
6 29. Store Doubleword: SD I-type format: R s Effects: M{[R s ]} [R t Assembly format: SD R t 30. Load Byte Unsigned: LBU I-type format: R s Effects: R t 0 56 m{[r s ]}; PC [PC] + 4 Assembly format: LBU R t 31. Load Byte: LB As LBU instruction, except: - leftmost 56 bits of R t set to a value of leftmost bit of byte - Op-code =32 dec 32. Load Halfword Unsigned: LHU As LBU instruction, except: - 16 bits from memory loaded into R t plus 48-bit zero-extend - Op-code =37 dec 33. Load Halfword: LH As LB instruction, except: - 16 bits from memory loaded into R t plus 48-bit sign-extend - Op-code =33 dec 34. Load Word Unsigned: LWU As LBU instruction, except: - 32 bits from memory loaded into R t plus 32-bit zero-extend - Op-code =39 dec 35. Load Word: LW As LB instruction, except: - 32 bits from memory loaded into R t plus 32-bit sign-extend - Op-code =35 dec 6
7 36. Store Byte: SB I-type format: R s Effects: m{[r s ]} [R t ] 7..0 ; PC [PC] + 4 Assembly format: SB R t 37. Store Halfword: SH As SB instruction, except: - rightmost 16 bits from R t stored into memory - Op-code =41 dec 38. Store Word: SW As SB instruction, except: - rightmost 32 bits from R t stored into memory - Op-code =43 dec 39. Load Doubleword to Floating Point: L.D I-type format: R s F t Effects: F t M{[R s ]}; PC [PC] + 4 Assembly format: L.D F t 40. Store Doubleword from Floating Point: S.D I-type format: R s F t Effects: M{[R s ]} [F t Assembly format: S.D F t 41. Load Word to Floating Point: L.S I-type format: R s F t Effects: F t mm{[r s ]} 0 32 ; PC [PC] + 4 Assembly format: L.S F t 7
8 42. Store Word from Floating Point: S.S I-type format: R s F t Effects: mm{[r s ]} [F t ] (only 32 most significant bits taken PC [PC] + 4; Assembly format: S.S F t 43. Load Upper Immediate: LUI I-type format: immediate Effects: R t [I 15 ] 32 [I 15-0 ] 0 16 ; PC [PC] + 4 Assembly format: LUI R t,immediate 44. Branch on Less Than or Equal to Zero: BLEZ I-type format: R s Effects: if [R s ] 0 then PC [PC] ([I 15 ] 46 [I ] 0 2 else PC [PC] + 4 If condition satisfied, the instruction that follows the branch instruction, in branch delay slot, is executed before branching. Assembly format: BLEZ R s,offset or BLEZ R s,label 45. Branch on Greater Than Zero: BGTZ As BLEZ instruction, except branch if [R s ]>0 and Op-code = 7 dec 46. Branch on Less Than Zero: BLTZ As BLEZ instruction, except branch if [R s ]<0 and Op-code = 1 dec 47. Branch on Greater Then or Equal to Zero: BGEZ As BLEZ instruction, except branch if [R s ] 0, Op-code=1 dec & R t =1 8
9 48. Branch on Equal: BEQ I-type format: R s Effects: if [R s ]==[R t ] then PC [PC]+4 +([I 15 ] 46 [I ] 0 2 else PC [PC] + 4 If condition satisfied, the instruction that follows the branch instruction, in branch delay slot, is executed before branching. Assembly format: BEQ R s,offset or BEQ R s,label 49. Branch on Not Equal: BNE As BEQ instruction, except branch if [R s ]! [R t ] and Op-code = 5 dec 50. Jump: J J-type format jump_target Effects: PC [PC ] [I ] 0 2 The instruction that follows the jump instruction, in the branch delay slot, is executed before executing the jump itself. Assembly format: J jump_target or J label 51. Jump and Link: JAL J-type format jump_target Effects: R 31 [PC] + 8; PC <-- [PC ] [I ] 0 2 The instruction that follows the jump instruction, in the branch delay slot, is executed before executing the jump itself. Assembly format: JAL jump_target or JAL label 9
10 52. Jump Register: JR Effects: PC [R s ] The instruction that follows the jump instruction, in the branch delay slot, is executed before executing the jump itself. Assembly format: JR R s 53. Jump and Link Register: JALR [PC] + 8; PC [R s ] The instruction that follows the jump instruction, in the branch delay slot, is executed before executing the jump itself. Assembly format: JALR R d 54. Move From HI Register: MFHI R-type format [Hi Assembly format: MFHI R d 55. Move From LO Register: MFLO R-type format [Lo Assembly format: MFLO R d 10
11 56. Move from Coprocessor 0 Register: MFC0 R-type format C d Effects: R t [C d ] (32-bit sign-extended; PC [PC] + 4; Assembly format: MFC0 R t,c d C 12 = Status Register; C 13 = Cause Register; C 14 = EPC Register; 57. Move to Coprocessor 0 Register: MTC0 R-type format C d Effects: C d [R t ] (32-rightmost bits taken; PC [PC] + 4; Assembly format: MTC0 C d 58. Floating Point Add Single Precision: ADD.S R-type format F t F s Effects: F d <-- [F s ] + [F t ]; PC <-- [PC]+4 (FP overflow or underflow exception possible Assembly format: ADD.S F d,f t 59. Floating Point Add Double Precision: ADD.D R-type format F t F s Effects: F d [F s ] + [F t (FP overflow or underflow exception possible Assembly format: ADD.D F d,f t 60. Floating Point Subtract Single Precision: SUB.S As ADD.S instruction, except subtract and funct = Floating Point Subtract Double Precision: SUB.D As ADD.D instruction, except subtract and funct = 1 11
12 62. Floating Point Multiply Single Precision: MUL.S As ADD.S instruction, except multiply and funct = Floating Point Multiply Double Precision: MUL.D As ADD.D instruction, except multiply and funct = Floating Point Divide Single Precision: DIV.S As ADD.S instruction, except divide, funct = 3, and in addition zero division exception possible 65. Floating Point Divide Double Precision: DIV.D instruction As ADD.D instruction, except divide, funct = 3 and in addition zero division exception possible 66. Floating Point Move Single Precision: MOV.S R-type format F s Effects: F d [F s Assembly format: MOV.S F d 67. Floating Point Move Double Precision: MOV.D R-type format F s Effects: F d [F s Assembly format: MOV.D F d 68. System Call: SYSCALL R-type format code Effects: Syscal exception caused; the field code, ignored by hardware, is available for use as a software parameter and can be obtained only by loading the contents of the memory word containing the instruction. 12
13 69. Break Point: BREAK As SYSCALL instruction, except: - Break point exception caused - Funct = 13 dec 70. Exception Return: ERET R-type format Effects: PC [EPC]; CPU mode is switched in user mode 71. Trap if Egual: TEQ code Effects: if [R s ]=[R t ] then Trap exception caused; the field code, ignored by hardware, is available for use as a software parameter and can be obtained only by loading the contents of the memory word containing the instruction. Assembly format: TEQ R s 72. Trap if Greater or Equal: TGE 73. Trap if Greater or Equal Unsigned: TGEU 74. Trap if Less Than: TLT 75. Trap if Less Than Unsigned: TLTU 76. Trap if Not Equal: TNE 77. Convert to Double Floating Point from Long Integer: CVT.D.L R-type format F s Effects: The value in F s, interpreted in 2 s complement format, is converted to a value in double floating point format and stored in F d ; PC [PC] + 4 Assembly format: CVT.D.L F d 13
14 78.Convert to Double Floating Point from Single Floating: CVT.D.S R-type format F s Effects: The value in F s, interpreted in single floating point format, is converted to a value in double floating point format and stored in F d ; PC [PC] + 4 Assembly format: CVT.D.S F d 79. Convert to Single Floating Point from Long Integer: CVT.S.L R-type format F s Effects: The value in F s, interpreted in 2 s complement format, is converted to a value in single floating point format and stored in F d ; PC [PC] + 4 Assembly format: CVT.S.L F d 80.Convert to Single Floating Point from Double Floating: CVT.S.D R-type format F s Effects: The value in F s, interpreted in single floating point format, is converted to a value in double floating point format and stored in F d ; PC [PC] + 4 (FP overflow or underflow exception possible Assembly format: CVT.S.D F d 81. Convert to Long Integer from Single Floating Point: CVT.L.S R-type format F s Effects: The value in F s, interpreted as in single floating point format, is converted to a value in 2 s complement format and stored in F d ; PC [PC] + 4 (Overflow exception possible Assembly format: CVT.L.S F d 82. Convert to Long Integer from Double Floating Point: CVT.L.D As CVT.L.S instruction, except double floating format converted and value in the second instruction field is 17 dec 14
15 83. Branch on Less Than or Equal to Zero Likely: BLEZL I-type format: R s Effects: if [R s ] 0 then PC [PC] ([I 15 ] 46 [I ] 0 2 else PC [PC] + 4 If condition satisfied, the instruction that follows the branch instruction, in branch delay slot, is executed before branching. If the branch is not taken, the instruction in the delay slot is not executed. Assembly format: BLEZL R s,offset or BLEZL R s,label 84. Branch on Greater Than Zero Likely: BGTZL As BLEZL instruction, except branch if [R s ]>0 and Op-code = 23 dec 85. Branch on Less Than Zero Likely: BLTZL As BLEZL instruction, except branch if [R s ]<0, Op-code=1 dec & R t =2 dec 86. Branch on Greater Then or Equal to Zero: BGEZL As BLEZL instruction, except branch if [R s ] 0, Op-code=1 dec & R t =3 dec 87. Branch on EqualLikely: BEQL I-type format: R s Effects: if [R s ]==[R t ] then PC [PC]+4 +([I 15 ] 46 [I ] 0 2 else PC [PC] + 4 If condition satisfied, the instruction that follows the branch instruction, in branch delay slot, is executed before branching. If the branch is not taken, the instruction in the delay slot is not executed. Assembly format: BEQL R s,offset or BEQL R s,label 88. Branch on Not Equal Likely: BNEL As BEQL instruction, except branch if [R s ]! [R t ] and Op-code =21 dec 15
CA226 Advanced Computer Architecture
Table of Contents Stephen Blott 1 MIPS MIPS is: a RISC instruction-set architecture: all ALU operations are register-register initially 32-bit, later 64-bit Its design is heavily
More informationInstruction Set Architecture of. MIPS Processor. MIPS Processor. MIPS Registers (continued) MIPS Registers
CSE 675.02: Introduction to Computer Architecture MIPS Processor Memory Instruction Set Architecture of MIPS Processor CPU Arithmetic Logic unit Registers $0 $31 Multiply divide Coprocessor 1 (FPU) Registers
More informationMIPS Instruction Format
MIPS Instruction Format MIPS uses a 32-bit fixed-length instruction format. only three different instruction word formats: There are Register format Op-code Rs Rt Rd Function code 000000 sssss ttttt ddddd
More informationCA226 Advanced Computer Architecture
Stephen Blott Review of MIPS Instruction Set Table of Contents 1 2 Registers Memory Instructions r0 ; always 0 r1, r2,..., r31 ; general-purpose integer registers f0, f1, f2,...,
More informationThe MIPS R2000 Instruction Set
The MIPS R2000 Instruction Set Arithmetic and Logical Instructions In all instructions below, Src2 can either be a register or an immediate value (a 16 bit integer). The immediate forms of the instructions
More informationMIPS Instruction Reference
Page 1 of 9 MIPS Instruction Reference This is a description of the MIPS instruction set, their meanings, syntax, semantics, and bit encodings. The syntax given for each instruction refers to the assembly
More informationMIPS Reference Guide
MIPS Reference Guide Free at PushingButtons.net 2 Table of Contents I. Data Registers 3 II. Instruction Register Formats 4 III. MIPS Instruction Set 5 IV. MIPS Instruction Set (Extended) 6 V. SPIM Programming
More informationF. Appendix 6 MIPS Instruction Reference
F. Appendix 6 MIPS Instruction Reference Note: ALL immediate values should be sign extended. Exception: For logical operations immediate values should be zero extended. After extensions, you treat them
More informationMIPS Instruction Set
MIPS Instruction Set Prof. James L. Frankel Harvard University Version of 7:12 PM 3-Apr-2018 Copyright 2018, 2017, 2016, 201 James L. Frankel. All rights reserved. CPU Overview CPU is an acronym for Central
More informationece4750-parc-isa.txt
========================================================================== PARC Instruction Set Architecture ========================================================================== # Author : Christopher
More informationComputer Architecture. The Language of the Machine
Computer Architecture The Language of the Machine Instruction Sets Basic ISA Classes, Addressing, Format Administrative Matters Operations, Branching, Calling conventions Break Organization All computers
More informationM2 Instruction Set Architecture
M2 Instruction Set Architecture Module Outline Addressing modes. Instruction classes. MIPS-I ISA. High level languages, Assembly languages and object code. Translating and starting a program. Subroutine
More informationEEM 486: Computer Architecture. Lecture 2. MIPS Instruction Set Architecture
EEM 486: Computer Architecture Lecture 2 MIPS Instruction Set Architecture EEM 486 Overview Instruction Representation Big idea: stored program consequences of stored program Instructions as numbers Instruction
More informationThe MIPS Instruction Set Architecture
The MIPS Set Architecture CPS 14 Lecture 5 Today s Lecture Admin HW #1 is due HW #2 assigned Outline Review A specific ISA, we ll use it throughout semester, very similar to the NiosII ISA (we will use
More informationICS 233 COMPUTER ARCHITECTURE. MIPS Processor Design Multicycle Implementation
ICS 233 COMPUTER ARCHITECTURE MIPS Processor Design Multicycle Implementation Lecture 23 1 Add immediate unsigned Subtract unsigned And And immediate Or Or immediate Nor Shift left logical Shift right
More informationCS3350B Computer Architecture MIPS Instruction Representation
CS3350B Computer Architecture MIPS Instruction Representation Marc Moreno Maza http://www.csd.uwo.ca/~moreno/cs3350_moreno/index.html Department of Computer Science University of Western Ontario, Canada
More informationREGISTERS INSTRUCTION SET DIRECTIVES SYSCALLS
MARS REGISTERS INSTRUCTION SET DIRECTIVES SYSCALLS ΗΥ 134: ΕΙΣΑΓΩΓΗ ΣΤΗΝ ΟΡΓΑΝΩΣΗ ΚΑΙ ΣΧΕΔΙΑΣΗ Η/Υ Ι Registers MIPS has 32 integer registers. The hardware architecture specifies that: General purpose register
More informationComputer Architecture. MIPS Instruction Set Architecture
Computer Architecture MIPS Instruction Set Architecture Instruction Set Architecture An Abstract Data Type Objects Registers & Memory Operations Instructions Goal of Instruction Set Architecture Design
More informationReduced Instruction Set Computer (RISC)
Reduced Instruction Set Computer (RISC) Reduced Instruction Set Computer (RISC) Focuses on reducing the number and complexity of instructions of the machine. Reduced number of cycles needed per instruction.
More informationSPIM Instruction Set
SPIM Instruction Set This document gives an overview of the more common instructions used in the SPIM simulator. Overview The SPIM simulator implements the full MIPS instruction set, as well as a large
More informationComputer Architecture
CS3350B Computer Architecture Winter 2015 Lecture 4.2: MIPS ISA -- Instruction Representation Marc Moreno Maza www.csd.uwo.ca/courses/cs3350b [Adapted from lectures on Computer Organization and Design,
More informationReduced Instruction Set Computer (RISC)
Reduced Instruction Set Computer (RISC) Focuses on reducing the number and complexity of instructions of the ISA. RISC Goals RISC: Simplify ISA Simplify CPU Design Better CPU Performance Motivated by simplifying
More informationArithmetic for Computers
MIPS Arithmetic Instructions Cptr280 Dr Curtis Nelson Arithmetic for Computers Operations on integers Addition and subtraction; Multiplication and division; Dealing with overflow; Signed vs. unsigned numbers.
More informationQuestion 0. Do not turn this page until you have received the signal to start. (Please fill out the identification section above) Good Luck!
CSC B58 Winter 2017 Final Examination Duration 2 hours and 50 minutes Aids allowed: none Last Name: Student Number: UTORid: First Name: Question 0. [1 mark] Read and follow all instructions on this page,
More informationCharacter Is a byte quantity (00~FF or 0~255) ASCII (American Standard Code for Information Interchange) Page 91, Fig. 2.21
2.9 Communication with People: Byte Data & Constants Character Is a byte quantity (00~FF or 0~255) ASCII (American Standard Code for Information Interchange) Page 91, Fig. 2.21 32: space 33:! 34: 35: #...
More informationExam in Computer Engineering
Exam in Computer Engineering Kurskod D0013E/SMD137/SMD082/SMD066 Tentamensdatum 2010-10-29 Skrivtid 14.00-18.00 Maximalt resultat 50 poäng Godkänt resultat 25 poäng Jourhavande lärare Andrey Kruglyak Tel
More informationQ1: /30 Q2: /25 Q3: /45. Total: /100
ECE 2035(A) Programming for Hardware/Software Systems Fall 2013 Exam One September 19 th 2013 This is a closed book, closed note texam. Calculators are not permitted. Please work the exam in pencil and
More informationECE 2035 Programming HW/SW Systems Fall problems, 7 pages Exam Two 23 October 2013
Instructions: This is a closed book, closed note exam. Calculators are not permitted. If you have a question, raise your hand and I will come to you. Please work the exam in pencil and do not separate
More informationECE 2035 Programming HW/SW Systems Spring problems, 6 pages Exam One 4 February Your Name (please print clearly)
Your Name (please print clearly) This exam will be conducted according to the Georgia Tech Honor Code. I pledge to neither give nor receive unauthorized assistance on this exam and to abide by all provisions
More information101 Assembly. ENGR 3410 Computer Architecture Mark L. Chang Fall 2009
101 Assembly ENGR 3410 Computer Architecture Mark L. Chang Fall 2009 What is assembly? 79 Why are we learning assembly now? 80 Assembly Language Readings: Chapter 2 (2.1-2.6, 2.8, 2.9, 2.13, 2.15), Appendix
More informationComputer Architecture. Chapter 3: Arithmetic for Computers
182.092 Computer Architecture Chapter 3: Arithmetic for Computers Adapted from Computer Organization and Design, 4 th Edition, Patterson & Hennessy, 2008, Morgan Kaufmann Publishers and Mary Jane Irwin
More informationOverview. Introduction to the MIPS ISA. MIPS ISA Overview. Overview (2)
Introduction to the MIPS ISA Overview Remember that the machine only understands very basic instructions (machine instructions) It is the compiler s job to translate your high-level (e.g. C program) into
More informationCS 4200/5200 Computer Architecture I
CS 4200/5200 Computer Architecture I MIPS Instruction Set Architecture Dr. Xiaobo Zhou Department of Computer Science CS420/520 Lec3.1 UC. Colorado Springs Adapted from UCB97 & UCB03 Review: Organizational
More informationCourse Administration
Fall 2017 EE 3613: Computer Organization Chapter 2: Instruction Set Architecture 2/4 Avinash Kodi Department of Electrical Engineering & Computer Science Ohio University, Athens, Ohio 45701 E-mail: kodi@ohio.edu
More information5DV118 Computer Organization and Architecture Umeå University Department of Computing Science Stephen J. Hegner. Topic 3: Arithmetic
5DV118 Computer Organization and Architecture Umeå University Department of Computing Science Stephen J. Hegner Topic 3: Arithmetic These slides are mostly taken verbatim, or with minor changes, from those
More informationRTL Model of a Two-Stage MIPS Processor
RTL Model of a Two-Stage MIPS Processor 6.884 Laboratory February 4, 5 - Version 45 Introduction For the first lab assignment, you are to write an RTL model of a two-stage pipelined MIPS processor using
More informationRecap from Last Time. CSE 2021: Computer Organization. Levels of Programming. The RISC Philosophy 5/19/2011
CSE 2021: Computer Organization Recap from Last Time load from disk High-Level Program Lecture-3 Code Translation-1 Registers, Arithmetic, logical, jump, and branch instructions MIPS to machine language
More informationIntroduction to MIPS Processor
Introduction to MIPS Processor The processor we will be considering in this tutorial is the MIPS processor. The MIPS processor, designed in 1984 by researchers at Stanford University, is a RISC (Reduced
More informationTSK3000A - Generic Instructions
TSK3000A - Generic Instructions Frozen Content Modified by Admin on Sep 13, 2017 Using the core set of assembly language instructions for the TSK3000A as building blocks, a number of generic instructions
More informationECE 2035 Programming HW/SW Systems Spring problems, 6 pages Exam Two 11 March Your Name (please print) total
Instructions: This is a closed book, closed note exam. Calculators are not permitted. If you have a question, raise your hand and I will come to you. Please work the exam in pencil and do not separate
More informationECE 2035 Programming HW/SW Systems Fall problems, 6 pages Exam One 22 September Your Name (please print clearly) Signed.
Your Name (please print clearly) This exam will be conducted according to the Georgia Tech Honor Code. I pledge to neither give nor receive unauthorized assistance on this exam and to abide by all provisions
More information5/17/2012. Recap from Last Time. CSE 2021: Computer Organization. The RISC Philosophy. Levels of Programming. Stored Program Computers
CSE 2021: Computer Organization Recap from Last Time load from disk High-Level Program Lecture-2 Code Translation-1 Registers, Arithmetic, logical, jump, and branch instructions MIPS to machine language
More informationMIPS Assembly Language. Today s Lecture
MIPS Assembly Language Computer Science 104 Lecture 6 Homework #2 Midterm I Feb 22 (in class closed book) Outline Assembly Programming Reading Chapter 2, Appendix B Today s Lecture 2 Review: A Program
More informationToday s Lecture. MIPS Assembly Language. Review: What Must be Specified? Review: A Program. Review: MIPS Instruction Formats
Today s Lecture Homework #2 Midterm I Feb 22 (in class closed book) MIPS Assembly Language Computer Science 14 Lecture 6 Outline Assembly Programming Reading Chapter 2, Appendix B 2 Review: A Program Review:
More informationNumber Systems and Their Representations
Number Representations Cptr280 Dr Curtis Nelson Number Systems and Their Representations In this presentation you will learn about: Representation of numbers in computers; Signed vs. unsigned numbers;
More informationMIPS ISA and MIPS Assembly. CS301 Prof. Szajda
MIPS ISA and MIPS Assembly CS301 Prof. Szajda Administrative HW #2 due Wednesday (9/11) at 5pm Lab #2 due Friday (9/13) 1:30pm Read Appendix B5, B6, B.9 and Chapter 2.5-2.9 (if you have not already done
More informationECE Exam I February 19 th, :00 pm 4:25pm
ECE 3056 Exam I February 19 th, 2015 3:00 pm 4:25pm 1. The exam is closed, notes, closed text, and no calculators. 2. The Georgia Tech Honor Code governs this examination. 3. There are 4 questions and
More informationProject Part A: Single Cycle Processor
Curtis Mayberry Andrew Kies Mark Monat Iowa State University CprE 381 Professor Joseph Zambreno Project Part A: Single Cycle Processor Introduction The second part in the three part MIPS Processor design
More informationCSSE 232 Computer Architecture I. I/O and Addressing
CSSE 232 Computer Architecture I I/O and Addressing 1 / 21 Class Status Reading for today 2.9-2.10, 6.6 (optional) 2 / 21 Outline I/O More memory instructions Addressing modes Jump and branch instructions
More informationCISC 662 Graduate Computer Architecture. Lecture 4 - ISA MIPS ISA. In a CPU. (vonneumann) Processor Organization
CISC 662 Graduate Computer Architecture Lecture 4 - ISA MIPS ISA Michela Taufer http://www.cis.udel.edu/~taufer/courses Powerpoint Lecture Notes from John Hennessy and David Patterson s: Computer Architecture,
More informationKernel Registers 0 1. Global Data Pointer. Stack Pointer. Frame Pointer. Return Address.
The MIPS Register Set The MIPS R2000 CPU has 32 registers. 31 of these are general-purpose registers that can be used in any of the instructions. The last one, denoted register zero, is defined to contain
More informationReview: MIPS Organization
1 MIPS Arithmetic Review: MIPS Organization Processor Memory src1 addr 5 src2 addr 5 dst addr 5 write data Register File registers ($zero - $ra) bits src1 data src2 data read/write addr 1 1100 2 30 words
More informationCSc 256 Midterm 2 Spring 2012
CSc 256 Midterm 2 Spring 2012 NAME: 1a) You are given this MIPS assembly language instruction (i.e., pseudo- instruction): ble $12, 0x20004880, there Translate this MIPS instruction to an efficient sequence
More informationCISC 662 Graduate Computer Architecture. Lecture 4 - ISA
CISC 662 Graduate Computer Architecture Lecture 4 - ISA Michela Taufer http://www.cis.udel.edu/~taufer/courses Powerpoint Lecture Notes from John Hennessy and David Patterson s: Computer Architecture,
More informationEduMIPS64 Documentation
EduMIPS64 Documentation Release 1.2.3 Andrea Spadaccini (and the EduMIPS64 development team) May 27, 2017 Contents 1 Source files format 3 1.1 The.data section.............................................
More informationCPS311 - COMPUTER ORGANIZATION. A bit of history
CPS311 - COMPUTER ORGANIZATION A Brief Introduction to the MIPS Architecture A bit of history The MIPS architecture grows out of an early 1980's research project at Stanford University. In 1984, MIPS computer
More informationINSTRUCTION SET COMPARISONS
INSTRUCTION SET COMPARISONS MIPS SPARC MOTOROLA REGISTERS: INTEGER 32 FIXED WINDOWS 32 FIXED FP SEPARATE SEPARATE SHARED BRANCHES: CONDITION CODES NO YES NO COMPARE & BR. YES NO YES A=B COMP. & BR. YES
More informationUSER S MANUAL VR4100 TM 64-BIT MICROPROCESSOR (PRELIMINARY) Document No. U10050EJ3V0UM00 (3rd edition)
USER S MANUAL VR41 TM 64-BIT MICROPROCESSOR (PRELIMINARY) µpd31 C NEC Corporation 1995 C MIPS Technologies Inc. 1993 Document No. U15EJ3VUM (3rd edition) Date Published January 1996 P Printed in Japan
More informationMips Code Examples Peter Rounce
Mips Code Examples Peter Rounce P.Rounce@cs.ucl.ac.uk Some C Examples Assignment : int j = 10 ; // space must be allocated to variable j Possibility 1: j is stored in a register, i.e. register $2 then
More informationWeek 10: Assembly Programming
Week 10: Assembly Programming Arithmetic instructions Instruction Opcode/Function Syntax Operation add 100000 $d, $s, $t $d = $s + $t addu 100001 $d, $s, $t $d = $s + $t addi 001000 $t, $s, i $t = $s +
More informationComputer Systems and Architecture
Computer Systems and Architecture Stephen Pauwels MIPS: Introduction Academic Year 2018-2019 Outline MIPS Registers and Memory Language Constructs Exercises Assembly Language Very closely related to machine
More informationMIPS Assembly Language
MIPS Assembly Language Chapter 15 S. Dandamudi Outline MIPS architecture Registers Addressing modes MIPS instruction set Instruction format Data transfer instructions Arithmetic instructions Logical/shift/rotate/compare
More informationInstruction Set Architecture part 1 (Introduction) Mehran Rezaei
Instruction Set Architecture part 1 (Introduction) Mehran Rezaei Overview Last Lecture s Review Execution Cycle Levels of Computer Languages Stored Program Computer/Instruction Execution Cycle SPIM, a
More informationA Processor. Kevin Walsh CS 3410, Spring 2010 Computer Science Cornell University. See: P&H Chapter , 4.1-3
A Processor Kevin Walsh CS 3410, Spring 2010 Computer Science Cornell University See: P&H Chapter 2.16-20, 4.1-3 Let s build a MIPS CPU but using Harvard architecture Basic Computer System Registers ALU
More informationENCM 369 Winter 2013: Reference Material for Midterm #2 page 1 of 5
ENCM 369 Winter 2013: Reference Material for Midterm #2 page 1 of 5 MIPS/SPIM General Purpose Registers Powers of Two 0 $zero all bits are zero 16 $s0 local variable 1 $at assembler temporary 17 $s1 local
More informationComputer Architecture Instruction Set Architecture part 2. Mehran Rezaei
Computer Architecture Instruction Set Architecture part 2 Mehran Rezaei Review Execution Cycle Levels of Computer Languages Stored Program Computer/Instruction Execution Cycle SPIM, a MIPS Interpreter
More informationMidterm. Sticker winners: if you got >= 50 / 67
CSC258 Week 8 Midterm Class average: 4.2 / 67 (6%) Highest mark: 64.5 / 67 Tests will be return in office hours. Make sure your midterm mark is correct on MarkUs Solution posted on the course website.
More informationECE 2035 Programming HW/SW Systems Fall problems, 6 pages Exam One 19 September 2012
Instructions: This is a closed book, closed note exam. Calculators are not permitted. If you have a question, raise your hand and I will come to you. Please work the exam in pencil and do not separate
More informationECE232: Hardware Organization and Design. Computer Organization - Previously covered
ECE232: Hardware Organization and Design Part 6: MIPS Instructions II http://www.ecs.umass.edu/ece/ece232/ Adapted from Computer Organization and Design, Patterson & Hennessy, UCB Computer Organization
More informationCSc 256 Midterm 2 Fall 2011
CSc 256 Midterm 2 Fall 2011 NAME: 1a) You are given a MIPS branch instruction: x: beq $12, $0, y The address of the label "y" is 0x400468. The memory location at "x" contains: address contents 0x40049c
More informationbits 5..0 the sub-function of opcode 0, 32 for the add instruction
CS2 Computer Systems note 1a Some MIPS instructions More details on these, and other instructions in the MIPS instruction set, can be found in Chapter 3 of Patterson and Hennessy. A full listing of MIPS
More informationEE108B Lecture 3. MIPS Assembly Language II
EE108B Lecture 3 MIPS Assembly Language II Christos Kozyrakis Stanford University http://eeclass.stanford.edu/ee108b 1 Announcements Urgent: sign up at EEclass and say if you are taking 3 or 4 units Homework
More informationMIPS Assembly Language Programming
MIPS Assembly Language Programming Bob Britton Chapter 1 The MIPS Architecture My objective in teaching assembly language is to introduce students to the fundamental concepts of contemporary computer architecture.
More informationExamples of branch instructions
Examples of branch instructions Beq rs,rt,target #go to target if rs = rt Beqz rs, target #go to target if rs = 0 Bne rs,rt,target #go to target if rs!= rt Bltz rs, target #go to target if rs < 0 etc.
More informationAssembly Programming
Designing Computer Systems Assembly Programming 08:34:48 PM 23 August 2016 AP-1 Scott & Linda Wills Designing Computer Systems Assembly Programming In the early days of computers, assembly programming
More informationECE 2035 Programming HW/SW Systems Fall problems, 6 pages Exam Two 23 October Your Name (please print clearly) Signed.
Your Name (please print clearly) This exam will be conducted according to the Georgia Tech Honor Code. I pledge to neither give nor receive unauthorized assistance on this exam and to abide by all provisions
More informationCSCI 402: Computer Architectures. Instructions: Language of the Computer (3) Fengguang Song Department of Computer & Information Science IUPUI.
CSCI 402: Computer Architectures Instructions: Language of the Computer (3) Fengguang Song Department of Computer & Information Science IUPUI Recall Big endian, little endian Memory alignment Unsigned
More informationAnne Bracy CS 3410 Computer Science Cornell University. [K. Bala, A. Bracy, E. Sirer, and H. Weatherspoon]
Anne Bracy CS 3410 Computer Science Cornell University [K. Bala, A. Bracy, E. Sirer, and H. Weatherspoon] Understanding the basics of a processor We now have the technology to build a CPU! Putting it all
More informationProcessor. Han Wang CS3410, Spring 2012 Computer Science Cornell University. See P&H Chapter , 4.1 4
Processor Han Wang CS3410, Spring 2012 Computer Science Cornell University See P&H Chapter 2.16 20, 4.1 4 Announcements Project 1 Available Design Document due in one week. Final Design due in three weeks.
More informationChapter 2A Instructions: Language of the Computer
Chapter 2A Instructions: Language of the Computer Copyright 2009 Elsevier, Inc. All rights reserved. Instruction Set The repertoire of instructions of a computer Different computers have different instruction
More informationMIPS Coding Snippets. Prof. James L. Frankel Harvard University. Version of 9:32 PM 14-Feb-2016 Copyright 2016 James L. Frankel. All rights reserved.
MIPS Coding Snippets Prof. James L. Frankel Harvard University Version of 9:32 PM 14-Feb-2016 Copyright 2016 James L. Frankel. All rights reserved. Loading a 32-bit constant into a register # Example loading
More informationLec 10: Assembler. Announcements
Lec 10: Assembler Kavita Bala CS 3410, Fall 2008 Computer Science Cornell University Announcements HW 2 is out Due Wed after Fall Break Robot-wide paths PA 1 is due next Wed Don t use incrementor 4 times
More informationFlow of Control -- Conditional branch instructions
Flow of Control -- Conditional branch instructions You can compare directly Equality or inequality of two registers One register with 0 (>,
More informationsoftware hardware Which is easier to change/design???
CS152 Computer Architecture and Engineering Lecture 2 Review of MIPS ISA and Performance January 27, 2003 John Kubiatowicz (http.cs.berkeley.edu/~kubitron) lecture slides: http://inst.eecs.berkeley.edu/~cs152/
More informationCSc 256 Midterm (green) Fall 2018
CSc 256 Midterm (green) Fall 2018 NAME: Problem 1 (5 points): Suppose we are tracing a C/C++ program using a debugger such as gdb. The code showing all function calls looks like this: main() { bat(5);
More informationECE 2035 Programming HW/SW Systems Fall problems, 6 pages Exam Two 21 October 2016
Instructions: This is a closed book, closed note exam. Calculators are not permitted. If you have a question, raise your hand and I will come to you. Please work the exam in pencil and do not separate
More informationMIPS ISA. 1. Data and Address Size 8-, 16-, 32-, 64-bit 2. Which instructions does the processor support
Components of an ISA EE 357 Unit 11 MIPS ISA 1. Data and Address Size 8-, 16-, 32-, 64-bit 2. Which instructions does the processor support SUBtract instruc. vs. NEGate + ADD instrucs. 3. Registers accessible
More informationSMIPS Processor Specification
SMIPS Processor Specification CS250 VLSI Systems Design September 25, 2009 SMIPS is the version of the MIPS instruction set architecture (ISA) we ll be using for the processors we implement in 6.884. SMIPS
More informationInstruction Set Architecture of MIPS Processor
CSE 3421/5421: Introduction to Computer Architecture Instruction Set Architecture of MIPS Processor Presentation B Study: 2.1 2.3, 2.4 2.7, 2.10 and Handout MIPS Instructions: 32-bit Core Subset Read:
More informationSPIM S20: A MIPS R2000 Simulator
SPIM S20: A MIPS R2000 Simulator 1 th 25 the performance at none of the cost James R. Larus Copyright c 1990 2004 by James R. Larus (This document may be copied without royalties, so long as this copyright
More informationECE 30 Introduction to Computer Engineering
ECE 30 Introduction to Computer Engineering Study Problems, Set #3 Spring 2015 Use the MIPS assembly instructions listed below to solve the following problems. arithmetic add add sub subtract addi add
More informationLecture 2. Instructions: Language of the Computer (Chapter 2 of the textbook)
Lecture 2 Instructions: Language of the Computer (Chapter 2 of the textbook) Instructions: tell computers what to do Chapter 2 Instructions: Language of the Computer 2 Introduction Chapter 2.1 Chapter
More informationChapter 2. Instructions: Language of the Computer. HW#1: 1.3 all, 1.4 all, 1.6.1, , , , , and Due date: one week.
Chapter 2 Instructions: Language of the Computer HW#1: 1.3 all, 1.4 all, 1.6.1, 1.14.4, 1.14.5, 1.14.6, 1.15.1, and 1.15.4 Due date: one week. Practice: 1.5 all, 1.6 all, 1.10 all, 1.11 all, 1.14 all,
More informationChapter 2. Instructions: Language of the Computer. Adapted by Paulo Lopes
Chapter 2 Instructions: Language of the Computer Adapted by Paulo Lopes Instruction Set The repertoire of instructions of a computer Different computers have different instruction sets But with many aspects
More informationCS3350B Computer Architecture MIPS Introduction
CS3350B Computer Architecture MIPS Introduction Marc Moreno Maza http://www.csd.uwo.ca/~moreno/cs3350_moreno/index.html Department of Computer Science University of Western Ontario, Canada Thursday January
More informationECE 2035 A Programming Hw/Sw Systems Fall problems, 8 pages Final Exam 8 December 2014
Instructions: This is a closed book, closed note exam. Calculators are not permitted. If you have a question, raise your hand and I will come to you. Please work the exam in pencil and do not separate
More informationECE 2035 Programming HW/SW Systems Spring problems, 6 pages Exam Three 10 April 2013
Instructions: This is a closed book, closed note exam. Calculators are not permitted. If you have a question, raise your hand and I will come to you. Please work the exam in pencil and do not separate
More informationCOMPUTER ORGANIZATION AND DESIGN
COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface 5 th Edition Chapter 3 Arithmetic for Computers Arithmetic for Computers Operations on integers Addition and subtraction Multiplication
More informationAnne Bracy CS 3410 Computer Science Cornell University. See P&H Chapter: , , Appendix B
Anne Bracy CS 3410 Computer Science Cornell University The slides are the product of many rounds of teaching CS 3410 by Professors Weatherspoon, Bala, Bracy, and Sirer. See P&H Chapter: 2.16-2.20, 4.1-4.4,
More informationComputer Organization and Structure. Bing-Yu Chen National Taiwan University
Computer Organization and Structure Bing-Yu Chen National Taiwan University Instructions: Language of the Computer Operations and Operands of the Computer Hardware Signed and Unsigned Numbers Representing
More information