call, ret,
syscallx86, x86_64,
ARM, and ARM64syscall instruction triggers kernel| Register | 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 convention| Register | 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 |