mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 08:09:33 +02:00
* another fix for locked reference counting
This commit is contained in:
parent
636f2ea7c9
commit
90f7f25d03
@ -20,6 +20,7 @@
|
||||
|
||||
function InterLockedDecrement (var Target: longint) : longint; assembler;
|
||||
asm
|
||||
movl %rdi,%rax
|
||||
movl $-1,%edx
|
||||
xchgq %rdx,%rax
|
||||
lock
|
||||
@ -30,6 +31,7 @@ end;
|
||||
|
||||
function InterLockedIncrement (var Target: longint) : longint; assembler;
|
||||
asm
|
||||
movl %rdi,%rax
|
||||
movl $1,%edx
|
||||
xchgq %rdx,%rax
|
||||
lock
|
||||
@ -40,23 +42,23 @@ end;
|
||||
|
||||
function InterLockedExchange (var Target: longint;Source : longint) : longint; assembler;
|
||||
asm
|
||||
xchgl (%rax),%edx
|
||||
movl %edx,%eax
|
||||
xchgl (%rdi),%rsi
|
||||
movl %rsi,%eax
|
||||
end;
|
||||
|
||||
|
||||
function InterLockedExchangeAdd (var Target: longint;Source : longint) : longint; assembler;
|
||||
asm
|
||||
xchgq %rax,%rdx
|
||||
xchgq %rdi,%rsi
|
||||
lock
|
||||
xaddl %eax, (%rdx)
|
||||
xaddl %rdi, (%rsi)
|
||||
end;
|
||||
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.3 2004-11-01 19:10:52 florian
|
||||
* Interlocked* fixed
|
||||
Revision 1.4 2004-11-01 20:31:35 florian
|
||||
* another fix for locked reference counting
|
||||
|
||||
Revision 1.2 2004/03/05 12:17:50 marco
|
||||
* interlocked* changed to longints, including winapi. (which was a bug)
|
||||
|
@ -318,7 +318,7 @@ procedure inclocked(var l : int64);assembler;
|
||||
incq (%rdi)
|
||||
jmp .Linclockedend
|
||||
.Linclockednolock:
|
||||
incl (%rdi)
|
||||
incq (%rdi)
|
||||
.Linclockedend:
|
||||
end;
|
||||
|
||||
@ -348,7 +348,10 @@ end;
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.13 2004-06-05 07:55:22 peter
|
||||
Revision 1.14 2004-11-01 20:31:35 florian
|
||||
* another fix for locked reference counting
|
||||
|
||||
Revision 1.13 2004/06/05 07:55:22 peter
|
||||
* fixed parameters of get_caller_*()
|
||||
|
||||
Revision 1.12 2004/05/01 15:59:17 florian
|
||||
@ -386,4 +389,4 @@ end;
|
||||
|
||||
Revision 1.1 2003/01/06 19:40:18 florian
|
||||
+ initial revision
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user