mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-16 02:50:40 +01:00
* keep stack aligned when using profiler stubs
git-svn-id: trunk@38320 -
This commit is contained in:
parent
048c2c09fd
commit
92776e1864
@ -42,6 +42,7 @@ _start:
|
||||
movq %rdx, %r9 /* Address of the shared library termination
|
||||
function. */
|
||||
popq %rsi /* Pop the argument count. */
|
||||
pushq %rsi /* keep stack aligned */
|
||||
movq %rsp, %rdx /* argv starts just at the current stack top. */
|
||||
|
||||
movq entryinfo@GOTPCREL(%rip),%r10 /* load address of entryinfo variable */
|
||||
@ -142,6 +143,7 @@ _haltproc:
|
||||
movq ___fpc_ret_rbp@GOTPCREL(%rip),%rcx
|
||||
movq (%rcx),%rbp
|
||||
movq ___fpc_ret@GOTPCREL(%rip),%rcx
|
||||
popq %rdx
|
||||
movq (%rcx),%rdx
|
||||
pushq %rdx
|
||||
ret
|
||||
|
||||
@ -88,6 +88,7 @@ procedure ini_dummy;
|
||||
movq %rdx, %r9 { Address of the shared library termination
|
||||
function. }
|
||||
popq %rsi { Pop the argument count. }
|
||||
pushq %rsi { keep stack aligned }
|
||||
movq %rsp, %rdx { argv starts just at the current stack top. }
|
||||
|
||||
{$ifdef FPC_HAS_INDIRECT_ENTRY_INFORMATION}
|
||||
@ -200,6 +201,7 @@ procedure main_stub; assembler; nostackframe;
|
||||
procedure _FPC_libc_haltproc(e:longint); assembler; nostackframe; public name '_haltproc';
|
||||
asm
|
||||
movl %edi,%eax
|
||||
popq %rdx { keep stack aligned }
|
||||
movq fpc_ret(%rip),%rdx { return to libc }
|
||||
movq fpc_ret_rbp(%rip),%rbp
|
||||
pushq %rdx
|
||||
|
||||
Loading…
Reference in New Issue
Block a user