call
, ret
,
syscall
x86
, x86_64
,
ARM
, and ARM64
syscall
instruction triggers kernelRegister | Purpose |
---|---|
%rax | System call number |
%rdi | 1st parameter |
%rsi | 2nd parameter |
%rdx | 3rd parameter |
%r10 | 4th parameter |
%r8 | 5th parameter |
%r9 | 6th parameter |
call
and ret
perform jumps and adjust
statepush
and pop
access stackrax
register is used for return value in x64
calling conventionRegister | Purpose |
---|---|
%rax | 1st return register |
%rdi | used to pass 1st argument to functions |
%rsi | used to pass 2nd argument to functions |
%rdx | used to pass 3rd argument to functions |
%rcx | used to pass 4th argument to functions |
%rsp | stack pointer |