Changeset 59054 in vbox
- Timestamp:
- Dec 8, 2015 12:37:28 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/asm/ASMAtomicXchgU64.asm
r56290 r59054 38 38 ; @param u64New x86:ebp+c gcc:rsi msc:rdx 39 39 ; 40 ; @returns bool result: true if successfully exchanged, false if not. 41 ; x86:al 40 ; @returns Current (i.e. old) *pu64 value (x86:eax:edx, 64-bit: rax) 42 41 ; 43 42 BEGINPROC_EXPORTED ASMAtomicXchgU64 44 43 %ifdef RT_ARCH_AMD64 45 44 %ifdef ASM_CALL64_MSC 46 mov rax, r8 47 .try_again: 48 lock cmpxchg [rcx], rdx 45 xchg [rcx], rdx 49 46 %else 50 .try_again: 51 mov rax, rcx 52 lock cmpxchg [rdi], rsi 47 xchg [rdi], rsi 53 48 %endif 54 jnz .try_again55 49 ret 56 50 %endif
Note:
See TracChangeset
for help on using the changeset viewer.