VirtualBox

Changeset 48572 in vbox for trunk/include/iprt


Ignore:
Timestamp:
Sep 20, 2013 12:17:16 AM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
89127
Message:

asm-amd64-x86.h: Use writeeflags and readeflags with visual C++. Makes life simpler when building EFI.

Location:
trunk/include/iprt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/asm-amd64-x86.h

    r46925 r48572  
    6969#  pragma intrinsic(__writecr8)
    7070# endif
     71# if RT_INLINE_ASM_USES_INTRIN >= 15
     72#  pragma intrinsic(__readeflags)
     73#  pragma intrinsic(__writeeflags)
     74# endif
    7175#endif
    7276
     
    378382 * @returns [RE]FLAGS.
    379383 */
    380 #if RT_INLINE_ASM_EXTERNAL
     384#if RT_INLINE_ASM_EXTERNAL && RT_INLINE_ASM_USES_INTRIN < 15
    381385DECLASM(RTCCUINTREG) ASMGetFlags(void);
    382386#else
     
    394398                         : "=r" (uFlags));
    395399#  endif
     400# elif RT_INLINE_ASM_USES_INTRIN >= 15
     401    uFlags = __readeflags();
    396402# else
    397403    __asm
     
    415421 * @param   uFlags      The new [RE]FLAGS value.
    416422 */
    417 #if RT_INLINE_ASM_EXTERNAL
     423#if RT_INLINE_ASM_EXTERNAL && RT_INLINE_ASM_USES_INTRIN < 15
    418424DECLASM(void) ASMSetFlags(RTCCUINTREG uFlags);
    419425#else
     
    430436                         : : "g" (uFlags));
    431437#  endif
     438# elif RT_INLINE_ASM_USES_INTRIN >= 15
     439    __writeeflags(uFlags);
    432440# else
    433441    __asm
  • trunk/include/iprt/cdefs.h

    r47435 r48572  
    26552655 * Otherwise it is 0. */
    26562656#ifdef _MSC_VER
    2657 # if   _MSC_VER >= 1700
     2657# if   _MSC_VER >= 1700 /* Visual C++ v11.0 / 2012 */
    26582658#  define RT_INLINE_ASM_USES_INTRIN 17
    2659 # elif _MSC_VER >= 1600
     2659# elif _MSC_VER >= 1600 /* Visual C++ v10.0 / 2010 */
    26602660#  define RT_INLINE_ASM_USES_INTRIN 16
    2661 # elif _MSC_VER >= 1500
     2661# elif _MSC_VER >= 1500 /* Visual C++ v9.0 / 2008 */
    26622662#  define RT_INLINE_ASM_USES_INTRIN 15
    2663 # elif _MSC_VER >= 1400
     2663# elif _MSC_VER >= 1400 /* Visual C++ v8.0 / 2005 */
    26642664#  define RT_INLINE_ASM_USES_INTRIN 14
    26652665# endif
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette