Collections: X86_64 registers

x64 Architecture by Microsoft

Note: r8b,r9b,…,r15b may be recognised as r8l, r9l, … r15l

64-bit register Lower 32 bits Lower 16 bits Lower 8 bits

rax

eax

ax

al

rbx

ebx

bx

bl

rcx

ecx

cx

cl

rdx

edx

dx

dl

rsi

esi

si

sil

rdi

edi

di

dil

rbp

ebp

bp

bpl

rsp

esp

sp

spl

r8

r8d

r8w

r8b

r9

r9d

r9w

r9b

r10

r10d

r10w

r10b

r11

r11d

r11w

r11b

r12

r12d

r12w

r12b

r13

r13d

r13w

r13b

r14

r14d

r14w

r14b

r15

r15d

r15w

r15b

X86_64 Assembly Language Tutorial by CocoaFactory

Register Usage Preserved across function calls
%rax 1st return register, number of vector registers used No
%rbx callee-saved register; base pointer Yes
%rcx pass 4th integer argument to functions No
%rdx pass 3rd argument fo functions, 2nd return register No
%rsp stack pointer Yes
%rbp callee-saved register, frame pointer Yes
%rsi used to pass 2nd argument to functions No
%rdi used to pass 1st argument to functions No
%r8 used to pass 5th argunent to functions No
%r9 used to pass 6th argument to functions No
%r10 temp register, used for passing a function’s static chain ptr No
%r11 temp register No
%r12 callee-saved register Yes
%r13 callee-saved register Yes
%r14 callee-saved register Yes
%r15 callee-saved register Yes
%xmm0 used to pass and return floating point arguments No
%xmm1 used to pass and return floating point arguments No
%xmm2 used to pass floating point arguments No
%xmm3 used to pass floating point arguments No
%xmm4 used to pass floating point arguments No
%xmm5 used to pass floating point arguments No
%xmm6 used to pass floating point arguments No
%xmm7 used to pass floating point arguments No
%xmm8 temporary register No
%xmm9 temporary register No
%xmm10 temporary register No
%xmm11 temporary register No
%xmm12 temporary register No
%xmm13 temporary register No
%xmm14 temporary register No
%xmm15 temporary register No
%mmx0 temporary register No
%mmx1 temporary register No
%mmx2 temporary register No
%mmx3 temporary register No
%mmx4 temporary register No
%mmx5 temporary register No
%mmx6 temporary register No
%mmx7 temporary register No
%st0 temporary register, used to return long double arguments No
%st1 temporary register, used to return long double arguments No
%st2 temporary register No
%st3 temporary register No
%st4 temporary register No
%st5 temporary register No
%st6 temporary register No
%st7 temporary register No
Collections: X86_64 registers by @sskaje: https://sskaje.me/2014/04/collections-x86_64-registers/