VirtualBox

Changeset 2305 in vbox for trunk/include/iprt/asm.h


Ignore:
Timestamp:
Apr 21, 2007 1:35:03 AM (18 years ago)
Author:
vboxsync
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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
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