Fix loading of argc field (longint type) of TEntryInformation.OS record

git-svn-id: trunk@37329 -
This commit is contained in:
pierre 2017-09-26 21:02:45 +00:00
parent 1c69ae6a15
commit a706c3900f
2 changed files with 4 additions and 2 deletions

View File

@ -128,7 +128,8 @@ procedure _FPC_libc_start; assembler; nostackframe; public name '_start';
{$ifdef FPC_HAS_INDIRECT_ENTRY_INFORMATION}
movq SysInitEntryInformation@GOTPCREL(%rip),%rcx
movl %rsi,TEntryInformation.OS.argc(%rcx)
{ argc is longint in EntryInformation, thus use %edi register }
movl %esi,TEntryInformation.OS.argc(%rcx)
movq %rsp,TEntryInformation.OS.argv(%rcx)
movq %rsp,(%rax)
leaq 8(,%rsi,8),%rax

View File

@ -93,7 +93,8 @@ procedure ini_dummy;
{$ifdef FPC_HAS_INDIRECT_ENTRY_INFORMATION}
movq SysInitEntryInformation@GOTPCREL(%rip),%rcx
movl %rsi,TEntryInformation.OS.argc(%rcx)
{ argc is longint in EntryInformation, thus use %edi register }
movl %esi,TEntryInformation.OS.argc(%rcx)
movq %rsp,TEntryInformation.OS.argv(%rcx)
movq %rsp,(%rax)
leaq 8(,%rsi,8),%rax