mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 09:59:17 +02:00
* properly retrieve the stacktop on win64
git-svn-id: trunk@21926 -
This commit is contained in:
parent
6cc78635d7
commit
a6a1f2a0a1
@ -194,8 +194,6 @@ end;
|
|||||||
|
|
||||||
|
|
||||||
procedure Exe_entry;[public,alias:'_FPC_EXE_Entry'];
|
procedure Exe_entry;[public,alias:'_FPC_EXE_Entry'];
|
||||||
var
|
|
||||||
ST : pointer;
|
|
||||||
begin
|
begin
|
||||||
IsLibrary:=false;
|
IsLibrary:=false;
|
||||||
{ install the handlers for exe only ?
|
{ install the handlers for exe only ?
|
||||||
@ -204,11 +202,6 @@ procedure Exe_entry;[public,alias:'_FPC_EXE_Entry'];
|
|||||||
install_exception_handlers;
|
install_exception_handlers;
|
||||||
{$endif FPC_USE_WIN64_SEH}
|
{$endif FPC_USE_WIN64_SEH}
|
||||||
ExitCode:=0;
|
ExitCode:=0;
|
||||||
asm
|
|
||||||
movq %rsp,%rax
|
|
||||||
movq %rax,st
|
|
||||||
end;
|
|
||||||
StackTop:=st;
|
|
||||||
asm
|
asm
|
||||||
xorq %rax,%rax
|
xorq %rax,%rax
|
||||||
movw %ss,%ax
|
movw %ss,%ax
|
||||||
@ -504,8 +497,15 @@ asm
|
|||||||
subq %gs:(16),%rax
|
subq %gs:(16),%rax
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
st : Pointer;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
asm
|
||||||
|
movq %gs:(8),%rax
|
||||||
|
movq %rax,st
|
||||||
|
end;
|
||||||
|
StackTop:=st;
|
||||||
{ pass dummy value }
|
{ pass dummy value }
|
||||||
StackLength := CheckInitialStkLen($1000000);
|
StackLength := CheckInitialStkLen($1000000);
|
||||||
StackBottom := StackTop - StackLength;
|
StackBottom := StackTop - StackLength;
|
||||||
|
Loading…
Reference in New Issue
Block a user