64-Bit Architecture Register Usage

From Swift 5, the calling convention register allocation for 64-bit architectures is largely based on existing standards, with the addition of the context and error return registers discussed in the ABI stability manifesto:

Register PurposeARM64x86_64
Context register (self)x20r13
Error return registerx21r12
Struct return pointerx8rax
Float call argumentsv0 … v7xmm0 … xmm7
Integer call argumentsx0 … x7rdi, rsi, rdx, rcx, r8, r9
Float returnv0 … v3xmm0 … xmm3
Integer returnx0 … x3rax, rdx, rcx, r8