Changeset 2305 in vbox for trunk/include/iprt/asm.h
- Timestamp:
- Apr 21, 2007 1:35:03 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/asm.h
r2304 r2305 31 31 32 32 #ifdef _MSC_VER 33 # pragma intrinsic(_ReadWriteBarrier)34 33 # if _MSC_VER >= 1400 35 34 # define RT_INLINE_ASM_USES_INTRIN 1 36 35 # include <intrin.h> 37 36 /* Emit the intrinsics at all optimization levels. */ 37 # pragma intrinsic(_ReadWriteBarrier) 38 38 # pragma intrinsic(__cpuid) 39 39 # pragma intrinsic(_enable) … … 1516 1516 * trapping instruction, etc. 1517 1517 */ 1518 #if RT_INLINE_ASM_GNU_STYLE 1519 # define ASMCompilerBarrier() do { __asm__ __volatile__ ("" : : : "memory"); } while (0) 1520 #elif RT_INLINE_ASM_USES_INTRIN 1521 # define ASMCompilerBarrier() do { _ReadWriteBarrier(); } while (0) 1522 #else /* 2003 should have _ReadWriteBarrier() but I guess we're at 2002 level then... */ 1518 1523 DECLINLINE(void) ASMCompilerBarrier(void) 1519 1524 { 1520 #if RT_INLINE_ASM_GNU_STYLE 1521 __asm__ __volatile__ ("" : : : "memory");1522 #else 1523 _ReadWriteBarrier(); 1525 __asm 1526 { 1527 } 1528 } 1524 1529 #endif 1525 }1526 1530 1527 1531
Note:
See TracChangeset
for help on using the changeset viewer.