Ver código fonte

* swapped parameters of InterlockedCompareExchange

git-svn-id: trunk@3366 -
florian 19 anos atrás
pai
commit
729cd9a773
1 arquivos alterados com 5 adições e 5 exclusões
  1. 5 5
      rtl/x86_64/sysutilp.inc

+ 5 - 5
rtl/x86_64/sysutilp.inc

@@ -75,15 +75,15 @@ asm
 end;
 
 
-function InterLockedCompareExchange(var Target: longint; Compare, NewValue: longint): longint; assembler;
+function InterLockedCompareExchange(var Target: longint; NewValue, Compare : longint): longint; assembler;
 asm
 {$ifdef win64}
-        movl            %r8d,%eax
+        movl            %edx,%eax
         lock
-        cmpxchgl        %edx,(%rcx)
+        cmpxchgl        %r8d,(%rcx)
 {$else win64}
-        movl            %edx,%eax
+        movl            %esi,%eax
         lock
-        cmpxchgl        %esi,(%rdi)
+        cmpxchgl        %edx,(%rdi)
 {$endif win64}
 end;