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

Slides:



Advertisements
Similar presentations
There are two types of addressing schemes:
Advertisements

Computer Organization and Assembly Languages Yung-Yu Chuang
IA-32 Processor Architecture
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.
CS2422 Assembly Language & System Programming November 28, 2006.
Assembly Language for Intel-Based Computers Chapter 2: IA-32 Processor Architecture Kip Irvine.
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.
Web siteWeb site ExamplesExamples Irvine, Kip R. Assembly Language for Intel-Based Computers, Stack Operations Runtime Stack PUSH Operation POP.
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:
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.
Dr. José M. Reyes Álamo 1.  The 80x86 memory addressing modes provide flexible access to memory, allowing you to easily access ◦ Variables ◦ Arrays ◦
The Pentium Processor Chapter 3 S. Dandamudi To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer,
1 Fundamental of Computer Suthida Chaichomchuen : SCC
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.
The x86 Architecture Lecture 15 Fri, Mar 4, 2005.
Assembly תרגול 5 תכנות באסמבלי. Assembly vs. Higher level languages There are NO variables’ type definitions.  All kinds of data are stored in the same.
1 ICS 51 Introductory Computer Organization Fall 2009.
Microprocessors The ia32 User Instruction Set Jan 31st, 2002.
26-Nov-15 (1) CSC Computer Organization Lecture 6: Pentium IA-32.
Addressing Modes Chapter 6 S. Dandamudi To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer,
Oct. 25, 2000Systems Architecture I1 Systems Architecture I (CS ) Lecture 9: Alternative Instruction Sets * Jeremy R. Johnson Wed. Oct. 25, 2000.
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.
Chapter 2 Parts of a Computer System. 2.1 PC Hardware: Memory.
Compiler Construction Code Generation Activation Records
X86 Assembly Language We will be using the nasm assembler (other assemblers: MASM, as, gas)
Introduction to Intel IA-32 and IA-64 Instruction Set Architectures.
Assembly Language Data Movement Instructions. MOV Instruction Move source operand to destination mov destination, source The source and destination are.
Microprocessors CSE- 341 Dr. Jia Uddin Assistant Professor, CSE, BRAC University Dr. Jia Uddin, CSE, BRAC University.
The Microprocessor & Its Architecture A Course in Microprocessor Electrical Engineering Department Universitas 17 Agustus 1945 Jakarta.
Assembly Language Addressing Modes. Introduction CISC processors usually supports more addressing modes than RISC processors. –RISC processors use the.
Computer Science 516 Intel x86 Overview. Intel x86 Family Eight-bit 8080, 8085 – 1970s 16-bit 8086 – was internally 16 bits, externally 8 bits.
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
Stack Operations Dr. Hadi AL Saadi.
Homework Reading Lab with your assigned section starts next week
Assembly language.
Credits and Disclaimers
IA32 Processors Evolutionary Design
x86 Processor Architecture
Other Processors.
Aaron Miller David Cohen Spring 2011
Introduction to Compilers Tim Teitelbaum
Basic Microprocessor Architecture
A Closer Look at Instruction Set Architectures: Expanding Opcodes
Basics Of X86 Architecture
University of Gujrat Department of Computer Science
Homework Reading Continue work on mp1
Assembly Language for x86 Processors
COAL Chapter 1,2,3.
Introduction to Assembly Language
BIC 10503: COMPUTER ARCHITECTURE
CS170 Computer Organization and Architecture I
CS 301 Fall 2002 Computer Organization
MIPS Procedure Calls CSE 378 – Section 3.
The Microprocessor & Its Architecture
Week 2: Buffer Overflow Part 1.
Computer Architecture CST 250
Machine-Level Programming II: Basics Comp 21000: Introduction to Computer Organization & Systems Instructor: John Barr * Modified slides from the book.
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.
Credits and Disclaimers
Computer Architecture and System Programming Laboratory
Part I Data Representation and 8086 Microprocessors
Chapter 10 Instruction Sets: Characteristics and Functions
Presentation transcript:

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

Dr. Alexey Lugovskoy will be giving a presentation at 4pm this Thursday (Feb 21) in 499 Dirac. After the presentation there will be a brief discussion about the new undergraduate computational biology degree at FSU and Dr. Lugovskoy will answer questions regarding opportunities for employment in this field. Refreshments and pizza will also be provided.

History 11/29/2018 9/27/2007 11:23:26 PM week06-3.ppt CDA3100 week06-3.ppt

Recent Intel Processors 11/29/2018 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 11/29/2018 9/27/2007 11:23:27 PM week06-3.ppt CDA3100 week06-3.ppt

Most Recent Intel Processors 11/29/2018 Most Recent Intel Processors 9/27/2007 11:23:27 PM week06-3.ppt CDA3100 week06-3.ppt

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

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

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

Intel Assembly Each instruction is represented by 11/29/2018 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 11/29/2018 9/27/2007 11:23:30 PM week06-3.ppt CDA3100 week06-3.ppt

Addressing The processors use byte addressing 11/29/2018 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

11/29/2018 9/27/2007 11:23:30 PM week06-3.ppt CDA3100 week06-3.ppt

Intel Registers 11/29/2018 9/27/2007 11:23:31 PM week06-3.ppt CDA3100 week06-3.ppt

Basic Program Execution Registers 11/29/2018 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 11/29/2018 General Purpose and Segment Registers 9/27/2007 11:23:32 PM week06-3.ppt CDA3100 week06-3.ppt

General Purpose Registers 11/29/2018 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 11/29/2018 Alternative General Purpose Register Names CDA3100 week06-3.ppt

11/29/2018 Registers in IA-64 CDA3100 week06-3.ppt

11/29/2018 Segment Registers CDA3100 week06-3.ppt

Operand Addressing Immediate addressing Register addressing 11/29/2018 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

11/29/2018 Register Addressing CDA3100 week06-3.ppt

Memory Operand Memory operand is specified by a segment and offset 11/29/2018 Memory Operand Memory operand is specified by a segment and offset CDA3100 week06-3.ppt

Offset Displacement - An 8-, 16-, or 32-bit value. 11/29/2018 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

11/29/2018 Effective Address CDA3100 week06-3.ppt

Effective Address Common combinations Displacement Base 11/29/2018 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 11/29/2018 Addressing Mode Encoding CDA3100 week06-3.ppt

Fundamental Data Types 11/29/2018 Fundamental Data Types CDA3100 week06-3.ppt

11/29/2018 Example CDA3100 week06-3.ppt

Pointer Data Types Near pointer Far pointer 11/29/2018 CDA3100 week06-3.ppt

11/29/2018 128-Bit SIMD Data Types CDA3100 week06-3.ppt

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

Floating Point Numbers 11/29/2018 Floating Point Numbers CDA3100 week06-3.ppt

General Purpose Instructions 11/29/2018 General Purpose Instructions Data transfer instructions CDA3100 week06-3.ppt

Data Transfer Instructions 11/29/2018 Data Transfer Instructions CDA3100 week06-3.ppt

Data Transfer Instructions 11/29/2018 Data Transfer Instructions CDA3100 week06-3.ppt

Binary Arithmetic Instructions 11/29/2018 Binary Arithmetic Instructions CDA3100 week06-3.ppt

Decimal Arithmetic Instructions 11/29/2018 Decimal Arithmetic Instructions CDA3100 week06-3.ppt

11/29/2018 Logical Instructions CDA3100 week06-3.ppt

Shift and Rotate Instructions 11/29/2018 Shift and Rotate Instructions CDA3100 week06-3.ppt

Bit and Byte Instructions 11/29/2018 Bit and Byte Instructions CDA3100 week06-3.ppt

Bit and Byte Instructions 11/29/2018 Bit and Byte Instructions CDA3100 week06-3.ppt

Control Transfer Instructions 11/29/2018 Control Transfer Instructions CDA3100 week06-3.ppt

11/29/2018 CDA3100 week06-3.ppt

11/29/2018 String Instructions CDA3100 week06-3.ppt

11/29/2018 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 11/29/2018 Enter and Leave Instructions These instructions provide machine-language support for procedure calls in block structured languages CDA3100 week06-3.ppt

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

11/29/2018 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

11/29/2018 Stack CDA3100 week06-3.ppt

Calling Procedures Using CALL and RET 11/29/2018 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 11/29/2018 CDA3100 week06-3.ppt

Stack During Call and Return 11/29/2018 Stack During Call and Return CDA3100 week06-3.ppt

Parameter Passing Passing parameters on the stack 11/29/2018 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 11/29/2018 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 11/29/2018 Calls to Other Privilege Levels CDA3100 week06-3.ppt

Stack For Calling and Called Procedure 11/29/2018 Stack For Calling and Called Procedure CDA3100 week06-3.ppt

Procedure Calls For Block-structured Languages 11/29/2018 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

11/29/2018 ENTER Instruction CDA3100 week06-3.ppt

IA-32 and IA-64 Instruction Format 11/29/2018 IA-32 and IA-64 Instruction Format CDA3100 week06-3.ppt

Examples of Instruction Formats 11/29/2018 Examples of Instruction Formats CDA3100 week06-3.ppt

11/29/2018 ADD Instructions CDA3100 week06-3.ppt

11/29/2018 ADD Instructions CDA3100 week06-3.ppt

Add Instruction Description 11/29/2018 Add Instruction Description CDA3100 week06-3.ppt

SCAS/SCASB/SCASW/SCASD—Scan String 11/29/2018 SCAS/SCASB/SCASW/SCASD—Scan String CDA3100 week06-3.ppt

Next Time SSE Instructions 11/29/2018 Next Time SSE Instructions Brief Introduction to Inline Assembly Programming Using gcc CDA3100 week06-3.ppt