2023-05-28 18:08:26 +03:00
|
|
|
.global sys_fork_trampoline
|
|
|
|
sys_fork_trampoline:
|
|
|
|
pushq %rbx
|
|
|
|
pushq %rbp
|
|
|
|
pushq %r12
|
|
|
|
pushq %r13
|
|
|
|
pushq %r14
|
|
|
|
pushq %r15
|
2024-03-22 14:48:33 +02:00
|
|
|
call read_ip
|
2023-05-28 18:08:26 +03:00
|
|
|
testq %rax, %rax
|
|
|
|
je .done
|
|
|
|
movq %rax, %rsi
|
|
|
|
movq %rsp, %rdi
|
|
|
|
call sys_fork
|
|
|
|
.done:
|
|
|
|
popq %r15
|
|
|
|
popq %r14
|
|
|
|
popq %r13
|
|
|
|
popq %r12
|
|
|
|
popq %rbp
|
|
|
|
popq %rbx
|
|
|
|
ret
|