VirtualBox

Changeset 46925 in vbox for trunk/include/iprt


Ignore:
Timestamp:
Jul 3, 2013 11:16:39 AM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
86928
Message:

VMM: Optimized world-switch with lazy restoration LDTR and TR on Intel.

File:
1 edited

Legend:

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

    r44528 r46925  
    351351
    352352/**
     353 * Get the LDTR register.
     354 * @returns LDTR.
     355 */
     356#if RT_INLINE_ASM_EXTERNAL
     357DECLASM(RTSEL) ASMGetLDTR(void);
     358#else
     359DECLINLINE(RTSEL) ASMGetLDTR(void)
     360{
     361    RTSEL SelLDTR;
     362# if RT_INLINE_ASM_GNU_STYLE
     363    __asm__ __volatile__("sldt %w0\n\t" : "=r" (SelLDTR));
     364# else
     365    __asm
     366    {
     367        sldt    ax
     368        mov     [SelLDTR], ax
     369    }
     370# endif
     371    return SelLDTR;
     372}
     373#endif
     374
     375
     376/**
    353377 * Get the [RE]FLAGS register.
    354378 * @returns [RE]FLAGS.
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