x86_64: Glue code: Keep stack 16-byte-aligned
Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>
This commit is contained in:
parent
6c009cde0b
commit
874e9521b2
@ -30,6 +30,7 @@ FUNCTION(_init):
|
||||
|
||||
// Preserve image ID for call to __haiku_init_after.
|
||||
push %rdi
|
||||
sub $0x8, %rsp
|
||||
|
||||
call __haiku_init_before
|
||||
// crtbegin.o stuff comes here
|
||||
@ -39,5 +40,6 @@ FUNCTION(_fini):
|
||||
push %rbp
|
||||
movq %rsp, %rbp
|
||||
push %rdi
|
||||
sub $0x8, %rsp
|
||||
call __haiku_term_before
|
||||
// crtend.o stuff comes here
|
||||
|
@ -13,6 +13,7 @@
|
||||
|
||||
.section .init
|
||||
// The image ID is preserved on the stack.
|
||||
add $0x8, %rsp
|
||||
pop %rdi
|
||||
call __haiku_init_after
|
||||
movq %rbp, %rsp
|
||||
@ -20,6 +21,7 @@
|
||||
ret
|
||||
|
||||
.section .fini
|
||||
add $0x8, %rsp
|
||||
pop %rdi
|
||||
call __haiku_term_after
|
||||
movq %rbp, %rsp
|
||||
|
Loading…
Reference in New Issue
Block a user