VirtualBox

Changeset 5489 in vbox


Ignore:
Timestamp:
Oct 25, 2007 1:43:43 AM (17 years ago)
Author:
vboxsync
Message:

Some hacks from yesterday.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/asmdefs.mac

    r4256 r5489  
    55;
    66;  Copyright (C) 2006-2007 innotek GmbH
    7 ; 
     7;
    88;  This file is part of VirtualBox Open Source Edition (OSE), as
    99;  available from http://www.virtualbox.org. This file is free software;
     
    7070; Gets the pointer to an imported object.
    7171%ifdef ASM_FORMAT_PE
    72 %define IMP(name)       dword [IMPNAME(name)]
    73 %else
    74 %define IMP(name)       IMPNAME(name)
     72 %ifdef RT_ARCH_AMD64
     73  %define IMP(name)       qword [IMPNAME(name) wrt rip]
     74 %else
     75  %define IMP(name)       dword [IMPNAME(name)]
     76 %endif
     77%else
     78 %define IMP(name)       IMPNAME(name)
    7579%endif
    7680
  • trunk/src/VBox/Runtime/common/time/timesupA.asm

    r5463 r5489  
    3737
    3838BEGINDATA
    39 extern NAME(g_pSUPGlobalInfoPage)
     39%undef IN_SUPLIB
     40%undef IMPORTED_SUPLIB
     41%ifdef IN_SUP_R0
     42 %define IN_SUPLIB
     43%endif
     44%ifdef IN_SUP_R3
     45 %define IN_SUPLIB
     46%endif
     47%ifdef IN_SUP_GC
     48 %define IN_SUPLIB
     49%endif
     50%ifdef IN_SUPLIB
     51 extern NAME(g_pSUPGlobalInfoPage)
     52%elifdef IN_RING0
     53 %ifdef RT_OS_WINDOWS
     54  %define IMPORTED_SUPLIB
     55  extern IMPNAME(g_SUPGlobalInfoPage)
     56 %else
     57  extern NAME(g_SUPGlobalInfoPage)
     58 %endif
     59%else
     60 %ifdef RT_OS_WINDOWS
     61  %define IMPORTED_SUPLIB
     62  extern IMPNAME(g_pSUPGlobalInfoPage)
     63 %else
     64  extern NAME(g_pSUPGlobalInfoPage)
     65 %endif
     66%endif
     67
    4068
    4169BEGINCODE
  • trunk/src/VBox/Runtime/common/time/timesupA.mac

    r5484 r5489  
    6666    ; Load pGip and calc pGipCPU, setting u32ApicIdPlus if necessary.
    6767    ;
     68%ifdef IMPORTED_SUPLIB
     69    mov     esi, IMP(g_pSUPGlobalInfoPage)
     70    mov     esi, [esi]
     71%else
    6872    mov     esi, [NAME(g_pSUPGlobalInfoPage)]
     73%endif
    6974    or      esi, esi
    7075    jz      .Rediscover
     
    464469    ;
    465470    ; Load pGip and calc pGipCPU, setting u32ApicIdPlus if necessary.
    466     ;
     471    ; Finding the GIP is fun...
     472    ;
     473%ifdef RT_OS_WINDOWS
     474 %ifdef IMPORTED_SUPLIB
     475  %ifdef IN_RING0
     476    mov     rax, qword IMP(g_SUPGlobalInfoPage)
     477    mov     pGip, rax
     478  %else
     479    mov     pGip, [IMP(g_pSUPGlobalInfoPage) wrt rip]
     480    mov     pGip, [pGip]
     481  %endif
     482 %else
     483    mov     pGip, [NAME(g_pSUPGlobalInfoPage) wrt rip]
     484 %endif
     485%else
     486 %ifdef IN_RING0
     487    mov     rax, qword NAME(g_SUPGlobalInfoPage)
     488    mov     pGip, rax
     489 %else
     490    mov     pGip, [rel NAME(g_pSUPGlobalInfoPage) wrt ..gotpcrel]
     491    mov     pGip, [pGip]
     492 %endif
     493%endif
     494    or      pGip, pGip
     495    jz      .Rediscover
     496    cmp     dword [pGip + SUPGLOBALINFOPAGE.u32Magic], SUPGLOBALINFOPAGE_MAGIC
     497    jne     .Rediscover
     498
    467499%ifdef ASYNC_GIP
    468500    ; u8ApicId = ASMGetApicId();
     
    476508    mov     eax, SUPGIPCPU_size
    477509    mul     ebx
    478  %ifdef RT_OS_WINDOWS
    479     mov     pGip, [NAME(g_pSUPGlobalInfoPage) wrt rip]
    480  %else
    481     mov     pGip, [rel NAME(g_pSUPGlobalInfoPage) wrt ..gotpcrel]
    482     mov     pGip, [pGip]
    483  %endif
    484510    lea     pGipCPU, [pGip + rax + SUPGLOBALINFOPAGE.aCPUs]
    485 ;    lea     pGipCPU, [pGip + SUPGLOBALINFOPAGE.aCPUs]
    486 ;    lea     pGipCPU, [pGipCPU + rax]
    487511%else
    488  %ifdef RT_OS_WINDOWS
    489     mov     pGip, [NAME(g_pSUPGlobalInfoPage) wrt rip]
    490  %else
    491     mov     pGip, [rel NAME(g_pSUPGlobalInfoPage) wrt ..gotpcrel]
    492     mov     pGip, [pGip]
    493  %endif
    494512    lea     pGipCPU, [pGip + SUPGLOBALINFOPAGE.aCPUs]
    495513%endif
    496     or      pGip, pGip
    497     jz      .Rediscover
    498     cmp     dword [pGip + SUPGLOBALINFOPAGE.u32Magic], SUPGLOBALINFOPAGE_MAGIC
    499     jne     .Rediscover
    500514
    501515%ifdef NEED_TRANSACTION_ID
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