mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 11:09:42 +02:00
* fixed compile after exitcode size change
git-svn-id: trunk@6559 -
This commit is contained in:
parent
59f3041e67
commit
d1d7c59244
@ -92,7 +92,11 @@ end;
|
||||
procedure _FPC_libc_haltproc; assembler; nostackframe; public name '_haltproc';
|
||||
asm
|
||||
.Lhaltproc:
|
||||
{$if sizeof(ExitCode)=2}
|
||||
movzwl ExitCode,%ebx
|
||||
{$else}
|
||||
mov ExitCode,%ebx
|
||||
{$endif}
|
||||
pushl %ebx
|
||||
call libc_exit
|
||||
xorl %eax,%eax
|
||||
|
@ -100,7 +100,11 @@ end;
|
||||
|
||||
procedure _FPC_libc21_haltproc; assembler; nostackframe; public name '_haltproc';
|
||||
asm
|
||||
{$if sizeof(ExitCode)=2}
|
||||
movzwl ExitCode,%eax
|
||||
{$else}
|
||||
mov ExitCode,%eax
|
||||
{$endif}
|
||||
|
||||
movl libc21_fpc_ret,%edx { return to libc }
|
||||
movl libc21_fpc_ret_ebp,%ebp
|
||||
|
@ -131,7 +131,11 @@ end;
|
||||
|
||||
procedure _FPC_libc21_gprof_haltproc; assembler; nostackframe; public name '_haltproc';
|
||||
asm
|
||||
{$if sizeof(ExitCode)=2}
|
||||
movzwl ExitCode,%eax
|
||||
{$else}
|
||||
mov ExitCode,%eax
|
||||
{$endif}
|
||||
|
||||
movl libc21_fpc_ret,%edx { return to libc }
|
||||
movl libc21_fpc_ret_ebx,%ebx
|
||||
|
@ -87,7 +87,11 @@ asm
|
||||
{$ifdef FPC_PIC}
|
||||
pushl %ebx
|
||||
movl ExitCode@GOT(%ebx),%ebx
|
||||
{$if sizeof(ExitCode)=2}
|
||||
movzwl (%ebx),%ebx
|
||||
{$else}
|
||||
mov (%ebx),%ebx
|
||||
{$endif}
|
||||
{$endif}
|
||||
int $0x80
|
||||
jmp .Lhaltproc
|
||||
|
@ -89,7 +89,11 @@ end;
|
||||
procedure _FPC_proc_gprof_haltproc; assembler; nostackframe; public name '_haltproc';
|
||||
asm
|
||||
.Lhaltproc:
|
||||
{$if sizeof(ExitCode)=2}
|
||||
movzwl ExitCode,%ebx
|
||||
{$else}
|
||||
mov ExitCode,%ebx
|
||||
{$endif}
|
||||
pushl %ebx
|
||||
call libc_exit { call libc exit, this will write the gmon.out }
|
||||
movl syscall_nr_exit_group,%eax
|
||||
|
@ -70,10 +70,18 @@ procedure _FPC_proc_haltproc; assembler; nostackframe; public name '_haltproc';
|
||||
asm
|
||||
.Lhaltproc:
|
||||
movl syscall_nr_exit_group,%eax
|
||||
{$if sizeof(ExitCode)=2}
|
||||
movzwl ExitCode,%ebx
|
||||
{$else}
|
||||
mov ExitCode,%ebx
|
||||
{$endif}
|
||||
int $0x80
|
||||
movl syscall_nr_exit,%eax
|
||||
{$if sizeof(ExitCode)=2}
|
||||
movzwl ExitCode,%ebx
|
||||
{$else}
|
||||
mov ExitCode,%ebx
|
||||
{$endif}
|
||||
int $0x80
|
||||
jmp .Lhaltproc
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user