Heavily used program data condition codes store

Info icon This preview shows pages 14–22. Sign up to view the full content.

View Full Document Right Arrow Icon
Heavily used program data Condition codes Store status information about most recent arithmetic or logical operation Used for conditional branching PC Registers Memory Code Data Stack Addresses Data Instructions Condition Codes Memory Byte addressable array Code and user data Stack to support procedures
Image of page 14

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Carnegie Mellon 15 Bryant and O’Hallaron, Computer Systems: A Programmer’s Perspective, Third Edition Assembly Characteristics: Data Types “Integer” data of 1, 2, 4, or 8 bytes Data values Addresses (untyped pointers) Floating point data of 4, 8, or 10 bytes (SIMD vector data types of 8, 16, 32 or 64 bytes) Code: Byte sequences encoding series of instructions No aggregate types such as arrays or structures Just contiguously allocated bytes in memory
Image of page 15
Carnegie Mellon 16 Bryant and O’Hallaron, Computer Systems: A Programmer’s Perspective, Third Edition %rsp x86-64 Integer Registers Can reference low-order 4 bytes (also low-order 1 & 2 bytes) Not part of memory (or cache) %eax %ebx %ecx %edx %esi %edi %esp %ebp %r8d %r9d %r10d %r11d %r12d %r13d %r14d %r15d %r8 %r9 %r10 %r11 %r12 %r13 %r14 %r15 %rax %rbx %rcx %rdx %rsi %rdi %rbp
Image of page 16

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Carnegie Mellon 17 Bryant and O’Hallaron, Computer Systems: A Programmer’s Perspective, Third Edition Some History: IA32 Registers %eax %ecx %edx %ebx %esi %edi %esp %ebp %ax %cx %dx %bx %si %di %sp %bp %ah %ch %dh %bh %al %cl %dl %bl 16-bit virtual registers (backwards compatibility) general purpose accumulate counter data base source index destination index stack pointer base pointer Origin (mostly obsolete)
Image of page 17
Carnegie Mellon 18 Bryant and O’Hallaron, Computer Systems: A Programmer’s Perspective, Third Edition Assembly Characteristics: Operations Transfer data between memory and register Load data from memory into register Store register data into memory Perform arithmetic function on register or memory data Transfer control Unconditional jumps to/from procedures Conditional branches Indirect branches
Image of page 18

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon