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.

Slides:



Advertisements
Similar presentations
CH10 Instruction Sets: Characteristics and Functions
Advertisements

1 ECE462/562 ISA and Datapath Review Ali Akoglu. 2 Instruction Set Architecture A very important abstraction –interface between hardware and low-level.
Computer Organization and Assembly Languages Yung-Yu Chuang
IA-32 Processor Architecture
TK 2633 Microprocessor & Interfacing Lecture 3: Introduction to 8085 Assembly Language Programming (2) 1 Prepared By: Associate Prof. Dr Masri Ayob.
1 ICS 51 Introductory Computer Organization Fall 2006 updated: Oct. 2, 2006.
1 Lecture 5: Procedures Assembly Language for Intel-Based Computers, 4th edition Kip R. Irvine.
S. Barua – CPSC 440 CHAPTER 2 INSTRUCTIONS: LANGUAGE OF THE COMPUTER Goals – To get familiar with.
Assembly Language for Intel-Based Computers Chapter 2: IA-32 Processor Architecture Kip Irvine.
Microprocessors Introduction to ia32 Architecture Jan 31st, 2002.
Informationsteknologi Friday, November 16, 2007Computer Architecture I - Class 111 Today’s class Instruction set architecture.
ICS312 Set 3 Pentium Registers. Intel 8086 Family of Microprocessors All of the Intel chips from the 8086 to the latest pentium, have similar architectures.
The ISA Level The Instruction Set Architecture (ISA) is positioned between the microarchtecture level and the operating system level.  Historically, this.
Princess Sumaya Univ. Computer Engineering Dept. Chapter 2:
An Introduction to IA-32 Processor Architecture Eddie Lopez CSCI 6303 Oct 6, 2008.
CEG 320/520: Computer Organization and Assembly Language ProgrammingIntel Assembly 1 Intel IA-32 vs Motorola
Assembly Language for Intel-Based Computers, 4 th Edition Chapter 2: IA-32 Processor Architecture (c) Pearson Education, All rights reserved. You.
The Pentium Processor.
The Pentium Processor Chapter 3 S. Dandamudi To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer,
The Pentium Processor Chapter 3 S. Dandamudi.
Machine Instruction Characteristics
Intel Pentium II Processor Brent Perry Pat Reagan Brian Davis Umesh Vemuri.
Low Level Programming Lecturer: Duncan Smeed Overview of IA-32 Part 1.
Fall 2012 Chapter 2: x86 Processor Architecture. Irvine, Kip R. Assembly Language for x86 Processors 6/e, Chapter Overview General Concepts IA-32.
Classifying GPR Machines TypeNumber of Operands Memory Operands Examples Register- Register 30 SPARC, MIPS, etc. Register- Memory 21 Intel 80x86, Motorola.
The ISA Level The Instruction Set Architecture (ISA) is positioned between the microarchtecture level and the operating system level.  Historically, this.
The x86 Architecture Lecture 15 Fri, Mar 4, 2005.
IA32 (Pentium) Processor Architecture. Processor modes: 1.Protected (mode we will study) – 32-bit mode – 32-bit (4GB) address space 2.Virtual 8086 modes.
Assembly תרגול 5 תכנות באסמבלי. Assembly vs. Higher level languages There are NO variables’ type definitions.  All kinds of data are stored in the same.
Computer Architecture and Organization
1 ICS 51 Introductory Computer Organization Fall 2009.
Overview of Processor Techniques A brief look at CDA 3101 and CDA 5155.
Assembly Language for x86 Processors 7th Edition Chapter 13: High-Level Language Interface (c) Pearson Education, All rights reserved. You may modify.
Microprocessors The ia32 User Instruction Set Jan 31st, 2002.
26-Nov-15 (1) CSC Computer Organization Lecture 6: Pentium IA-32.
Computer Architecture EKT 422
Oct. 25, 2000Systems Architecture I1 Systems Architecture I (CS ) Lecture 9: Alternative Instruction Sets * Jeremy R. Johnson Wed. Oct. 25, 2000.
Introduction to MMX, XMM, SSE and SSE2 Technology
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.
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.
Instruction Sets. Instruction set It is a list of all instructions that a processor can execute. It is a list of all instructions that a processor can.
Introduction to Intel IA-32 and IA-64 Instruction Set Architectures.
Assembly Language Addressing Modes. Introduction CISC processors usually supports more addressing modes than RISC processors. –RISC processors use the.
Computer Architecture. Instruction Set “The collection of different instructions that the processor can execute it”. Usually represented by assembly codes,
Chapter Overview General Concepts IA-32 Processor Architecture
Assembly language.
IA32 Processors Evolutionary Design
x86 Processor Architecture
Other Processors.
Basic Microprocessor Architecture
Basics Of X86 Architecture
University of Gujrat Department of Computer Science
COAL Chapter 1,2,3.
MMX Multi Media eXtensions
CS170 Computer Organization and Architecture I
Introduction to Intel IA-32 and IA-64 Instruction Set Architectures
CS 301 Fall 2002 Computer Organization
ECE232: Hardware Organization and Design
MIPS Procedure Calls CSE 378 – Section 3.
Week 2: Buffer Overflow Part 1.
Computer Instructions
Computer Architecture CST 250
Introduction to Microprocessor Programming
CPU Structure CPU must:
Computer Architecture and System Programming Laboratory
Chapter 10 Instruction Sets: Characteristics and Functions
Presentation transcript:

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.

ARM Advanced RISC Machine The major processor for mobile and embedded electronics, like iPad Simple, low power, low cost

ARM One of the most interesting features is the conditional execution. That is, an instruction will execute if some condition is true, otherwise it will not do anything (turned into a nop).

ARM A set of flags, showing the relation of two numbers : gt, equal, lt. cmp Ri, Rj # set the flags depending on the values in Ri and Rj subgt Ri, Ri, Rj # i = i – j if flag is gt sublt Ri, Ri, Rj # i = i – j if flag is lt bne Label # goto Label if flag is not equal

ARM How to implement while (i != j) { if (i > j) i -= j; else }

ARM In MIPS, assume i is in $s0, j in $s1: Loop: beq $s0, $s1, Done slt $t0, $s0, $s1 beq $t0, $0, L1 sub $s0, $s0, $s1 j Loop L1: sub $s1, $s1, $s0 L2: j Loop

ARM In ARM, Loop: cmp Ri, Rj subgt Ri, Ri, Rj sublt Rj, Rj, Ri bne Loop

ARM Discussion: Given the MIPS hardware setup, can we support conditional execution?

Introduction to Intel IA-32 and IA-64 Instruction Set Architectures

History 5/4/2019 9/27/2007 11:23:26 PM week06-3.ppt CDA3100 week06-3.ppt

Recent Intel Processors 5/4/2019 Recent Intel Processors The Intel® Pentium® 4 Processor Family (2000-2006) The Intel® Xeon® Processor (2001-2006) The Intel® Pentium® M Processor (2003-Current) The Intel® Pentium® Processor Extreme Edition (2005-2007) The Intel® Core™ Duo and Intel® Core™ Solo Processors (2006-Current) The Intel® Xeon® Processor 5100 Series and Intel® Core™2 Processor Family (2006-Current) 9/27/2007 11:23:26 PM week06-3.ppt CDA3100 week06-3.ppt

History 5/4/2019 9/27/2007 11:23:27 PM week06-3.ppt CDA3100 week06-3.ppt

Recent Intel Processors 5/4/2019 Recent Intel Processors 9/27/2007 11:23:27 PM week06-3.ppt CDA3100 week06-3.ppt

Intel Core 2 Duo Processors 5/4/2019 Intel Core 2 Duo Processors 9/27/2007 11:23:28 PM week06-3.ppt CDA3100 week06-3.ppt

Intel Core 2 Quad Processors 5/4/2019 Intel Core 2 Quad Processors 9/27/2007 11:23:28 PM week06-3.ppt CDA3100 week06-3.ppt

Bit and Byte Ordering 5/4/2019 9/27/2007 11:23:29 PM week06-3.ppt CDA3100 week06-3.ppt

Intel Assembly Each instruction is represented by 5/4/2019 Intel Assembly Each instruction is represented by Where label presents the line A mnemonic is a reserved name for a class of instruction opcodes which have the same function. The operands argument1, argument2, and argument3 are optional. There may be from zero to three operands, depending on the instruction 9/27/2007 11:23:29 PM week06-3.ppt CDA3100 week06-3.ppt

Memory Modes 5/4/2019 9/27/2007 11:23:30 PM week06-3.ppt CDA3100 week06-3.ppt

Addressing The processors use byte addressing 5/4/2019 Addressing The processors use byte addressing Intel processors support segmented addressing Each address is specified by a segment register and byte address within the segment 9/27/2007 11:23:30 PM week06-3.ppt CDA3100 week06-3.ppt

5/4/2019 9/27/2007 11:23:30 PM week06-3.ppt CDA3100 week06-3.ppt

Intel Registers 5/4/2019 9/27/2007 11:23:31 PM week06-3.ppt CDA3100 week06-3.ppt

Basic Program Execution Registers 5/4/2019 Basic Program Execution Registers General purpose registers There are eight registers (note that they are not quite general purpose as some instructions assume certain registers) Segment registers They define up to six segment selectors EIP register – Effective instruction pointer EFLAGS – Program status and control register 9/27/2007 11:23:31 PM week06-3.ppt CDA3100 week06-3.ppt

General Purpose and Segment Registers 5/4/2019 General Purpose and Segment Registers 9/27/2007 11:23:32 PM week06-3.ppt CDA3100 week06-3.ppt

General Purpose Registers 5/4/2019 General Purpose Registers EAX — Accumulator for operands and results data EBX — Pointer to data in the DS segment ECX — Counter for string and loop operations EDX — I/O pointer ESI — Pointer to data in the segment pointed to by the DS register; source pointer for string operations EDI — Pointer to data (or destination) in the segment pointed to by the ES register; destination pointer for string operations ESP — Stack pointer (in the SS segment) EBP — Pointer to data on the stack (in the SS segment) CDA3100 week06-3.ppt

Alternative General Purpose Register Names 5/4/2019 Alternative General Purpose Register Names CDA3100 week06-3.ppt

5/4/2019 Registers in IA-64 CDA3100 week06-3.ppt

5/4/2019 Segment Registers CDA3100 week06-3.ppt

Operand Addressing Immediate addressing Register addressing 5/4/2019 Operand Addressing Immediate addressing Maximum value allowed varies among instructions and it can be 8-bit, 16-bit, or 32-bit Register addressing Register addressing depends on the mode (IA-32 or IA-64) CDA3100 week06-3.ppt

5/4/2019 Register Addressing CDA3100 week06-3.ppt

Memory Operand Memory operand is specified by a segment and offset 5/4/2019 Memory Operand Memory operand is specified by a segment and offset CDA3100 week06-3.ppt

Offset Displacement - An 8-, 16-, or 32-bit value. 5/4/2019 Offset Displacement - An 8-, 16-, or 32-bit value. Base - The value in a general-purpose register. Index — The value in a general-purpose register. Scale factor — A value of 2, 4, or 8 that is multiplied by the index value. CDA3100 week06-3.ppt

5/4/2019 Effective Address CDA3100 week06-3.ppt

Effective Address Common combinations Displacement Base 5/4/2019 Effective Address Common combinations Displacement Base Base + displacement (Index * scale) + displacement Base + index + displacement Base + (Index * scale) + displacement CDA3100 week06-3.ppt

Addressing Mode Encoding 5/4/2019 Addressing Mode Encoding CDA3100 week06-3.ppt

Fundamental Data Types 5/4/2019 Fundamental Data Types CDA3100 week06-3.ppt

5/4/2019 Example CDA3100 week06-3.ppt

Pointer Data Types Near pointer Far pointer 5/4/2019 CDA3100 week06-3.ppt

5/4/2019 128-Bit SIMD Data Types CDA3100 week06-3.ppt

5/4/2019 BCD Integers Intel also supports BCD integers, where each digit (0-9) is represented by 4 bits CDA3100 week06-3.ppt

Floating Point Numbers 5/4/2019 Floating Point Numbers CDA3100 week06-3.ppt

General Purpose Instructions 5/4/2019 General Purpose Instructions Data transfer instructions CDA3100 week06-3.ppt

Data Transfer Instructions 5/4/2019 Data Transfer Instructions CDA3100 week06-3.ppt

Data Transfer Instructions 5/4/2019 Data Transfer Instructions CDA3100 week06-3.ppt

Binary Arithmetic Instructions 5/4/2019 Binary Arithmetic Instructions CDA3100 week06-3.ppt

Decimal Arithmetic Instructions 5/4/2019 Decimal Arithmetic Instructions CDA3100 week06-3.ppt

5/4/2019 Logical Instructions CDA3100 week06-3.ppt

Shift and Rotate Instructions 5/4/2019 Shift and Rotate Instructions CDA3100 week06-3.ppt

Bit and Byte Instructions 5/4/2019 Bit and Byte Instructions CDA3100 week06-3.ppt

Bit and Byte Instructions 5/4/2019 Bit and Byte Instructions CDA3100 week06-3.ppt

Control Transfer Instructions 5/4/2019 Control Transfer Instructions CDA3100 week06-3.ppt

5/4/2019 CDA3100 week06-3.ppt

5/4/2019 String Instructions CDA3100 week06-3.ppt

5/4/2019 I/O Instructions These instructions move data between the processor’s I/O ports and a register or memory CDA3100 week06-3.ppt

Enter and Leave Instructions 5/4/2019 Enter and Leave Instructions These instructions provide machine-language support for procedure calls in block structured languages CDA3100 week06-3.ppt

Segment Register Instructions 5/4/2019 Segment Register Instructions The segment register instructions allow far pointers (segment addresses) to be loaded into the segment registers CDA3100 week06-3.ppt

5/4/2019 Procedure Call Types The processor supports procedure calls in the following two different ways: CALL and RET instructions. ENTER and LEAVE instructions, in conjunction with the CALL and RET instructions CDA3100 week06-3.ppt

5/4/2019 Stack CDA3100 week06-3.ppt

Calling Procedures Using CALL and RET 5/4/2019 Calling Procedures Using CALL and RET Near call (within the current code segment) Near return CDA3100 week06-3.ppt

Far Call and Far Return Far call Far return 5/4/2019 CDA3100 week06-3.ppt

Stack During Call and Return 5/4/2019 Stack During Call and Return CDA3100 week06-3.ppt

Parameter Passing Passing parameters on the stack 5/4/2019 Parameter Passing Passing parameters through the general-purpose registers Can pass up to six parameters by copying the parameters to the general-purpose registers Passing parameters on the stack Stack can be used to pass a large number of parameters and also return a large number of values Passing parameters in an argument list Place the parameters in an argument list A pointer to the argument list can then be passed to the called procedure CDA3100 week06-3.ppt

Saving Procedure State Information 5/4/2019 Saving Procedure State Information The processor does not save general purpose registers A calling procedure should explicitly save the values in any of the general-purpose registers that it will need when it resumes execution after a return One can use PUSHA and POPA to save and restore all the general purpose registers (except ESP) CDA3100 week06-3.ppt

Calls to Other Privilege Levels 5/4/2019 Calls to Other Privilege Levels CDA3100 week06-3.ppt

Stack For Calling and Called Procedure 5/4/2019 Stack For Calling and Called Procedure CDA3100 week06-3.ppt

Procedure Calls For Block-structured Languages 5/4/2019 Procedure Calls For Block-structured Languages ENTER and LEAVE instructions automatically create and release, respectively, stack frames for called procedures The ENTER instruction creates a stack frame compatible with the scope rules typically used in block-structured languages The LEAVE instruction, which does not have any operands, reverses the action of the previous ENTER instruction CDA3100 week06-3.ppt

5/4/2019 ENTER Instruction CDA3100 week06-3.ppt

IA-32 and IA-64 Instruction Format 5/4/2019 IA-32 and IA-64 Instruction Format CDA3100 week06-3.ppt

Examples of Instruction Formats 5/4/2019 Examples of Instruction Formats CDA3100 week06-3.ppt

5/4/2019 ADD Instructions CDA3100 week06-3.ppt

5/4/2019 ADD Instructions CDA3100 week06-3.ppt

Add Instruction Description 5/4/2019 Add Instruction Description CDA3100 week06-3.ppt

SCAS/SCASB/SCASW/SCASD—Scan String 5/4/2019 SCAS/SCASB/SCASW/SCASD—Scan String CDA3100 week06-3.ppt

SIMD in IA-32 and IA-64 To improve performance, Intel adopted SIMD (single instruction multiple data) instructions MMX technology (Pentium II processor family) SSE 10/7/2007 9:37:48 PM week07-1.ppt

MMX MMX introduced Eight new 64-bit data registers, called MMX registers Three new packed data types: 64-bit packed byte integers (signed and unsigned) 64-bit packed word integers (signed and unsigned) 64-bit packed double word integers (signed and unsigned) Instructions that support the new data types 10/7/2007 9:37:59 PM week07-1.ppt

MMX Packed integer types allow operations to be applied on multiple integers 10/7/2007 9:38:00 PM week07-1.ppt

SSE SSE introduced eight 128-bit data registers (called XMM registers) In 64-bit modes, they are available as 16 64-bit registers The 128-bit packed single-precision floating-point data type, which allows four single-precision operations to be performed simultaneously They can be used in parallel with MMX registers 10/7/2007 9:38:04 PM week07-1.ppt

SSE Execution Environment 10/7/2007 9:38:04 PM week07-1.ppt

XMM Registers In certain modes, additional eight 64 bit registers are also available (XMM8 - XMM15) 10/7/2007 9:38:05 PM week07-1.ppt

SSE Data Type SSE extensions introduced one new data type 128-Bit Packed Single-Precision Floating-Point Data Type SSE 2 introduced five data types 10/7/2007 9:38:05 PM week07-1.ppt

Packed and Scalar Double-Precision Floating-Point Operations 10/7/2007 9:38:07 PM week07-1.ppt

SSE Instructions SSE Data Transfer Instructions 10/7/2007 9:38:10 PM week07-1.ppt

SSE Packed Arithmetic Instructions 10/7/2007 9:38:11 PM week07-1.ppt

SSE Packed Arithmetic Instructions 10/7/2007 9:38:12 PM week07-1.ppt

SSE Comparison, Logical, and Shuffle Instructions 10/7/2007 9:38:12 PM week07-1.ppt

SSE2 Instructions 10/7/2007 9:38:14 PM week07-1.ppt

SSE2 128-Bit SIMD Integer Instructions 10/7/2007 9:38:14 PM week07-1.ppt

Horizontal Addition/Subtraction 10/7/2007 9:38:16 PM week07-1.ppt

Horizontal Data Movements 10/7/2007 9:38:17 PM week07-1.ppt

Conversion Between Different Types 10/7/2007 9:38:17 PM week07-1.ppt

Using MMX/SSE Instructions in C/C++ Programs Data types for MMX and SSE instructions These types are defined in C/C++ /usr/lib/gcc/i386-redhat-linux/3.4.3/include/mmintrin.h /usr/lib/gcc/i386-redhat-linux/3.4.3/include/pmmintrin.h /usr/lib/gcc/i386-redhat-linux/3.4.3/include/emmintrin.h 10/7/2007 9:38:18 PM week07-1.ppt

Built-in Functions Built-in functions are C-style functional interfaces to MMX/SSE instructions See http://developer.apple.com/documentation/DeveloperTools/gcc-4.0.1/gcc/X86-Built_002din-Functions.html 10/7/2007 9:38:29 PM week07-1.ppt

Intel MMX/SSE Intrinsics Intrinsics are C/C++ functions and procedures for MMX/SSE instructions With instrinsics, one can program using these instructions indirectly using the provided intrinsics In general, there is a one-to-one correspondence between MMX/SSE instructions and intrinsics 10/7/2007 10:01:41 PM week07-1.ppt

GCC Inline Assembly GCC inline assembly allows us to insert inline functions written in assembly GCC provides the utility to specify input and output operands as C variables Basic inline Extended inline assembly 10/7/2007 10:01:43 PM week07-1.ppt

GCC Inline Assembly Some examples 10/7/2007 10:03:01 PM week07-1.ppt

GCC Inline Assembly 10/7/2007 10:03:04 PM week07-1.ppt

GCC Inline Assembly 10/7/2007 10:03:06 PM week07-1.ppt