VirtualBox

Changeset 78422 in vbox


Ignore:
Timestamp:
May 7, 2019 9:55:50 AM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
130421
Message:

iprt/asm-amd64-x86.h: Don't use readeflags & writeeflags as they (or at least the latter) seems to confuse compiler optimizations and also is said to have other reordering issues. bugref:9180

File:
1 edited

Legend:

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

    r76886 r78422  
    8181# endif
    8282# if RT_INLINE_ASM_USES_INTRIN >= 15
    83 #  pragma intrinsic(__readeflags)
    84 #  pragma intrinsic(__writeeflags)
     83/*#  pragma intrinsic(__readeflags)  - buggy intrinsics in VC++ 2010, reordering/optimizers issues
     84#  pragma intrinsic(__writeeflags) */
    8585#  pragma intrinsic(__rdtscp)
    8686# endif
     
    552552 * @returns [RE]FLAGS.
    553553 */
    554 #if RT_INLINE_ASM_EXTERNAL && RT_INLINE_ASM_USES_INTRIN < 15
     554#if RT_INLINE_ASM_EXTERNAL /*&& RT_INLINE_ASM_USES_INTRIN < 15 - buggy intrinsics in VC++ 2010, reordering/optimizers issues. */
    555555RT_ASM_DECL_PRAGMA_WATCOM(RTCCUINTREG) ASMGetFlags(void);
    556556#else
     
    591591 * @param   uFlags      The new [RE]FLAGS value.
    592592 */
    593 #if RT_INLINE_ASM_EXTERNAL && RT_INLINE_ASM_USES_INTRIN < 15
     593#if RT_INLINE_ASM_EXTERNAL /*&& RT_INLINE_ASM_USES_INTRIN < 15 - see __readeflags() above. */
    594594RT_ASM_DECL_PRAGMA_WATCOM(void) ASMSetFlags(RTCCUINTREG uFlags);
    595595#else
     
    630630 * @param   fOrEfl      Flags to be set.
    631631 */
    632 #if RT_INLINE_ASM_EXTERNAL && RT_INLINE_ASM_USES_INTRIN < 15
     632#if RT_INLINE_ASM_EXTERNAL /*&& RT_INLINE_ASM_USES_INTRIN < 15 - buggy intrinsics in VC++ 2010, reordering/optimizers issues. */
    633633RT_ASM_DECL_PRAGMA_WATCOM(RTCCUINTREG) ASMChangeFlags(RTCCUINTREG fAndEfl, RTCCUINTREG fOrEfl);
    634634#else
     
    697697 * @param   fOrEfl      The flags to be set (ORed in).
    698698 */
    699 #if RT_INLINE_ASM_EXTERNAL && RT_INLINE_ASM_USES_INTRIN < 15
     699#if RT_INLINE_ASM_EXTERNAL /*&& RT_INLINE_ASM_USES_INTRIN < 15 - buggy intrinsics in VC++ 2010, reordering/optimizers issues. */
    700700RT_ASM_DECL_PRAGMA_WATCOM(RTCCUINTREG) ASMAddFlags(RTCCUINTREG fOrEfl);
    701701#else
     
    752752 * @param   fAndEfl      The flags to keep.
    753753 */
    754 #if RT_INLINE_ASM_EXTERNAL && RT_INLINE_ASM_USES_INTRIN < 15
     754#if RT_INLINE_ASM_EXTERNAL /*&& RT_INLINE_ASM_USES_INTRIN < 15 - buggy intrinsics in VC++ 2010, reordering/optimizers issues. */
    755755RT_ASM_DECL_PRAGMA_WATCOM(RTCCUINTREG) ASMClearFlags(RTCCUINTREG fAndEfl);
    756756#else
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