# Linux Kernel Module Cheat

### 28.8. Linux calling conventions

A summary of results is shown at: Table 3, “Summary of Linux calling conventions for several architectures”.

Table 3. Summary of Linux calling conventions for several architectures
arch | arguments | return value | callee saved registers
--- | --- | --- | ---
x86_64 | rdi, rsi, rdx, rcx, r8, r9, xmm0–7 | rax, rdx | rbx, rbp, r12–r15
arm | r0-r3 | r0-r3 | r4-r11
aarch64 | x0-x7 | x0-x7 | x19-x29

- x86_64 calling convention

- ARM calling convention