General Purpose Registers (GPRs)

  • The breakdown of the names of memory sizes:
    • Quad Word = 8 Bytes = 64 bits
    • Double Word = 4 bytes = 32 bits
    • Word = 2 bytes = 16 bits
    • Byte = 1 byte = 8 bits
64-bit32-bit16-bit8-bit high8-bit lowUse / Notes
RAXEAXAXAHALAccumulator, division/multiplication results
RBXEBXBXBHBLBase register (often used as general storage)
RCXECXCXCHCLCounter (used for shifts/loops)
RDXEDXDXDHDLData register (division remainder, I/O)
RSIESISISILSource index (string/memory ops)
RDIEDIDIDILDestination index
RBPEBPBPBPLBase pointer (stack frames)
RSPESPSPSPLStack pointer
R8R8DR8WR8BExtra GPR (x86-64 only)
R9R9DR9WR9BExtra GPR
R10R10DR10WR10BExtra GPR
R11R11DR11WR11BExtra GPR
R12R12DR12WR12BExtra GPR
R13R13DR13WR13BExtra GPR
R14R14DR14WR14BExtra GPR
R15R15DR15WR15BExtra GPR


Pointer and Instruction Registers

  • RIP (64-bit Instruction Pointer)—where the CPU is executing.
  • EIP/IP—32-bit / 16-bit versions (in 32-bit / 16-bit mode).
  • RSP—stack pointer (top of stack).
  • RBP—base/frame pointer.

Segment Registers (legacy, Rarely Used now)

  • CS (Code Segment)
  • DS (Data Segment)
  • SS (Stack Segment)
  • ES, FS, GS (extra segment registers; FS/GS still used in x86-64 for thread-local storage and OS stuff).

Flags Register

  • RFLAGS (64-bit) / EFLAGS / FLAGS—contains condition codes: ZF (zero), CF (carry), SF (sign), OF (overflow), etc. Used by cmp, test, conditional jumps.

SIMD / Floating Point Registers

  • XMM0–XMM15—128-bit SSE registers
  • YMM0–YMM15—256-bit AVX (upper half extends XMM)
  • ZMM0–ZMM31—512-bit AVX-512 (extends YMM/XMM)
  • ST(0)–ST(7)—old x87 FPU stack registers

Visual Example: Sub-register Hierarchy of RAX

  64-bit   RAX  = [63 ............... 0]
  32-bit   EAX  = [31 ............... 0]
  16-bit   AX   = [15 ............... 0]
  8-bit    AH   = [15 .... 8]     AL = [7 .... 0]

Same idea applies to RBX/RCX/RDX.

For R8–R15, the split is simpler: they only have low 8-bit (R8B), 16-bit (R8W), 32-bit (R8D), and 64-bit (R8), no AH/BH/CH/DH.


Where to Study Further


Resources


ResourceDescription
Guide to Using Assembly in Visual Studioa tutorial on building and debugging assembly code in Visual Studio
Intel x86 Instruction Set Reference
Intel’s Pentium Manualsthe full gory details
x64 ABI conventions | Microsoft LearnThis topic describes the basic application binary interface (ABI) for x64, the 64-bit extension to the x86 architecture. It covers topics such as the calling convention, type layout, stack and register usage, and more.