mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-22 11:49:23 +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'];
|
||||
var
|
||||
ST : pointer;
|
||||
begin
|
||||
IsLibrary:=false;
|
||||
{ install the handlers for exe only ?
|
||||
@ -204,11 +202,6 @@ procedure Exe_entry;[public,alias:'_FPC_EXE_Entry'];
|
||||
install_exception_handlers;
|
||||
{$endif FPC_USE_WIN64_SEH}
|
||||
ExitCode:=0;
|
||||
asm
|
||||
movq %rsp,%rax
|
||||
movq %rax,st
|
||||
end;
|
||||
StackTop:=st;
|
||||
asm
|
||||
xorq %rax,%rax
|
||||
movw %ss,%ax
|
||||
@ -504,8 +497,15 @@ asm
|
||||
subq %gs:(16),%rax
|
||||
end;
|
||||
|
||||
var
|
||||
st : Pointer;
|
||||
|
||||
begin
|
||||
asm
|
||||
movq %gs:(8),%rax
|
||||
movq %rax,st
|
||||
end;
|
||||
StackTop:=st;
|
||||
{ pass dummy value }
|
||||
StackLength := CheckInitialStkLen($1000000);
|
||||
StackBottom := StackTop - StackLength;
|
||||
|
Loading…
Reference in New Issue
Block a user