mirror of https://github.com/flysand7/ciabatta.git
Fix stack alignment on thread entry
This commit is contained in:
parent
bbdcbb3e7c
commit
a81d061652
|
@ -44,6 +44,8 @@ _rt_thread_start:
|
||||||
; If child, jump to thread function
|
; If child, jump to thread function
|
||||||
pop rax ; thread_fn
|
pop rax ; thread_fn
|
||||||
pop rdi ; ctx
|
pop rdi ; ctx
|
||||||
|
; Align the stack
|
||||||
|
and rsp, -16
|
||||||
call rax
|
call rax
|
||||||
; Make return value the first arg and call thread finish routine
|
; Make return value the first arg and call thread finish routine
|
||||||
mov rdi, rax
|
mov rdi, rax
|
||||||
|
|
Loading…
Reference in New Issue