Skip to content

Instantly share code, notes, and snippets.

@vancanhuit
Last active January 2, 2021 08:19
Show Gist options
  • Save vancanhuit/c3e14d434b8d9fb3f4d059f9bc77a065 to your computer and use it in GitHub Desktop.
Save vancanhuit/c3e14d434b8d9fb3f4d059f9bc77a065 to your computer and use it in GitHub Desktop.

x86-64 Integer Registers

# 64-bit 32-bit 16-bit 8-bit
1 %rax %eax %ax %al Return value
2 %rbx %ebx %bx %bl Callee saved
3 %rcx %ecx %cx %cl 4th argument
4 %rdx %edx %dx %dl 3th argument
5 %rsi %esi %si %sil 2nd argument
6 %rdi %edi %di %dil 1st argument
7 %rbp %ebp %bp %bpl Callee saved
8 %rsp %esp %sp %spl Stack pointer
9 %r8 %r8d %r8w %r8b 5th argument
10 %r9 %r9d %r9w %r9b 6th argument
11 %r10 %r10d %r10w %r10b Caller saved
12 %r11 %r11d %r11w %r11b Caller saved
13 %r12 %r12d %r12w %r12b Callee saved
14 %r13 %r13d %r13w %r13b Callee saved
15 %r14 %r14d %r14w %r14b Callee saved
16 %r15 %r14d %r14w %r15b Callee saved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment