# Register Overview

## General purpose registers

The Intel and AMD CPUs operating in 64 bit mode have 16 general purpose registers. Each register holds 64 bits and can be manipulated as 64, 32, 16 and 8 bit quantities. There are 8 registers which are descendents of the original 8086 registers and 8 more which were added when AMD extended the instruction set to 64 bits

Register | 32 bit | 16 bits | 8 bits | Comments
--- | --- | --- | --- | ---
rax | eax | ax | ah, al | general purpose, special for some instructions
rbx | ebx | bx | bh, bl | general purpose
rcx | ecx | cx | ch, cl | general purpose
rdx | edx | dx | dh, dl | general purpose
rdi | edi | di | dil | general purpose, destination index
rsi | esi | si | sil | general purpose, source index
rbp | ebp | bp | bpl | frame base pointer
rsp | esp | sp | spl | stack pointer
r8 | r8d | r8w | r8b | general purpose
r9 | r9d | r9w | r9b | general purpose
r10 | r10d | r10w | r10b | general purpose
r11 | r11d | r11w | r11b | general purpose
r12 | r12d | r12w | r12b | general purpose
r13 | r13d | r13w | r13b | general purpose
r14 | r14d | r14w | r14b | general purpose
r15 | r15d | r15w | r15b | general purpose

## Instruction pointer register

The instruction pointer register is named `rip`, though it is not commonly referred to directly in code.

## Floating point registers

There are 2 sets of floating point registers. The old style of registers is a stack with registers `ST0-ST7`. The recommended set of 16 registers in 64 bit mode are named `XMM0-XMM15`. These registers are 128 bit registers which can me used in a variety of SIMD instructions. Some newer CPUs have extended these registers to 256 bits with new names `YMM0-YMM15`