VirtualBox

Changeset 10943 in vbox


Ignore:
Timestamp:
Jul 29, 2008 5:24:13 PM (17 years ago)
Author:
vboxsync
Message:

iprt/asm.h: Fixed missing ASMAtomicReadU64 and ASMAtomicUoReadU64 on 64-bit windows.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/asm.h

    r10939 r10943  
    33173317 * @remark  This will fault if the memory is read-only!
    33183318 */
    3319 #if RT_INLINE_ASM_EXTERNAL
     3319#if RT_INLINE_ASM_EXTERNAL && !defined(RT_ARCH_AMD64)
    33203320DECLASM(uint64_t) ASMAtomicReadU64(volatile uint64_t *pu64);
    33213321#else
     
    33243324    uint64_t u64;
    33253325# ifdef RT_ARCH_AMD64
    3326 #  if RT_INLINE_ASM_GNU_STYLE
    33273326    Assert(!((uintptr_t)pu64 & 7));
     3327/*#  if RT_INLINE_ASM_GNU_STYLE
    33283328    __asm__ __volatile__(  "mfence\n\t"
    33293329                           "movq %1, %0\n\t"
     
    33383338        mov     [u64], rax
    33393339    }
    3340 #  endif
     3340#  endif*/
     3341    ASMMemoryFence();
     3342    u64 = *pu64;
    33413343# else /* !RT_ARCH_AMD64 */
    33423344#  if RT_INLINE_ASM_GNU_STYLE
     
    33893391 * @remark  This will fault if the memory is read-only!
    33903392 */
    3391 #if RT_INLINE_ASM_EXTERNAL
     3393#if RT_INLINE_ASM_EXTERNAL && !defined(RT_ARCH_AMD64)
    33923394DECLASM(uint64_t) ASMAtomicUoReadU64(volatile uint64_t *pu64);
    33933395#else
     
    33963398    uint64_t u64;
    33973399# ifdef RT_ARCH_AMD64
    3398 #  if RT_INLINE_ASM_GNU_STYLE
     3400    Assert(!((uintptr_t)pu64 & 7));
     3401/*#  if RT_INLINE_ASM_GNU_STYLE
    33993402    Assert(!((uintptr_t)pu64 & 7));
    34003403    __asm__ __volatile__("movq %1, %0\n\t"
     
    34083411        mov     [u64], rax
    34093412    }
    3410 #  endif
     3413#  endif */
     3414    u64 = *pu64;
    34113415# else /* !RT_ARCH_AMD64 */
    34123416#  if RT_INLINE_ASM_GNU_STYLE
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette