VirtualBox

Changeset 2305

Show
Ignore:
Timestamp:
04/21/07 03:35:03 (2 years ago)
Author:
vboxsync
Message:

We're using 2002 not 2003 it seems. too bad.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/include/iprt/asm.h

    r2304 r2305  
    3131 
    3232#ifdef _MSC_VER 
    33 # pragma intrinsic(_ReadWriteBarrier) 
    3433# if _MSC_VER >= 1400 
    3534#  define RT_INLINE_ASM_USES_INTRIN 1 
    3635#  include <intrin.h> 
    3736   /* Emit the intrinsics at all optimization levels. */ 
     37#  pragma intrinsic(_ReadWriteBarrier) 
    3838#  pragma intrinsic(__cpuid) 
    3939#  pragma intrinsic(_enable) 
     
    15161516 * trapping instruction, etc. 
    15171517 */ 
     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... */ 
    15181523DECLINLINE(void) ASMCompilerBarrier(void) 
    15191524{ 
    1520 #if RT_INLINE_ASM_GNU_STYLE 
    1521     __asm__ __volatile__ ("" : : : "memory"); 
    1522 #else 
    1523     _ReadWriteBarrier(); 
     1525    __asm  
     1526    { 
     1527    } 
     1528
    15241529#endif  
    1525 } 
    15261530 
    15271531 

© 2008 Sun Microsystems, Inc.
ContactPrivacy policy