Basics Of X86 Architecture

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

Chapter 3 Instruction Set Architecture Advanced Computer Architecture COE 501.
ISA Issues; Performance Considerations. Testing / System Verilog: ECE385.
1 Lecture 3: Instruction Set Architecture ISA types, register usage, memory addressing, endian and alignment, quantitative evaluation.
RISC / CISC Architecture By: Ramtin Raji Kermani Ramtin Raji Kermani Rayan Arasteh Rayan Arasteh An Introduction to Professor: Mr. Khayami Mr. Khayami.
1 ECE462/562 ISA and Datapath Review Ali Akoglu. 2 Instruction Set Architecture A very important abstraction –interface between hardware and low-level.
10/9: Lecture Topics Starting a Program Exercise 3.2 from H+P Review of Assembly Language RISC vs. CISC.
Pentium 4 and IA-32 ISA ELEC 5200/6200 Computer Architecture and Design, Fall 2006 Lectured by Dr. V. Agrawal Lectured by Dr. V. Agrawal Kyungseok Kim.
CSE378 ISA evolution1 Evolution of ISA’s ISA’s have changed over computer “generations”. A traditional way to look at ISA complexity encompasses: –Number.
COMP3221: Microprocessors and Embedded Systems Lecture 2: Instruction Set Architecture (ISA) Lecturer: Hui Wu Session.
CS 536 Spring Code generation I Lecture 20.
State Machines Timing Computer Bus Computer Performance Instruction Set Architectures RISC / CISC Machines.
RISC. Rational Behind RISC Few of the complex instructions were used –data movement – 45% –ALU ops – 25% –branching – 30% Cheaper memory VLSI technology.
CIS 314 : Computer Organization Lecture 1 – Introduction.
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.
Classifying GPR Machines TypeNumber of Operands Memory Operands Examples Register- Register 30 SPARC, MIPS, etc. Register- Memory 21 Intel 80x86, Motorola.
Memory/Storage Architecture Lab Computer Architecture MIPS Instruction Set Architecture.
Chapter Six Sun SPARC Architecture. SPARC Processor The name SPARC stands for Scalable Processor Architecture SPARC architecture follows the RISC design.
Differences in ISA Instruction length
Oct. 25, 2000Systems Architecture I1 Systems Architecture I (CS ) Lecture 9: Alternative Instruction Sets * Jeremy R. Johnson Wed. Oct. 25, 2000.
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.
Lecture 04: Instruction Set Principles Kai Bu
Chapter 10 Instruction Sets: Characteristics and Functions Felipe Navarro Luis Gomez Collin Brown.
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 LECTURE 3: ISA YASSER MOHAMMAD.
RISC / CISC Architecture by Derek Ng. Overview CISC Architecture RISC Architecture  Pipelining RISC vs CISC.
Introduction to Intel IA-32 and IA-64 Instruction Set Architectures.
Instruction Set Architectures. Our Progress Done with levels 0 and 1 Seen multiple examples of level 2 Ready for ISA general principles.
ARM (Advanced RISC Machine; initially Acorn RISC Machine) Load/store architecture 65 instructions (all fixed length – one word each = 32 bits) 16 registers.
Chapter Overview General Concepts IA-32 Processor Architecture
Computer Architecture & Operations I
Computer Architecture & Operations I
Instruction Set Architectures
A Closer Look at Instruction Set Architectures
Assembly language.
Overview of Instruction Set Architectures
Immediate Addressing Mode
Visit for more Learning Resources
A Closer Look at Instruction Set Architectures
ISA's, Compilers, and Assembly
ELEN 468 Advanced Logic Design
A Closer Look at Instruction Set Architectures
Introduction to Compilers Tim Teitelbaum
Instruction Set Architectures
Data Representation – Instructions
Introduction to Computer Systems Engineering
Instructions - Type and Format
Central Processing Unit
Introduction to Assembly Chapter 2
Computer Organization and ASSEMBLY LANGUAGE
Introduction to Intel IA-32 and IA-64 Instruction Set Architectures
MIPS Procedure Calls CSE 378 – Section 3.
What time is it?. What time is it? Major Concepts: a data structure model: basic representation of data, such as integers, logic values, and characters.
Chapter 9 Instruction Sets: Characteristics and Functions
A Closer Look at Instruction Set Architectures Chapter 5
Evolution of ISA’s ISA’s have changed over computer “generations”.
Introduction to Microprocessor Programming
Evolution of ISA’s ISA’s have changed over computer “generations”.
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.
CPU Structure CPU must:
Lecture 4: Instruction Set Design/Pipelining
Introduction to Computer Systems Engineering
Evolution of ISA’s ISA’s have changed over computer “generations”.
August 31 addresses Drop box Questions? 31 August 2004
Chapter 10 Instruction Sets: Characteristics and Functions
Presentation transcript:

Basics Of X86 Architecture 1 Basics Of X86 Architecture Prathmesh Kallurkar Teaching Assistant, Computer Architecture (CSL211) Instructor : Dr. Smruti Sarangi

2 2 Key Points What is x86 ? Chronology Overview

3 Overview X86 is a series of instruction set architectures based on Intel 8086 CPU. Original ISA was 16 bit. Term x86 derived from the ISA names ending with "86". 32 and 64 -bit implementations are known as x86-32 and x86-64 respectively. X86 ISA is complex and requires complex decoders. Relatively uncommon in small and low-power applications in embedded market. Who uses it : Intel, AMD, VIA

Chronology (History : Boring Huh ..) 4 Chronology (History : Boring Huh ..) 8086: 16-bit, all internal registers 16 bits wide; no general purpose registers; ’78 adds 80-bit-wide stack, but no registers; ’80 80286: adds elaborate protection model; ’82 new addressing modes; adds paging; ’85

Chronology (Contd.) MMX: + 57 instructions for multimedia; ‘97 AMD64 - First 64-bit CPU in x86 family, 2003 2006: Core 2 Multicore, SSE4 2008: Atom Deep pipeline, very low power

Basic Properties Key Points Design of x86 What is CISC ? Pros and Cons

Design of X86 Primarily two-address architecture 7 Design of X86 Primarily two-address architecture ARM : add r1, r2, r3 -> r1 = r2 + r3 X86 : add rax, rbx -> rax += rab Fewer instruction vs Compact representation Assumption : Often true in C, C++ : x+=y Register Memory architecture Load-Store architecture : simple decoder and pipeline Only load/store access memory RM : ALU operation can involve a memory and register operand Add 12 (%rsp), rbx - Requires less registers Assumption : Most of the accesses on array variables

Design Of X86 (Contd..) Little endian What about ARM ?? Java ?? Allow unaligned memory-address access for 16 and 32 bits. Advantages : Memory-intensive Problems : Performance. Assumption : Most compilers will access aligned content. Variable length operation : operand-size can be byte(8), word(16), double-word(32) or quad-word(64)

CISC vs RISC Philosophy 9 CISC vs RISC Philosophy Instruction length RISC – fixed instruction. Easy fetch CISC – Intelligent fetch. Optimized icache Memory architecture RISC – Load/Store Architecture CISC – Register Memory Architecture Type of instructions x86 – enter : push and set combined Intel – Keep main core RISC. Add additional complex decoder

1010 1010 Addressing Modes Key Points Quiet obvious, isn’t it

Register Set (Integer - GPR) 1111 1111 Register Set (Integer - GPR) Accumulator : Arithmetic operations, System call Base for address operations Counter : Loop, String operations IO operations

Floating Point Registers 1212 Floating Point Registers The FPU has 8 registers, st0 to st7, formed into a FP stack. Build in the processor and has access speed same as register Stack instruction format : Pop arg1. Pop arg2 Apply operation Push solution Problem : Low instruction level parallelism Intel’s answer : vector operations

Addressing Modes Direct : R1 <- R1 + M[1001] 1313 Addressing Modes Direct : R1 <- R1 + M[1001] Global variable. Static data C : x = global variable Register Deferred : R4 <- R4 + M[R1] Pointer C : a = *b Indexed : R3 <- R3 + M[R1+R2] Local variable Scaled : R1<-R1+M[100+R2+R3*d] Used to index arrays. May be applied to any base addressing mode in some machines.

Assembly Programming Key Points Function Prologue Epilogue Variables 1414 1414 Key Points Function Prologue Epilogue Variables Local variable Function Parameter Global variable Hello World !! Assembly Programming

Stack Convention Stack grows downwards Caller convention 1515 Stack Convention Stack grows downwards Caller convention Pass arguments on the stack Foo( arg1, arg2, arg3 ) Push arg3, arg2, arg1 Call callee Callee convention Maintain local variables on stack Int local1, local2 Sub esp, 08h

1616 Global Variable Function Prologue Local Variable Function Epilogue

1717 Manage recursion. Intelligent use of eax register

1818 Addressing mode for accessing Structure elements Looping

1919 References http://www.cs.virginia.edu/~evans/cs216/guides/x86.html Patterson - http://www-inst.eecs.berkeley.edu/~cs61c/ http://www.cs.rice.edu/~gw4314/lectures/x86-assembly.ppt http://www.cs.sjsu.edu/~lee/cs147/28FCS147L20RISC%20Architecture.ppt Stacks, Frames, and Calling Conventions by David Kyle http://www.cs.iastate.edu/~prabhu/Tutorial/PIPELINE/addressMode.html