1 Appendix B Classifying Instruction Set Architecture Memory addressing mode Operations in the instruction set Control flow instructions Instruction format.

Slides:



Advertisements
Similar presentations
Review of the MIPS Instruction Set Architecture. RISC Instruction Set Basics All operations on data apply to data in registers and typically change the.
Advertisements

CPE 631: Instruction Set Principles and Examples Electrical and Computer Engineering University of Alabama in Huntsville Aleksandar Milenkovic,
1 Lecture 3: Instruction Set Architecture ISA types, register usage, memory addressing, endian and alignment, quantitative evaluation.
Lecture 3: Instruction Set Principles Kai Bu
INSTRUCTION SET ARCHITECTURES
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.
Recap Measuring and reporting performance Quantitative principles Performance vs Cost/Performance.
1 Registers and MAL - Part I. Motivation So far there are some details that we have ignored instructions can have different formats most computers have.
Informationsteknologi Saturday, September 29, 2007 Computer Architecture I - Class 41 Today’s class More assembly language programming.
COMP381 by M. Hamdi 1 Instruction Set Architectures.
Computer Architecture
Computer Architecture Lecture 5 Design Decisions for a 64-bit RISC Architecture Source of almost all Slide: Text Book.
CIS429/529 ISA - 1 Instruction Set Architectures Classification Addressing Modes Types of Instructions Encoding Instructions MIPS64 Instruction Set.
Classifying Instruction Set Architectures
Rung-Bin Lin Chapter 2:Instruction Set Principles and Examples2-1 Chapter 2. Instruction Set Principles and Examples Topics –Present a taxonomy of instruction.
RISC Concepts, MIPS ISA and the Mini–MIPS project
Topics covered: ARM Instruction Set Architecture CSE 243: Introduction to Computer Architecture and Hardware/Software Interface.
Classifying Instruction Set Architectures
1 RISC Machines l RISC system »instruction –standard, fixed instruction format –single-cycle execution of most instructions –memory access is available.
Pentium Addressing Modes
ECE 232 L5 Assembl.1 Adapted from Patterson 97 ©UCBCopyright 1998 Morgan Kaufmann Publishers ECE 232 Hardware Organization and Design Lecture 5 MIPS Assembly.
Some material taken from Assembly Language for x86 Processors by Kip Irvine © Pearson Education, 2010 Slides revised 2/2/2014 by Patrick Kelley.
Instruction Set Architecture
1 Copyright © 2011, Elsevier Inc. All rights Reserved. Appendix A Authors: John Hennessy & David Patterson.
CET 520/ Gannod1 The MIPS Architecture Section 2.12.
Dr Mohamed Menacer College of Computer Science and Engineering Taibah University CS-334: Computer.
Memory and Addressing How and Where Information is Stored.
Computer Architecture Instruction Set Architecture Lynn Choi Korea University.
Classifying GPR Machines TypeNumber of Operands Memory Operands Examples Register- Register 30 SPARC, MIPS, etc. Register- Memory 21 Intel 80x86, Motorola.
1 (Based on text: David A. Patterson & John L. Hennessy, Computer Organization and Design: The Hardware/Software Interface, 3 rd Ed., Morgan Kaufmann,
1 Appendix A: Instruction Set Principles and Examples Classifying Instruction Set Architecture Memory addressing mode Operations in the instruction set.
1. 2 Instructions: Words of the language understood by CPU Instruction set: CPU’s vocabulary Instruction Set Architecture (ISA): CPU’s vocabulary together.
Instruction Set Architecture The portion of the machine visible to the programmer Issues: Internal storage model Addressing modes Operations Operands Encoding.
ARM (Advanced RISC Machine; initially Acorn RISC Machine) Load/store architecture 65 instructions (all fixed length – one word each = 32 bits) 16 registers.
Crosscutting Issues: The Rôle of Compilers Architects must be aware of current compiler technology Compiler Architecture.
Csci 136 Computer Architecture II – Summary of MIPS ISA Xiuzhen Cheng
Lecture 04: Instruction Set Principles Kai Bu
 1998 Morgan Kaufmann Publishers MIPS arithmetic All instructions have 3 operands Operand order is fixed (destination first) Example: C code: A = B +
CS 211: Computer Architecture Lecture 2 Instructor: Morris Lancaster.
Chapter 10 Instruction Sets: Characteristics and Functions Felipe Navarro Luis Gomez Collin Brown.
Machine Instructions Instruction Formats. Machine Instructions u Internal Signals in computer have high and low voltages which represent values 0 and.
What is a program? A sequence of steps
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.
Arrays in MIPS Assembly Computer Organization and Assembly Language: Module 6.
Instruction Sets: Characteristics and Functions  Software and Hardware interface Machine Instruction Characteristics Types of Operands Types of Operations.
Instruction Set Principles
Computer Architecture Instruction Set Architecture
6/16/2018 CIS-550 Advanced Computer Architecture Lecture 4: ISA Tradeoffs (Continued) and MIPS ISA Dr. Muhammad Abid DCIS, PIEAS Spring
Computer Architecture Principles Dr. Mike Frank
RISC Concepts, MIPS ISA Logic Design Tutorial 8.
William Stallings Computer Organization and Architecture 8th Edition
Lecture 04: Instruction Set Principles
Appendix A Classifying Instruction Set Architecture
MIPS Instructions.
The University of Adelaide, School of Computer Science
Instruction encoding The ISA defines Format = Encoding
Classification of instructions
Chapter 2. Instruction Set Principles and Examples
Evolution of ISA’s ISA’s have changed over computer “generations”.
COMS 361 Computer Organization
Instruction Set Principles
Dr Hao Zheng Computer Sci. & Eng. U of South Florida
Evolution of ISA’s ISA’s have changed over computer “generations”.
Lecture 4: Instruction Set Design/Pipelining
Presentation transcript:

1 Appendix B Classifying Instruction Set Architecture Memory addressing mode Operations in the instruction set Control flow instructions Instruction format CDA5155 Spring, 2007, Peir / University of Florida

2 Classifying Architectures One important classification scheme is by the type of addressing modes supported. –Stack –Stack architecture: Operands implicitly on top of a stack. (Early machines, Intel floating-point.) –Accumulator –Accumulator architecture: One operand is implicitly an accumulator (a special register). (Early machs.) –General-purpose register –General-purpose register architecture: Operands may be any of a large (typically 10s-100s) # of registers. Register-memory architectures: One op may be memory. Load-store architectures: All ops are registers, except in special load and store instructions.

3 Four Architecture Classes Assembly for C:=A+B :

4 A further classification is by the maximum number of operands, and # that can be memory: e.g., –2-operand (e.g. a += b) src/dest(reg), src(reg) src/dest(reg), src(mem)IBM 360, x86, 68k src/dest(mem), src(mem) VAX –3-operand (e.g. a = b+c) dest(reg), src1(reg), src2(reg) MIPS, PPC, SPARC, &c. dest(reg), src1(reg), src2(mem) IBM 370 dest(mem), src1(mem), src2(mem)IBM 370, VAX Number of Operands

5 Endians & Alignment Word-aligned word at byte address 4. Byte-aligned (non-aligned) word, at byte address 1. 2 Halfword-aligned word at byte address 2. Increasing byte address 0 (LSB)123 (MSB) 210 (LSB) Little-endian byte order (least-significant byte “first”). Big-endian byte order (most-significant byte “first”). word

6 Addressing Modes In example assembly syntax in middle column, ( ) indicates memory access. (A typical syntax.) In RTL syntax on right, [ ] denotes accessing a member of an array, Register or Memory.

7 Addressing Mode Usage 3 SPEC89 on VAX

8 Displacement Distribution SPEC CPU2000 on Alpha Sign bit is not counted

9 Use of Immediate Operand SPEC CPU2000 on Alpha

10 Distribution of Immediate SPEC CPU2000 on Alpha Sign bit is not counted

11 Instruction Type (Same as B.12 in the 4th Edition)

12 Instruction Distribution (Same as Fig. 2.16) (5 SPECint92)

13 Control Flow Instructions Four basic types: –(Conditional) branches –(Unconditional) jumps –Procedure calls –Procedure returns Control flow addressing modes: –Often PC-relative (PC + displacement). Relocatable. –Also useful: register indirect jumps (reg. has addr.). Uses: Procedure returns Case / switch statements Virtual functions / methods (abstract class method calls) High-order functions / function pointers Dynamically shared libraries

14 Conditional Branch Options Condition Code (CC) Register –E.g.: X86, ARM, PPC, SPARC, … –ALU ops set condition code flags in the CCR –Branch just checks the flag Condition register –E.g.: Alpha, MIPS –Comparison instruction puts result in a GPR –Branch instruction checks the register Compare & Branch –E.g.: PA-RISC, VAX –Compare & branch in 1 instruction.

15 Procedure Calling Conventions Two major calling conventions: –Caller saves: Before the call, procedure caller saves registers that will be needed later, even if callee did not use them –Callee saves: Inside the call, called procedure saves registers that it will overwrite Can be more efficient if many small procedures Many architectures use a combination of schemes: –E.g., MIPS: Some registers caller-saves, some callee- saves

16 Three Classes of Control Instructions SPEC CPU2000 on Alpha

17 Branch Distance Distribution SPEC CPU2000 on Alpha

18 Branch Comparison Types SPEC CPU2000 on Alpha

19 Encoding An Instruction Set

20 MIPS Architecture RISC, load-store architecture, simple address 32-bit instructions, fixed format bit GPRs, R0-R31. –Really, only 31 – R0 is just a constant bit FPRs, F0-F31 –Can hold 32-bit floats also (with other ½ unused). –“SIMD” extensions operate on more floats in 1 FPR A few special registers –Floating-point status register Load/store 8-, 16-, 32-, 64-bit integers –All sign-extended to fill 64-bit GPR –Also 32- bit floats/doubles

21 MIPS Addressing Modes Register (arith./logical ops only) Immediate (arith./logical only) & Displacement (load/stores only) –16-bit immediate / offset field –Register indirect: use 0 as displacement offset –Direct (absolute): use R0 as displacement base Byte-addressed memory, 64-bit address Software-settable big-endian/little-endian flag Alignment required

22 Inst. Format: I-type Instructions

23 Inst. Format: R-type Instructions

24 Inst. Format: J-type Instructions

25 MIPS Instruction Set Go through Figures B in textbook Branch and Jump Addresses –PC-relative addressing: (PC+4) wordBranch target address = (PC+4) + (Displacement || “00”); Note instead of PC, (PC+4) for hardware convenience and the two zeros is added due to word displacement. –Jump (limited to 256MB range): (Upper 4 bits of Current PC) || (26-bits address in Jump) || (“00”) –Long Jump: Jump register: save 32-bit target address in register