Changeset 25664 in vbox for trunk/src/VBox/Runtime/common
- Timestamp:
- Jan 6, 2010 3:56:01 AM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 56379
- Location:
- trunk/src/VBox/Runtime/common/asm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/asm/ASMAtomicCmpXchgU64.asm
r19605 r25664 39 39 ; Atomically compares and exchanges an unsigned 64-bit int. 40 40 ; 41 ; @param pu64 x86:ebp+8 42 ; @param u64New x86:ebp+c 43 ; @param u64Old x86:ebp+14 41 ; @param pu64 x86:ebp+8 gcc:rdi msc:rcx 42 ; @param u64New x86:ebp+c gcc:rsi msc:rdx 43 ; @param u64Old x86:ebp+14 gcc:rcx msc:r8 44 44 ; 45 45 ; @returns bool result: true if succesfully exchanged, false if not. … … 47 47 ; 48 48 BEGINPROC_EXPORTED ASMAtomicCmpXchgU64 49 %ifndef RT_ARCH_X86 50 %error port me 49 %ifdef RT_ARCH_AMD64 50 %ifdef ASM_CALL64_MSC 51 mov rax, r8 52 lock cmpxchg [rcx], rdx 53 %else 54 mov rax, rcx 55 lock cmpxchg [rdi], rsi 56 %endif 57 setz al 58 movzx eax, al 59 ret 51 60 %endif 61 %ifdef RT_ARCH_X86 52 62 push ebp 53 63 mov ebp, esp … … 68 78 leave 69 79 ret 80 %endif 70 81 ENDPROC ASMAtomicCmpXchgU64 71 82 -
trunk/src/VBox/Runtime/common/asm/ASMAtomicReadU64.asm
r19605 r25664 45 45 ; 46 46 BEGINPROC_EXPORTED ASMAtomicReadU64 47 %ifndef RT_ARCH_X86 48 %error port me 47 %ifdef RT_ARCH_AMD64 48 mfence ; ASSUME its present. 49 %ifdef ASM_CALL64_MSC 50 mov rax, [rcx] 51 %else 52 mov rax, [rdi] 53 %endif 54 ret 49 55 %endif 56 %ifdef RT_ARCH_X86 50 57 push ebp 51 58 mov ebp, esp … … 64 71 leave 65 72 ret 73 %endif 66 74 ENDPROC ASMAtomicReadU64 67 75
Note:
See TracChangeset
for help on using the changeset viewer.