University of Washington
Instruction Set Architectures
! ISAs ! Brief history of processors and architectures ! C, assembly, machine code ! Assembly basics: registers, operands, move
instructions
1
Instruction Set Architectures ! ISAs ! Brief history of processors - - PowerPoint PPT Presentation
University of Washington Instruction Set Architectures ! ISAs ! Brief history of processors and architectures ! C, assembly, machine code ! Assembly basics: registers, operands, move instructions 1 University of Washington What should the HW/SW
University of Washington
! ISAs ! Brief history of processors and architectures ! C, assembly, machine code ! Assembly basics: registers, operands, move
1
University of Washington
2
University of Washington
University of Washington
! Instructions
!
!
! Registers
!
!
! Memory
!
University of Washington
Hardware
5
University of Washington
! The time required to execute a program depends on:
!
!
!
!
! There is a complicated interaction among these
University of Washington
! Totally dominate the server/laptop market ! Evolutionary design
! Complex instruction set computer (CISC)
" But, only small subset encountered with Linux programs
7
University of Washington
! 8086
! 386
! Pentium 4F 2005
8
University of Washington
! Machine Evolution
! Added Features
" Parallel operations on 1, 2, and 4-byte data, both integer & FP
! Linux/GCC Evolution
9
University of Washington
! Historically
! Then
! Recently
10
University of Washington
! Intel Attempted Radical Shift from IA32 to IA64
! AMD Stepped in with Evolutionary Solution
! Intel Felt Obligated to Focus on IA64
! 2004: Intel Announces EM64T extension to IA32
! Meanwhile: EM64t well introduced,
11
University of Washington
! IA32
! x86-64/EM64T
12
University of Washington
! Architecture: (also instruction set architecture or ISA)
! Microarchitecture: Implementation of the architecture ! Is cache size “architecture”? ! How about core frequency? ! And number of registers?
13
University of Washington
! Programmer-Visible State
" Address of next instruction " Called “EIP” (IA32) or “RIP” (x86-64)
" Heavily used program data
" Store status information about most
recent arithmetic operation
" Used for conditional branching
" Byte addressable array " Code, user data, (some) OS data " Includes stack used to support
procedures (we’ll come back to that)
University of Washington
" Use optimizations (-O) " Put resulting binary in file p
15
University of Washington
16
University of Washington
! Perform arithmetic function on register or memory
! Transfer data between memory and register
! Transfer control (control flow)
17
University of Washington
! “Integer” data of 1, 2, or 4 bytes
! Floating point data of 4, 8, or 10 bytes ! No aggregate types such as arrays or structures
18
University of Washington
! Assembler
! Linker
" E.g., code for malloc, printf
" Linking occurs when program begins
19
University of Washington
! C Code
! Assembly
" “Long” words in GCC speak " Same instruction whether
! Object Code
20
University of Washington
! Disassembler
21
University of Washington
! Within gdb Debugger
22
University of Washington
! Anything that can be interpreted as executable code ! Disassembler examines bytes and reconstructs
23
University of Washington
24
University of Washington
accumulate counter data base source index destination index
25
University of Washington
University of Washington