







































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!








































15-‐213/18-‐243: Introduc3on to Computer Systems 4 th Lecture, Sep. 2, 2010 Instructors: Randy Bryant and Dave O’Hallaron
X86-‐64 / EM64t
286 386 486 PenJum PenJum MMX PenJum III PenJum 4 PenJum 4E PenJum 4F Core 2 Duo Core i
MMX SSE SSE SSE SSE
On-‐board “x86 engine”
4 got too good
Programmer-‐Visible State PC: Program counter Address of next instruc3on Called “EIP” (IA32) or “RIP” (x86-‐64) Register file Heavily used program data Condi3on codes Store status informa3on about most recent arithme3c opera3on Used for condi3onal branching
Object Code Program Data OS Data Addresses Data Instruc3ons
Byte addressable array Code, user data, (some) OS data Includes stack used to support procedures
int sum(int x, int y) { int t = x+y; return t; }
sum: pushl %ebp movl %esp,%ebp movl 12(%ebp),%eax addl 8(%ebp),%eax popl %ebp ret
0x401040
files
E.g., code for malloc, printf
Linking occurs when program begins execu3on
“Long” words in GCC parlance Same instruc3on whether signed or unsigned
x: Register %eax y: Memory M[%ebp+8] t: Register %eax
*int t = x+y; addl 8(%ebp),%eax 0x80483ca: 03 45 08 Similar to expression: x += y More precisely: int eax; int ebp; eax += ebp[2]