VirtualBox

Changeset 2144

Show
Ignore:
Timestamp:
04/17/07 22:44:42 (2 years ago)
Author:
vboxsync
Message:

added ASMMemoryClobber()

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • 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/** 

© 2008 Sun Microsystems, Inc.
ContactPrivacy policy