VirtualBox

Changeset 2144 in vbox for trunk/include/iprt


Ignore:
Timestamp:
Apr 17, 2007 8:44:42 PM (18 years ago)
Author:
vboxsync
Message:

added ASMMemoryClobber()

File:
1 edited

Legend:

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

    r1905 r2144  
    15051505
    15061506
    1507 /** @deprecated */
    1508 #define ASMOutB(p, b)   ASMOutU8(p,b)
    1509 /** @deprecated */
    1510 #define ASMInB(p)       ASMInU8(p)
     1507/**
     1508 * Ensure that gcc does not use any register value before this instruction. This function is used
     1509 * for assembler instructions with side-effects, e.g. port writes to magical guest ports causing
     1510 * guest memory changes by the host
     1511 */
     1512#if RT_INLINE_ASM_GNU_STYLE
     1513DECLINLINE(void) ASMMemoryClobber(void)
     1514{
     1515    __asm__ __volatile__ ("" : : : "memory");
     1516}
     1517#else
     1518DECLINLINE(void) ASMMemoryClobber(void)
     1519{
     1520}
     1521#endif
    15111522
    15121523/**
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