VirtualBox

Changeset 3363 in vbox


Ignore:
Timestamp:
Jul 2, 2007 10:58:49 PM (18 years ago)
Author:
vboxsync
Message:

fixed access to sup page from RING0 with GNUC

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/sup.h

    r3283 r3363  
    214214}
    215215#  define g_pSUPGlobalInfoPage         (SUPGetGIP())
     216# elif defined(__GNUC__) && !defined(__DARWIN__)
     217/** gcc optimizes &g_SUPGlobalInfoPage + offset */
     218DECLINLINE(PCSUPGLOBALINFOPAGE) SUPGetGIP(void)
     219{
     220    PCSUPGLOBALINFOPAGE pGIP;
     221    __asm__ __volatile__ ("movl $g_SUPGlobalInfoPage,%0\n\t"
     222                          : "=a" (pGIP));
     223    return pGIP;
     224}
     225#  define g_pSUPGlobalInfoPage         (SUPGetGIP())
    216226# else
    217227#  define g_pSUPGlobalInfoPage         (&g_SUPGlobalInfoPage)
    218 #endif
     228# endif
    219229#else
    220230extern DECLIMPORT(PCSUPGLOBALINFOPAGE)  g_pSUPGlobalInfoPage;
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