ISA's, Compilers, and Assembly

Slides:



Advertisements
Similar presentations
Chapter 8: Central Processing Unit
Advertisements

Chapter 3 Instruction Set Architecture Advanced Computer Architecture COE 501.
Instructor: Tor Aamodt
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.
1 ECE369 ECE369 Chapter 2. 2 ECE369 Instruction Set Architecture A very important abstraction –interface between hardware and low-level software –standardizes.
CSE 340 Computer Architecture Spring 2014 MIPS ISA Review
INTRODUCTION TO THE ARM PROCESSOR – Microprocessor Asst. Prof. Dr. Choopan Rattanapoka and Asst. Prof. Dr. Suphot Chunwiphat.
Tuan Tran. What is CISC? CISC stands for Complex Instruction Set Computer. CISC are chips that are easy to program and which make efficient use of memory.
1 Starting a Program The 4 stages that take a C++ program (or any high-level programming language) and execute it in internal memory are: Compiler - C++
PART 4: (2/2) Central Processing Unit (CPU) Basics CHAPTER 13: REDUCED INSTRUCTION SET COMPUTERS (RISC) 1.
The Evolution of RISC A Three Party Rivalry By Jenny Mitchell CS147 Fall 2003 Dr. Lee.
Fall 2001CS 4471 CS 447: Fall 2001 Chapter 1: Computer Abstraction and Technology (Introduction to the course)
RISC vs CISC CS 3339 Lecture 3.2 Apan Qasem Texas State University Spring 2015 Some slides adopted from Milo Martin at UPenn.
Spring 2008, Jan. 14 ELEC / Lecture 2 1 ELEC / Computer Architecture and Design Spring 2007 Introduction Vishwani D. Agrawal.
COMP3221: Microprocessors and Embedded Systems Lecture 2: Instruction Set Architecture (ISA) Lecturer: Hui Wu Session.
Instruction Level Parallelism (ILP) Colin Stevens.
RISC By Don Nichols. Contents Introduction History Problems with CISC RISC Philosophy Early RISC Modern RISC.
Recap.
RISC. Rational Behind RISC Few of the complex instructions were used –data movement – 45% –ALU ops – 25% –branching – 30% Cheaper memory VLSI technology.
Unit -II CPU Organization By- Mr. S. S. Hire. CPU organization.
Lecture 7: Instruction Set Architecture CSE 30: Computer Organization and Systems Programming Winter 2014 Diba Mirza Dept. of Computer Science and Engineering.
The Pentium: A CISC Architecture Shalvin Maharaj CS Umesh Maharaj:
RISC CSS 548 Joshua Lo.
RISC and CISC by Eugene Clewlow. Overview History of CISC and RISC CISC and RISC  Philosophy  Attributes and disadvantages Summation.
Processor Organization and Architecture
RISC and CISC. Dec. 2008/Dec. and RISC versus CISC The world of microprocessors and CPUs can be divided into two parts:
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/9/02CSE ISA's Instruction Set Architectures Part 1 I/O systemInstr. Set Proc. Compiler Operating System Application Digital Design Circuit Design.
University of Washington Roadmap 1 car *c = malloc(sizeof(car)); c->miles = 100; c->gals = 17; float mpg = get_mpg(c); free(c); Car c = new Car(); c.setMiles(100);
Computer architecture Lecture 11: Reduced Instruction Set Computers Piotr Bilski.
10/27: Lecture Topics Survey results Current Architectural Trends Operating Systems Intro –What is an OS? –Issues in operating systems.
1 (Based on text: David A. Patterson & John L. Hennessy, Computer Organization and Design: The Hardware/Software Interface, 3 rd Ed., Morgan Kaufmann,
Chapter 8 CPU and Memory: Design, Implementation, and Enhancement The Architecture of Computer Hardware and Systems Software: An Information Technology.
Chapter Six Sun SPARC Architecture. SPARC Processor The name SPARC stands for Scalable Processor Architecture SPARC architecture follows the RISC design.
Chapter 2 Instructions: Language of the Computer Part I.
Ted Pedersen – CS 3011 – Chapter 10 1 A brief history of computer architectures CISC – complex instruction set computing –Intel x86, VAX –Evolved from.
RISC and CISC. What is CISC? CISC is an acronym for Complex Instruction Set Computer and are chips that are easy to program and which make efficient use.
MIPS Processor Chapter 12 S. Dandamudi To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer,
 Introduction to SUN SPARC  What is CISC?  History: CISC  Advantages of CISC  Disadvantages of CISC  RISC vs CISC  Features of SUN SPARC  Architecture.
ARM (Advanced RISC Machine; initially Acorn RISC Machine) Load/store architecture 65 instructions (all fixed length – one word each = 32 bits) 16 registers.
ECEG-3202 Computer Architecture and Organization Chapter 7 Reduced Instruction Set Computers.
CS 211: Computer Architecture Lecture 2 Instructor: Morris Lancaster.
DR. SIMING LIU SPRING 2016 COMPUTER SCIENCE AND ENGINEERING UNIVERSITY OF NEVADA, RENO CS 219 Computer Organization.
DR. SIMING LIU SPRING 2016 COMPUTER SCIENCE AND ENGINEERING UNIVERSITY OF NEVADA, RENO Session 7, 8 Instruction Set Architecture.
1 Lecture 6: Assembly Programs Today’s topics:  Large constants  The compilation process  A full example  Intro to the MARS simulator.
CISC. What is it?  CISC - Complex Instruction Set Computer  CISC is a design philosophy that:  1) uses microcode instruction sets  2) uses larger.
Computer Architecture & Operations I
Computer Architecture & Operations I
Topics to be covered Instruction Execution Characteristics
Lecture 6: Assembly Programs
Visit for more Learning Resources
Roadmap C: Java: Assembly language: OS: Machine code: Computer system:
The compilation process
ISA's, Compilers, and Assembly
Announcements MP 3 CS296 (Chase Geigle
An example of multiplying two numbers A = A * B;
Chapter 1 Fundamentals of Computer Design
Computer Architecture
Introduction to Computer Systems Engineering
The Pentium: A CISC Architecture
August 29 New address for Fang-Yi
Computer Architecture
Introduction to Microprocessor Programming
Computer Architecture
January 16 The books are here. Assignment 1 now due Thursday 18 Jan.
CPU Structure CPU must:
Lecture 4: Instruction Set Design/Pipelining
Evolution of ISA’s ISA’s have changed over computer “generations”.
Presentation transcript:

ISA's, Compilers, and Assembly CS232 Instruction sets, RISC vs. CISC, Compilers, Assemblers, Linkers, Loaders, Memory images, and who cares about assembly. April 27, 2017 ISA's, Compilers, and Assembly

Instruction Set Architecture (ISA) The ISA is the interface between hardware and software. The ISA serves as an abstraction layer between the HW and SW Software doesn’t need to know how the processor is implemented Any processor that implements the ISA appears equivalent An ISA enables processor innovation without changing software This is how Intel has made billions of dollars. Before ISAs, software was re-written/re-compiled for each new machine. Software Proc #1 ISA Proc #2 April 27, 2017 ISA's, Compilers, and Assembly

ISA's, Compilers, and Assembly A little ISA history 1964: IBM System/360, the first computer family IBM wanted to sell a range of machines that ran the same software 1960’s, 1970’s: Complex Instruction Set Computer (CISC) era Much assembly programming, compiler technology immature Simple machine implementations Complex instructions simplified programming, little impact on design 1980’s: Reduced Instruction Set Computer (RISC) era Most programming in high-level languages, mature compilers Aggressive machine implementations Simpler, cleaner ISA’s facilitated pipelining, high clock frequencies 1990’s: Post-RISC era ISA complexity largely relegated to non-issue CISC and RISC chips use same techniques (pipelining, superscalar, ..) ISA compatibility outweighs any RISC advantage in general purpose Embedded processors prefer RISC for lower power, cost 2000’s: Multi-core and Multithreading April 27, 2017 ISA's, Compilers, and Assembly

ISA's, Compilers, and Assembly RISC vs. CISC MIPS was one of the first RISC architectures. It was started about 20 years ago by John Hennessy, one of the authors of our textbook. The architecture is similar to that of other RISC architectures, including Sun’s SPARC, IBM and Motorola’s PowerPC, and ARM-based processors. Older processors used complex instruction sets, or CISC architectures. Many powerful instructions were supported, making the assembly language programmer’s job much easier. But this meant that the processor was more complex, which made the hardware designer’s life harder. Many new processors use reduced instruction sets, or RISC architectures. Only relatively simple instructions are available. But with high-level languages and compilers, the impact on programmers is minimal. On the other hand, the hardware is much easier to design, optimize, and teach in classes. Even most current CISC processors, such as Intel 8086-based chips, are now implemented using a lot of RISC techniques. April 27, 2017 ISA's, Compilers, and Assembly

Differences between ISA’s Much more is similar between ISA’s than different. Compare MIPS & x86: Instructions: same basic types different names and variable-length encodings x86 branches use condition codes x86 supports (register + memory) -> (register) format Registers: Register-based architecture different number and names, x86 allows partial reads/writes Memory: Byte addressable, 32-bit address space x86 has additional addressing modes x86 does not require addresses to be aligned x86 has segmentation, but not used by most modern O/S’s April 27, 2017 ISA's, Compilers, and Assembly

The compilation process April 27, 2017 ISA's, Compilers, and Assembly

ISA's, Compilers, and Assembly The purpose of a linker April 27, 2017 ISA's, Compilers, and Assembly

ISA's, Compilers, and Assembly What the linker does April 27, 2017 ISA's, Compilers, and Assembly

ISA's, Compilers, and Assembly Object File Formats April 27, 2017 ISA's, Compilers, and Assembly

ISA's, Compilers, and Assembly Loader Before we can start executing a program, the O/S must load it: Loading involves 5 steps: Allocates memory for the program's execution. Copies the text and data segments from the executable into memory. Copies program arguments (e.g., command line arguments) onto the stack. Initializes registers: sets $sp to point to top of stack, clears the rest. Jumps to start routine, which: 1) copies main's arguments off of the stack, and 2) jumps to main. April 27, 2017 ISA's, Compilers, and Assembly

ISA's, Compilers, and Assembly MIPS memory image April 27, 2017 ISA's, Compilers, and Assembly

ISA's, Compilers, and Assembly Structs Structs are like arrays, but the elements can be different types. Same with objects Compiler/assembler inserts padding to “naturally align” data Sometimes you can reorganize fields to eliminate padding. Consider: April 27, 2017 ISA's, Compilers, and Assembly

Whither Assembly Language April 27, 2017 ISA's, Compilers, and Assembly

Inline assembly Example intadd(int a, int b) { /* return a + b */ int ret_val; __asm("add %2, %0, %1", a, b, ret_val); return(ret_val); } April 27, 2017 ISA's, Compilers, and Assembly