mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-05 16:08:01 +02:00
* the class helper routines doesn't store the registers properly,
fixed
This commit is contained in:
parent
b6a9251cf3
commit
e3dc06bceb
@ -260,14 +260,23 @@ end;
|
|||||||
|
|
||||||
procedure int_new_class;assembler;[public,alias:'FPC_NEW_CLASS'];
|
procedure int_new_class;assembler;[public,alias:'FPC_NEW_CLASS'];
|
||||||
asm
|
asm
|
||||||
|
{ to be sure in the future, we save also edit }
|
||||||
|
pushl %edi
|
||||||
{ create class ? }
|
{ create class ? }
|
||||||
movl 8(%ebp),%edi
|
movl 8(%ebp),%edi
|
||||||
orl %edi,%edi
|
orl %edi,%edi
|
||||||
jz .LNEW_CLASS1
|
jz .LNEW_CLASS1
|
||||||
|
{ save registers !! }
|
||||||
|
pushl %ebx
|
||||||
|
pushl %ecx
|
||||||
|
pushl %edx
|
||||||
{ esi contains the vmt }
|
{ esi contains the vmt }
|
||||||
pushl %esi
|
pushl %esi
|
||||||
{ call newinstance (class method!) }
|
{ call newinstance (class method!) }
|
||||||
call *16(%esi)
|
call *16(%esi)
|
||||||
|
popl %edx
|
||||||
|
popl %ecx
|
||||||
|
popl %ebx
|
||||||
{ newinstance returns a pointer to the new created }
|
{ newinstance returns a pointer to the new created }
|
||||||
{ instance in eax }
|
{ instance in eax }
|
||||||
{ load esi and insert self }
|
{ load esi and insert self }
|
||||||
@ -275,22 +284,35 @@ asm
|
|||||||
.LNEW_CLASS1:
|
.LNEW_CLASS1:
|
||||||
movl %esi,8(%ebp)
|
movl %esi,8(%ebp)
|
||||||
orl %eax,%eax
|
orl %eax,%eax
|
||||||
|
popl %edi
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure int_dispose_class;assembler;[public,alias:'FPC_DISPOSE_CLASS'];
|
procedure int_dispose_class;assembler;[public,alias:'FPC_DISPOSE_CLASS'];
|
||||||
asm
|
asm
|
||||||
|
{ to be sure in the future, we save also edit }
|
||||||
|
pushl %edi
|
||||||
{ destroy class ? }
|
{ destroy class ? }
|
||||||
movl 12(%ebp),%edi
|
movl 12(%ebp),%edi
|
||||||
orl %edi,%edi
|
orl %edi,%edi
|
||||||
jz .LDISPOSE_CLASS1
|
jz .LDISPOSE_CLASS1
|
||||||
{ no inherited call }
|
{ no inherited call }
|
||||||
movl (%esi),%edi
|
movl (%esi),%edi
|
||||||
|
{ save registers !! }
|
||||||
|
pushl %eax
|
||||||
|
pushl %ebx
|
||||||
|
pushl %ecx
|
||||||
|
pushl %edx
|
||||||
{ push self }
|
{ push self }
|
||||||
pushl %esi
|
pushl %esi
|
||||||
{ call freeinstance }
|
{ call freeinstance }
|
||||||
call *20(%edi)
|
call *20(%edi)
|
||||||
|
popl %edx
|
||||||
|
popl %ecx
|
||||||
|
popl %ebx
|
||||||
|
popl %eax
|
||||||
.LDISPOSE_CLASS1:
|
.LDISPOSE_CLASS1:
|
||||||
|
popl %edi
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$ifndef NEWATT}
|
{$ifndef NEWATT}
|
||||||
@ -772,7 +794,11 @@ end;
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.43 1999-04-08 11:30:57 peter
|
Revision 1.44 1999-04-19 06:13:28 florian
|
||||||
|
* the class helper routines doesn't store the registers properly,
|
||||||
|
fixed
|
||||||
|
|
||||||
|
Revision 1.43 1999/04/08 11:30:57 peter
|
||||||
* removed warnings
|
* removed warnings
|
||||||
|
|
||||||
Revision 1.42 1999/04/07 16:21:10 pierre
|
Revision 1.42 1999/04/07 16:21:10 pierre
|
||||||
|
Loading…
Reference in New Issue
Block a user