* some fixes for widestrings and variants

This commit is contained in:
florian 2001-05-31 22:42:56 +00:00
parent 2313cc3ada
commit a4755024cc
2 changed files with 19 additions and 17 deletions

View File

@ -1076,47 +1076,49 @@ end;
{ do a thread save inc/dec } { do a thread save inc/dec }
procedure declocked(var l : longint);assembler; function declocked(var l : longint) : boolean;assembler;
asm asm
movl l,%edi
{$ifdef MTRTL} {$ifdef MTRTL}
{ this check should be done because a lock takes a lot } { this check should be done because a lock takes a lot }
{ of time! } { of time! }
cmpb $0,IsMultithreaded cmpb $0,IsMultithreaded
jz .Ldeclockednolock jz .Ldeclockednolock
movl l,%edi
lock lock
decl (%edi) decl (%edi)
jmp .Ldeclockedend jmp .Ldeclockedend
.Ldeclockednolock: .Ldeclockednolock:
{$endif MTRTL} {$endif MTRTL}
movl l,%edi
decl (%edi); decl (%edi);
.Ldeclockedend: .Ldeclockedend:
end ['EDI']; setzb %al
end ['EDI','EAX'];
procedure inclocked(var l : longint);assembler; procedure inclocked(var l : longint);assembler;
asm asm
movl l,%edi
{$ifdef MTRTL} {$ifdef MTRTL}
{ this check should be done because a lock takes a lot } { this check should be done because a lock takes a lot }
{ of time! } { of time! }
cmpb $0,IsMultithreaded cmpb $0,IsMultithreaded
jz .Linclockednolock jz .Linclockednolock
movl l,%edi
lock lock
incl (%edi) incl (%edi)
jmp .Linclockedend jmp .Linclockedend
.Linclockednolock: .Linclockednolock:
{$endif MTRTL} {$endif MTRTL}
movl l,%edi incl (%edi)
incl (%edi);
.Linclockedend: .Linclockedend:
end ['EDI']; end ['EDI'];
{ {
$Log$ $Log$
Revision 1.11 2001-04-21 12:18:09 peter Revision 1.12 2001-05-31 22:42:56 florian
* some fixes for widestrings and variants
Revision 1.11 2001/04/21 12:18:09 peter
* add nop after popa (merged) * add nop after popa (merged)
Revision 1.9 2001/04/08 13:19:28 jonas Revision 1.9 2001/04/08 13:19:28 jonas
@ -1143,5 +1145,4 @@ procedure inclocked(var l : longint);assembler;
Revision 1.2 2000/07/13 11:33:41 michael Revision 1.2 2000/07/13 11:33:41 michael
+ removed logs + removed logs
}
}

View File

@ -289,11 +289,8 @@ asm
jmp .LExitAddRef jmp .LExitAddRef
// Dynamic Arrays // Dynamic Arrays
.LDoDynArrayAddRef: .LDoDynArrayAddRef:
movl Data,%eax pushl Data
orl %eax,%eax call FPC_DYNARRAY_INCR_REF
jz .LExitAddRef
lock
incl -8(%eax)
jmp .LExitAddRef jmp .LExitAddRef
.LDoClassAddRef: .LDoClassAddRef:
.LDoObjectAddRef: .LDoObjectAddRef:
@ -406,7 +403,7 @@ asm
.LDoDynArrayDecRef: .LDoDynArrayDecRef:
pushl TypeInfo pushl TypeInfo
pushl Data pushl Data
call DYNARRAY_DECR_REF call FPC_DYNARRAY_DECR_REF
jmp .LExitDecRef jmp .LExitDecRef
.LDoClassDecRef: .LDoClassDecRef:
.LDoObjectDecRef: .LDoObjectDecRef:
@ -476,7 +473,10 @@ end;
{ {
$Log$ $Log$
Revision 1.8 2001-04-23 18:25:44 peter Revision 1.9 2001-05-31 22:42:56 florian
* some fixes for widestrings and variants
Revision 1.8 2001/04/23 18:25:44 peter
* m68k updates * m68k updates
Revision 1.7 2000/11/09 17:49:34 florian Revision 1.7 2000/11/09 17:49:34 florian
@ -501,3 +501,4 @@ end;
Revision 1.2 2000/07/13 11:33:41 michael Revision 1.2 2000/07/13 11:33:41 michael
+ removed logs + removed logs
} }