Browse Source

* swapped parameters of InterlockedCompareExchange

git-svn-id: trunk@3366 -
florian 19 years ago
parent
commit
729cd9a773
1 changed files with 5 additions and 5 deletions
  1. 5 5
      rtl/x86_64/sysutilp.inc

+ 5 - 5
rtl/x86_64/sysutilp.inc

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