Skip to content

Commit

Permalink
Fix null check in RhpLockCmpXchg64 (#99934)
Browse files Browse the repository at this point in the history
  • Loading branch information
filipnavara committed Mar 19, 2024
1 parent fc46355 commit c27c66d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/coreclr/nativeaot/Runtime/i386/Interlocked.asm
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,17 @@ FASTCALL_FUNC RhpLockCmpXchg64, 20
_value$ = 16
_comparand$ = 8

ALTERNATE_ENTRY _RhpLockCmpXchg64AVLocation
;; Null check
cmp dword ptr [ecx], ecx

mov eax, DWORD PTR _comparand$[esp-4]
mov edx, DWORD PTR _comparand$[esp]
push ebx
mov ebx, DWORD PTR _value$[esp]
push esi
mov esi, ecx
mov ecx, DWORD PTR _value$[esp+8]
ALTERNATE_ENTRY _RhpLockCmpXchg64AVLocation
lock cmpxchg8b QWORD PTR [esi]
pop esi
pop ebx
Expand Down

0 comments on commit c27c66d

Please sign in to comment.