x86_64: Glue code: Keep stack 16-byte-aligned

Signed-off-by: Jérôme Duval <[email protected]>
This commit is contained in:
Simon South
2015-10-28 21:24:34 +01:00
committed by Jérôme Duval
parent 6c009cde0b
commit 874e9521b2
2 changed files with 4 additions and 0 deletions
+2
View File
@@ -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
+2
View File
@@ -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