Computer System Architecture

Similar documents
Memory Models. Registers

Computer Organization & Assembly Language Programming

The Instruction Set. Chapter 5

Low Level Programming Lecture 2. International Faculty of Engineerig, Technical University of Łódź

Complex Instruction Set Computer (CISC)

Introduction to IA-32. Jo, Heeseung

INTRODUCTION TO IA-32. Jo, Heeseung

Dr. Ramesh K. Karne Department of Computer and Information Sciences, Towson University, Towson, MD /12/2014 Slide 1

We can study computer architectures by starting with the basic building blocks. Adders, decoders, multiplexors, flip-flops, registers,...

Assembly Language for Intel-Based Computers, 4 th Edition. Chapter 2: IA-32 Processor Architecture Included elements of the IA-64 bit

Practical Malware Analysis

MICROPROCESSOR TECHNOLOGY

Registers. Registers

Lecture 15 Intel Manual, Vol. 1, Chapter 3. Fri, Mar 6, Hampden-Sydney College. The x86 Architecture. Robb T. Koether. Overview of the x86

The x86 Architecture

CMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 03, SPRING 2013

Chapter 2. lw $s1,100($s2) $s1 = Memory[$s2+100] sw $s1,100($s2) Memory[$s2+100] = $s1

IA-32 Architecture COE 205. Computer Organization and Assembly Language. Computer Engineering Department

Hardware and Software Architecture. Chapter 2

Assembly Language. Lecture 2 - x86 Processor Architecture. Ahmed Sallam

Instruction Set Architectures

History of the Intel 80x86

CMSC Lecture 03. UMBC, CMSC313, Richard Chang

CS 31: Intro to Systems ISAs and Assembly. Martin Gagné Swarthmore College February 7, 2017

For your convenience Apress has placed some of the front matter material after the index. Please use the Bookmarks and Contents at a Glance links to

Machine-level Representation of Programs. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

Advanced Microprocessors

Assembly Language. Lecture 2 x86 Processor Architecture

EECE416 :Microcomputer Fundamentals and Design. X86 Assembly Programming Part 1. Dr. Charles Kim

Module 3 Instruction Set Architecture (ISA)

ADVANCED PROCESSOR ARCHITECTURES AND MEMORY ORGANISATION Lesson-11: 80x86 Architecture

Review Questions. 1 The DRAM problem [5 points] Suggest a solution. 2 Big versus Little Endian Addressing [5 points]

SYSC3601 Microprocessor Systems. Unit 2: The Intel 8086 Architecture and Programming Model

Assembly Language for x86 Processors 7 th Edition. Chapter 2: x86 Processor Architecture

CS 16: Assembly Language Programming for the IBM PC and Compatibles

W4118: PC Hardware and x86. Junfeng Yang

Program Exploitation Intro

IA-32 Architecture. Computer Organization and Assembly Languages Yung-Yu Chuang 2005/10/6. with slides by Kip Irvine and Keith Van Rhein

The Microprocessor and its Architecture

Addressing Modes on the x86

Systems Architecture I

EEM336 Microprocessors I. The Microprocessor and Its Architecture

Assembly Language for Intel-Based Computers, 4 th Edition. Kip R. Irvine. Chapter 2: IA-32 Processor Architecture

Instruction Set Principles. (Appendix B)

Computer System Architecture

The x86 Architecture. ICS312 - Spring 2018 Machine-Level and Systems Programming. Henri Casanova

Assembly Language for Intel-Based Computers, 4 th Edition. Chapter 2: IA-32 Processor Architecture. Chapter Overview.

Lecture (02) The Microprocessor and Its Architecture By: Dr. Ahmed ElShafee

Representation of Information

Computer Processors. Part 2. Components of a Processor. Execution Unit The ALU. Execution Unit. The Brains of the Box. Processors. Execution Unit (EU)

Machine and Assembly Language Principles

Outline. What Makes a Good ISA? Programmability. Implementability. Programmability Easy to express programs efficiently?

CSCE 212H, Spring 2008 Lab Assignment 3: Assembly Language Assigned: Feb. 7, Due: Feb. 14, 11:59PM

CS412/CS413. Introduction to Compilers Tim Teitelbaum. Lecture 21: Generating Pentium Code 10 March 08

CS 31: Intro to Systems ISAs and Assembly. Kevin Webb Swarthmore College September 25, 2018

CS 31: Intro to Systems ISAs and Assembly. Kevin Webb Swarthmore College February 9, 2016

Machine Code and Assemblers November 6

EXPERIMENT WRITE UP. LEARNING OBJECTIVES: 1. Get hands on experience with Assembly Language Programming 2. Write and debug programs in TASM/MASM

Outline. What Makes a Good ISA? Programmability. Implementability

x86 Assembly Crash Course Don Porter

Load Effective Address Part I Written By: Vandad Nahavandi Pour Web-site:

Chapter 11. Addressing Modes

Real instruction set architectures. Part 2: a representative sample

The von Neumann Machine

Assembly I: Basic Operations. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

Basic Execution Environment

x86 assembly CS449 Spring 2016

Datapoint 2200 IA-32. main memory. components. implemented by Intel in the Nicholas FitzRoy-Dale

CNIT 127: Exploit Development. Ch 1: Before you begin. Updated

Interfacing Compiler and Hardware. Computer Systems Architecture. Processor Types And Instruction Sets. What Instructions Should A Processor Offer?

Mechanisms for entering the system

x86 assembly CS449 Fall 2017

CS429: Computer Organization and Architecture

Reverse Engineering II: Basics. Gergely Erdélyi Senior Antivirus Researcher

X86 Addressing Modes Chapter 3" Review: Instructions to Recognize"

How Software Executes

The von Neumann Machine

UMBC. contain new IP while 4th and 5th bytes contain CS. CALL BX and CALL [BX] versions also exist. contain displacement added to IP.

Reverse Engineering II: The Basics

Assembler Programming. Lecture 2

Digital Forensics Lecture 3 - Reverse Engineering

Scott M. Lewandowski CS295-2: Advanced Topics in Debugging September 21, 1998

CS24: INTRODUCTION TO COMPUTING SYSTEMS. Spring 2018 Lecture 4

EN164: Design of Computing Systems Lecture 24: Processor / ILP 5

1 Overview of the AMD64 Architecture

Assembly Language Programming Introduction

6/17/2011. Introduction. Chapter Objectives Upon completion of this chapter, you will be able to:

Compiler Construction D7011E

CSE P 501 Compilers. x86 Lite for Compiler Writers Hal Perkins Autumn /25/ Hal Perkins & UW CSE J-1

RISC I from Berkeley. 44k Transistors 1Mhz 77mm^2

Chapter 2: The Microprocessor and its Architecture

6/20/2011. Introduction. Chapter Objectives Upon completion of this chapter, you will be able to:

Communicating with People (2.8)

Superscalar Processors

What is a Compiler? Compiler Construction SMD163. Why Translation is Needed: Know your Target: Lecture 8: Introduction to code generation

IA32 Intel 32-bit Architecture

UMBC. A register, an immediate or a memory address holding the values on. Stores a symbolic name for the memory location that it represents.

CSC 2400: Computer Systems. Towards the Hardware: Machine-Level Representation of Programs

Moodle WILLINGDON COLLEGE SANGLI (B. SC.-II) Digital Electronics

17. Instruction Sets: Characteristics and Functions

Transcription:

CSC 203 1.5 Computer System Architecture Department of Statistics and Computer Science University of Sri Jayewardenepura

Instruction Set Architecture (ISA) Level 2

Introduction 3

Instruction Set Architecture Positioned between microarchitecture level and operating system level Important to system architects interface between software and hardware 4

Instruction Set Architecture 5

ISA contd.. General approach of system designers: Build programs in high-level languages Translate to ISA level Build hardware that executes ISA level programs directly Key challenge: Build better machines subject to backward compatibility constraint 6

Features off a good ISA Define a set of instructions that can be implemented efficiently in current and future technologies resulting in cost effective designs over several generations Provide a clean target for compiled code 7

Properties off ISA level ISA level code is what a compiler outputs To produce ISA code, compiler writer has to know What the memory model is What registers are there What data types and instructions are available 8

ISA level memory models Computers divide memory into cells (8 bits) that have consecutive addresses Bytes are grouped into words (4-, 8-byte) with instructions available for manipulating entire words Many architectures require words to be aligned on their natural boundaries Memories operate more efficiently that way 9

ISA level Memory Models On Pentium II (fetches 8 bytes at a time from memory), ISA programs can make memory references to words starting at any address Requires extra logic circuits on the chip Intel allows it cause of backward compatibility constraint (8088 programs made non-aligned memory references) 10

ISA level registers Main function of ISA level registers: provide rapid access to heavily used data Registers are divided into 2 categories special purpose registers (program counter, stack pointer) General purpose registers (hold key local variables, intermediate results of calculations). These are interchangeable 11

Instructions Main feature of ISA level is its set of machine instructions They control what the machine can do Ex: LOAD and STORE instructions move data between memory and registers MOVE instruction copies data among registers 12

Pentium II ISA level (Intel s IA-32) Maintains full support for execution of programs written for 8086, 8088 processors (16-bit) Pentium II has 3 operating modes (Real mode, Virtual 8086 mode, Protected mode) Address Add space: memory is divided into 16,384 segments, each going from address 0 to address 2 32-1 (Windows supports only one segment) Every byte has its own address, with words being 32 bits long Words are stored in Little endian format (low-order byte has lowest address) 13

Little endian and Big endian format 14

Pentium II s primary registers 15

Pentium II s primary registers EAX: Main arithmetic registers, 32-bit 16-bit register in low-order 16 bits 8-bit register in low-order 8 bits easy to manipulate 16-bit (in 80286) and 8-bit (in 8088) quantities EBX: holds pointers ECX: used in looping EDX: used for multiplication and division, where together with EAX, it holds 64-bit products and dividends 16

Pentium II s primary registers ESI,ESI EDI: holds pointers into memory Especially for hardware string manipulation instructions (ESI points to source string, EDI points to destination string) EBP: pointer register ESP: stack pointer CS through GS: segment registers EIP: program counter EFLAGS: flag register (holds various miscellaneous bits such as conditional codes) 17

Pentium II data Types 18

Instruction Formats An instruction consists of an opcode, plus additional information such as where operands come from, where results go to Opcode tells what instruction does On some machines, all instructions have same length Advantages: simple, easy to decode Disadvantages: waste space 19

Common Instruction Formats (a) Zero address instruction (b) One address instruction (c) Two address instruction (d) Three address instruction 20

Instruction and Word length Relationships 21

Example An Instruction with 4bit Opcode and Three 4bit address 22

Design of Instruction Formats Factors: Length of instruction short instructions are better than long instructions (modern processors can execute multiple instructions per clock cycle) Sufficient room in the instruction format to express all operations required No. of bits in an address field 23

Intel 64 and IA-32 Architectures Intel 64 and IA-32 instructions General purpose x87 FPU x87 FPU and SIMD state management Intel MMX technology SSE extensions SSE2 extensions SSE3 extensions SSSE3 extensions SSE4 extensions AESNI and PCLMULQDQ Intel AVX extensions F16C, RDRAND, FS/GS base access System instructions IA-32e mode: 64-bit mode instructions VMX instructions SMX instructions 24