Oct. 25, 2000Systems Architecture I1 Systems Architecture I (CS 281-001) Lecture 9: Alternative Instruction Sets * Jeremy R. Johnson Wed. Oct. 25, 2000.

Slides:



Advertisements
Similar presentations
1 Lecture 3: Instruction Set Architecture ISA types, register usage, memory addressing, endian and alignment, quantitative evaluation.
Advertisements

EECC551 - Shaaban #1 Lec # 2 Fall Instruction Set Architecture (ISA) “... the attributes of a [computing] system as seen by the programmer,
CS1104 – Computer Organization PART 2: Computer Architecture Lecture 5 MIPS ISA & Assembly Language Programming.
ELEN 468 Advanced Logic Design
Systems Architecture Lecture 5: MIPS Instruction Set
Lec 9Systems Architecture1 Systems Architecture Lecture 9: Assemblers, Linkers, and Loaders Jeremy R. Johnson Anatole D. Ruslanov William M. Mongan Some.
1 Instructions: Language of the Machine More primitive than higher level languages e.g., no sophisticated control flow Very restrictive e.g., MIPS Arithmetic.
COMP381 by M. Hamdi 1 Instruction Set Architectures.
MIPS Architecture CPSC 321 Computer Architecture Andreas Klappenecker.
S. Barua – CPSC 440 CHAPTER 2 INSTRUCTIONS: LANGUAGE OF THE COMPUTER Goals – To get familiar with.
Recap.
Lecture 5 Sept 14 Goals: Chapter 2 continued MIPS assembly language instruction formats translating c into MIPS - examples.
1  1998 Morgan Kaufmann Publishers Chapter 3 Text in blue is by N. Guydosh Updated 1/27/04 Instructions: Language of the Machine.
Computer Organization Instruction Sets Reading: Portions of these slides are derived from: Textbook figures © 1998 Morgan Kaufmann Publishers all.
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE Computer Organization Lecture 3 - Instruction.
1  2004 Morgan Kaufmann Publishers Chapter 2. 2  2004 Morgan Kaufmann Publishers Instructions: Language of the Machine We’ll be working with the MIPS.
ECE 232 L5 Assembl.1 Adapted from Patterson 97 ©UCBCopyright 1998 Morgan Kaufmann Publishers ECE 232 Hardware Organization and Design Lecture 5 MIPS Assembly.
©UCB CPSC 161 Lecture 5 Prof. L.N. Bhuyan
Assembly Language for Intel-Based Computers, 4 th Edition Chapter 2: IA-32 Processor Architecture (c) Pearson Education, All rights reserved. You.
Linked Lists in MIPS Let’s see how singly linked lists are implemented in MIPS on MP2, we have a special type of doubly linked list Each node consists.
1  2004 Morgan Kaufmann Publishers Instructions: bne $t4,$t5,Label Next instruction is at Label if $t4≠$t5 beq $t4,$t5,Label Next instruction is at Label.
Lec 9Systems Architecture1 Systems Architecture Lecture 10: Alternative Instruction Sets Jeremy R. Johnson Anatole D. Ruslanov William M. Mongan Some or.
Mohamed Younis CMCS 411, Computer Architecture 1 CMCS Computer Architecture Lecture 5 Addressing Mode & Architectural Design Guidelines February.
June 18, 2001Systems Architecture II1 Systems Architecture II Systems Architecture I Review * Jeremy R. Johnson June 18, 2001 * Most figures from Computer.
1 (Based on text: David A. Patterson & John L. Hennessy, Computer Organization and Design: The Hardware/Software Interface, 3 rd Ed., Morgan Kaufmann,
1  1998 Morgan Kaufmann Publishers Machine Instructions: Language of the Machine Lowest level of programming, control directly the hardware Assembly instructions.
April 23, 2001Systems Architecture I1 Systems Architecture I (CS ) Lecture 9: Assemblers, Linkers, and Loaders * Jeremy R. Johnson Mon. April 23,
Lec 15Systems Architecture1 Systems Architecture Lecture 15: A Simple Implementation of MIPS Jeremy R. Johnson Anatole D. Ruslanov William M. Mongan Some.
26-Nov-15 (1) CSC Computer Organization Lecture 6: Pentium IA-32.
Small constants are used quite frequently (50% of operands) e.g., A = A + 5; B = B + 1; C = C - 18; Solutions? Why not? put 'typical constants' in memory.
Csci 136 Computer Architecture II – Summary of MIPS ISA Xiuzhen Cheng
 1998 Morgan Kaufmann Publishers MIPS arithmetic All instructions have 3 operands Operand order is fixed (destination first) Example: C code: A = B +
©These slides may be freely used, distributed, and incorporated into other works. 1 Addressing Modes For speed… we want fixed-size instructions, and they.
Chapter 2 CSF 2009 The MIPS Assembly Language. Stored Program Computers Instructions represented in binary, just like data Instructions and data stored.
ECE 15B Computer Organization Spring 2011 Dmitri Strukov Partially adapted from Computer Organization and Design, 4 th edition, Patterson and Hennessy,
EEL5708/Bölöni Lec 8.1 9/19/03 September, 2003 Lotzi Bölöni Fall 2003 EEL 5708 High Performance Computer Architecture Lecture 5 Intel 80x86.
Computer Organization CS224 Fall 2012 Lessons 7 and 8.
EET 4250 Instruction Representation & Formats Acknowledgements: Some slides and lecture notes for this course adapted from Prof. Mary Jane Penn.
MIPS Instructions Instructions: Language of the Machine
Instruction Set Architecture Chapter 3 – P & H. Introduction Instruction set architecture interface between programmer and CPU Good ISA makes program.
Introduction to Intel IA-32 and IA-64 Instruction Set Architectures.
1  1998 Morgan Kaufmann Publishers Instructions: Language of the Machine More primitive than higher level languages e.g., no sophisticated control flow.
May 22, 2000Systems Architecture I1 Systems Architecture I (CS ) Lecture 14: A Simple Implementation of MIPS * Jeremy R. Johnson Mon. May 17, 2000.
1/11/02CSE ISA's part 2 Instruction Set Architectures Part 2 I/O systemInstr. Set Proc. Compiler Operating System Application Digital Design Circuit.
Assembly language.
ELEN 468 Advanced Logic Design
Processor Architecture: Introduction to RISC Datapath (MIPS and Nios II) CSCE 230.
Computer Architecture (CS 207 D) Instruction Set Architecture ISA
Instructions - Type and Format
CS170 Computer Organization and Architecture I
Systems Architecture I (CS ) Lecture 5: MIPS Instruction Set*
Systems Architecture I (CS ) Lecture 16: Exceptions
Systems Architecture Lecture 5: MIPS Instruction Set
Introduction to Intel IA-32 and IA-64 Instruction Set Architectures
Systems Architecture II
The University of Adelaide, School of Computer Science
MIPS Procedure Calls CSE 378 – Section 3.
Rocky K. C. Chang 6 November 2017
Systems Architecture I
Evolution of ISA’s ISA’s have changed over computer “generations”.
Arrays versus Pointers
Evolution of ISA’s ISA’s have changed over computer “generations”.
Systems Architecture I (CS ) Lecture 17: Exceptions
Machine Instructions.
Evolution of ISA’s ISA’s have changed over computer “generations”.
Other Processors Having learnt MIPS, we can learn other major processors. Not going to be able to cover everything; will pick on the interesting aspects.
Systems Architecture I (CS ) Lecture 5: MIPS Instruction Set*
Evolution of ISA’s ISA’s have changed over computer “generations”.
Presentation transcript:

Oct. 25, 2000Systems Architecture I1 Systems Architecture I (CS ) Lecture 9: Alternative Instruction Sets * Jeremy R. Johnson Wed. Oct. 25, 2000 *This lecture was derived from material in the text (sec ). All figures from Computer Organization and Design: The Hardware/Software Approach, Second Edition, by David Patterson and John Hennessy, are copyrighted material (COPYRIGHT 1998 MORGAN KAUFMANN PUBLISHERS, INC. ALL RIGHTS RESERVED).

Oct. 25, 2000Systems Architecture I2 Introduction Objective: To compare MIPS to several alternative instruction set architectures and to better understand the design decisions made in MIPS MIPS is an example of a RISC (Reduced Instruction Set Computer) architecture as compared to a CISC (Complex Instruction Set Computer) architecture MIPS trades complexity of instructions and hence greater number of instructions, for a simpler implementation and smaller clock cycle or reduced number of clocks per instruction Topics –RISC vs. CISC –PowerPC –Intel 80x86 –Historical survey

Oct. 25, 2000Systems Architecture I3 Characteristics of MIPS Load/Store architecture General purpose register machine (32 registers) ALU operations have 3 register operands (2 source + 1 dest) 16 bit constants for immediate mode Simple instruction set –simple branch operations (beq, bne) –Use register to set condition (e.g. slt) –operations such as move built, li, blt from existing operations Uniform encoding –All instructions are 32-bits long –Opcode is always in the high-order 6 bits –3 types of instruction formats –register fields in the same place for all formats

Oct. 25, 2000Systems Architecture I4 Design Principles Simplicity favors regularity –uniform instruction length –all ALU operations have 3 register operands –register addresses in the same location for all instruction formats Smaller is faster –register architecture –small number of registers Good design demands good compromises –fixed length instructions and only 16 bit constants –several instruction formats but consistent length Make common cases fast –immediate addressing –16 bit constants –only beq and bne

Oct. 25, 2000Systems Architecture I5 MIPS Addressing Modes Immediate Addressing –16 bit constant from low order bits of instruction –addi $t0, $s0, 4 Register Addressing –add $t0, $s0, $s1 Base Addressing (displacement addressing) –16-bit constant from low order bits of instruction plus base register –lw $t0, 16($sp) PC-Relative Addressing –(PC+4) + 16-bit address (word) from instruction –bne $s0, $s1, Target Pseudodirect Addressing –high order 4 bits of PC+4 concatenated with 26 bit word address - low order 26 bits from instruction shifted 2 bits to the right –j Address

Oct. 25, 2000Systems Architecture I6 PowerPC Similar to MIPS (RISC) Two additional addressing modes –indexed addressing - base register + index register PowerPC: lw $t1, $a0+$s3 MIPS: add $t0, $a0,$s3 lw $t1, 0($t0) –Update addressing - displacement addressing + increment PowerPC: lwu $t0, 4($s3) MIPS: lw $t0, 4($s3) addi $s3, $s3, 4 Additional instructions –separate counter register used for loops –PowerPC: bc Loop, ctr!=0 –MIPS: Loop: addi $t0, $t0, -1 bne $t0, $zero, Loop

Oct. 25, 2000Systems Architecture I7 Characteristics of 80x86 Evolved from 8086 (backward compatible) Register-Memory architecture 8 General purpose registers (evolved) 7 data addressing modes –8 or 32 bit displacement Complex instruction set –Many variants of an instruction –special instructions (move, push, pop, string, decimal) –Use condition codes –Instructions can operate on 8, 16, or 32 bits (mode) changed with prefix Variable length encoding –1-17 bytes, postbyte used to indicate addressing mode when not in opcode

Oct. 25, 2000Systems Architecture I8 Intel 80x86 History and Backward Compatibility 1978 –Intel 8086 (16-bit architecture with dedicated registers) 1980 –Intel 8087 floating point coprocessor (with stack) 1982 –80286 (24-bit address space using elaborate memory mapping and protection model) 1985 –80386 (extends to 32-bit architecture, new instructions, general purpose register usage) –80486, pentium pro (a few extra instructions, but mainly performance enhancements) 1997-present –MMX enhancements, Pentium II, Pentium III, SSE, IA-64

Oct. 25, 2000Systems Architecture I9 80x86 Registers

Oct. 25, 2000Systems Architecture I10 Addressing Modes Register indirect –address in register –can’t use ESP or EBP Based mode with 8 or 32-bit displacement –address is contents of base register plus displacement –can’t use ESP or EBP Base plus scaled index (not in MIPS) –Base + (2 scale  index) –index not ESP Base plus scaled index 8 or 32-bit plus displacement (not in MIPS) –Base + (2 scale  index) + displacement –index not ESP

Oct. 25, 2000Systems Architecture I11 Example Instructions JE name –if equal(condition code) EIP = name, EIP < name < EIP JMP name –EIP = name CALL name –SP = SP - 4; M[SP] = EIP + 5; EIP = name MOVW EBX,[EDI+45] –EBX = M[EDI+45] PUSH ESI –SP = SP - 4; M[SP] = ESI POP EDI –EDI = M[SP]; SP = SP + 4

Oct. 25, 2000Systems Architecture I12 Example Instructions ADD EAX,#6765 –EAX = EAX TEST EDX,#42 –set condition code(flags) with EDX and 42 (logical and) MOVSL –M[EDI] = M[ESI]; EDI = EDI + 4; ESI = ESI + 4

Oct. 25, 2000Systems Architecture I13 80x86 Instruction Encoding

Oct. 25, 2000Systems Architecture I14 Architecture Evolution Accumulator –EDSAC Extended Accumulator (special purpose register) –Intel 8086 General Purpose Register –register-register (CDC 6600, MIPS, SPARC, PowerPC) –register-memory (Intel 80386, IBM 360) –memory-memory (VAX) Alternative –stack –high-level language