mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 18:29:09 +02:00
* sbrk error handling corrected
This commit is contained in:
parent
d841f44994
commit
ecdebd2dd0
@ -290,19 +290,24 @@ begin
|
|||||||
{$ENDIF CONTHEAP}
|
{$ENDIF CONTHEAP}
|
||||||
asm
|
asm
|
||||||
movl size,%edx
|
movl size,%edx
|
||||||
movw $0x7f00,%ax
|
movw $0x7f00,%eax
|
||||||
call syscall { result directly in EAX }
|
call syscall { result directly in EAX }
|
||||||
|
@Sbrk_End:
|
||||||
mov %eax,L
|
mov %eax,L
|
||||||
end ['eax', 'edx'];
|
end ['eax', 'edx'];
|
||||||
WriteLn ('New heap at ', L);
|
WriteLn ('New heap at ', L);
|
||||||
Sbrk := pointer(L);
|
Sbrk := pointer (L);
|
||||||
end;
|
end;
|
||||||
{$ELSE DUMPGROW}
|
{$ELSE DUMPGROW}
|
||||||
assembler;
|
assembler;
|
||||||
asm
|
asm
|
||||||
movl size,%edx
|
movl size,%edx
|
||||||
movw $0x7f00,%ax
|
movw $0x7f00,%eax
|
||||||
call syscall { result directly in EAX }
|
call syscall
|
||||||
|
inc eax { Result in EAX, -1 = error (has to be transformed to 0) }
|
||||||
|
jz Sbrk_End
|
||||||
|
dec eax { No error - back to previous value }
|
||||||
|
@Sbrk_End:
|
||||||
end ['eax', 'edx'];
|
end ['eax', 'edx'];
|
||||||
{$ENDIF DUMPGROW}
|
{$ENDIF DUMPGROW}
|
||||||
|
|
||||||
@ -1238,7 +1243,10 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.10 2003-10-07 21:33:24 hajny
|
Revision 1.11 2003-10-12 10:45:36 hajny
|
||||||
|
* sbrk error handling corrected
|
||||||
|
|
||||||
|
Revision 1.10 2003/10/07 21:33:24 hajny
|
||||||
* stdcall fixes and asm routines cleanup
|
* stdcall fixes and asm routines cleanup
|
||||||
|
|
||||||
Revision 1.9 2003/10/04 17:53:08 hajny
|
Revision 1.9 2003/10/04 17:53:08 hajny
|
||||||
|
@ -460,17 +460,25 @@ begin
|
|||||||
movl size,%edx
|
movl size,%edx
|
||||||
movw $0x7f00,%ax
|
movw $0x7f00,%ax
|
||||||
call syscall { result directly in EAX }
|
call syscall { result directly in EAX }
|
||||||
|
inc eax { Result in EAX, -1 = error (has to be transformed to 0) }
|
||||||
|
jz Sbrk_End
|
||||||
|
dec eax { No error - back to previous value }
|
||||||
|
@Sbrk_End:
|
||||||
mov %eax,L
|
mov %eax,L
|
||||||
end ['eax', 'edx'];
|
end ['eax', 'edx'];
|
||||||
WriteLn ('New heap at ', L);
|
WriteLn ('New heap at ', L);
|
||||||
Sbrk := pointer(L);
|
Sbrk := pointer (L);
|
||||||
end;
|
end;
|
||||||
{$ELSE DUMPGROW}
|
{$ELSE DUMPGROW}
|
||||||
assembler;
|
assembler;
|
||||||
asm
|
asm
|
||||||
movl size,%edx
|
movl size,%edx
|
||||||
movw $0x7f00,%ax
|
movw $0x7f00,%ax
|
||||||
call syscall { result directly in EAX }
|
call syscall
|
||||||
|
inc eax { Result in EAX, -1 = error (has to be transformed to 0) }
|
||||||
|
jz Sbrk_End
|
||||||
|
dec eax { No error - back to previous value }
|
||||||
|
@Sbrk_End:
|
||||||
end ['eax', 'edx'];
|
end ['eax', 'edx'];
|
||||||
{$ENDIF DUMPGROW}
|
{$ENDIF DUMPGROW}
|
||||||
|
|
||||||
@ -1150,7 +1158,10 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.40 2003-10-07 21:26:35 hajny
|
Revision 1.41 2003-10-12 10:45:36 hajny
|
||||||
|
* sbrk error handling corrected
|
||||||
|
|
||||||
|
Revision 1.40 2003/10/07 21:26:35 hajny
|
||||||
* stdcall fixes and asm routines cleanup
|
* stdcall fixes and asm routines cleanup
|
||||||
|
|
||||||
Revision 1.39 2003/10/06 16:58:27 yuri
|
Revision 1.39 2003/10/06 16:58:27 yuri
|
||||||
|
Loading…
Reference in New Issue
Block a user