* fixed compile after exitcode size change

git-svn-id: trunk@6559 -
This commit is contained in:
peter 2007-02-19 16:11:01 +00:00
parent 59f3041e67
commit d1d7c59244
6 changed files with 28 additions and 0 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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;