* fixed InterlockedCompareExchange

git-svn-id: trunk@3947 -
This commit is contained in:
Jonas Maebe 2006-06-25 18:52:12 +00:00
parent fe43dc6266
commit b9125f97d0

View File

@ -1176,13 +1176,14 @@ end;
function InterlockedCompareExchange(var Target: longint; NewValue: longint; Comperand: longint): longint; assembler;
asm
{$ifdef REGCALL}
xchgl %eax,%edx
xchgl %eax,%ecx
{$else}
movl Target,%edx
movl NewValue,%eax
movl Target,%ecx
movl NewValue,%edx
movl Comparand,%eax
{$endif}
lock
cmpxchgl %eax, (%edx)
cmpxchgl %edx, (%ecx)
end;