Changeset 10943 in vbox
- Timestamp:
- Jul 29, 2008 5:24:13 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/asm.h
r10939 r10943 3317 3317 * @remark This will fault if the memory is read-only! 3318 3318 */ 3319 #if RT_INLINE_ASM_EXTERNAL 3319 #if RT_INLINE_ASM_EXTERNAL && !defined(RT_ARCH_AMD64) 3320 3320 DECLASM(uint64_t) ASMAtomicReadU64(volatile uint64_t *pu64); 3321 3321 #else … … 3324 3324 uint64_t u64; 3325 3325 # ifdef RT_ARCH_AMD64 3326 # if RT_INLINE_ASM_GNU_STYLE3327 3326 Assert(!((uintptr_t)pu64 & 7)); 3327 /*# if RT_INLINE_ASM_GNU_STYLE 3328 3328 __asm__ __volatile__( "mfence\n\t" 3329 3329 "movq %1, %0\n\t" … … 3338 3338 mov [u64], rax 3339 3339 } 3340 # endif 3340 # endif*/ 3341 ASMMemoryFence(); 3342 u64 = *pu64; 3341 3343 # else /* !RT_ARCH_AMD64 */ 3342 3344 # if RT_INLINE_ASM_GNU_STYLE … … 3389 3391 * @remark This will fault if the memory is read-only! 3390 3392 */ 3391 #if RT_INLINE_ASM_EXTERNAL 3393 #if RT_INLINE_ASM_EXTERNAL && !defined(RT_ARCH_AMD64) 3392 3394 DECLASM(uint64_t) ASMAtomicUoReadU64(volatile uint64_t *pu64); 3393 3395 #else … … 3396 3398 uint64_t u64; 3397 3399 # ifdef RT_ARCH_AMD64 3398 # if RT_INLINE_ASM_GNU_STYLE 3400 Assert(!((uintptr_t)pu64 & 7)); 3401 /*# if RT_INLINE_ASM_GNU_STYLE 3399 3402 Assert(!((uintptr_t)pu64 & 7)); 3400 3403 __asm__ __volatile__("movq %1, %0\n\t" … … 3408 3411 mov [u64], rax 3409 3412 } 3410 # endif 3413 # endif */ 3414 u64 = *pu64; 3411 3415 # else /* !RT_ARCH_AMD64 */ 3412 3416 # if RT_INLINE_ASM_GNU_STYLE
Note:
See TracChangeset
for help on using the changeset viewer.