Changeset 5489 in vbox
- Timestamp:
- Oct 25, 2007 1:43:43 AM (17 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/asmdefs.mac
r4256 r5489 5 5 ; 6 6 ; Copyright (C) 2006-2007 innotek GmbH 7 ; 7 ; 8 8 ; This file is part of VirtualBox Open Source Edition (OSE), as 9 9 ; available from http://www.virtualbox.org. This file is free software; … … 70 70 ; Gets the pointer to an imported object. 71 71 %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) 75 79 %endif 76 80 -
trunk/src/VBox/Runtime/common/time/timesupA.asm
r5463 r5489 37 37 38 38 BEGINDATA 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 40 68 41 69 BEGINCODE -
trunk/src/VBox/Runtime/common/time/timesupA.mac
r5484 r5489 66 66 ; Load pGip and calc pGipCPU, setting u32ApicIdPlus if necessary. 67 67 ; 68 %ifdef IMPORTED_SUPLIB 69 mov esi, IMP(g_pSUPGlobalInfoPage) 70 mov esi, [esi] 71 %else 68 72 mov esi, [NAME(g_pSUPGlobalInfoPage)] 73 %endif 69 74 or esi, esi 70 75 jz .Rediscover … … 464 469 ; 465 470 ; 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 467 499 %ifdef ASYNC_GIP 468 500 ; u8ApicId = ASMGetApicId(); … … 476 508 mov eax, SUPGIPCPU_size 477 509 mul ebx 478 %ifdef RT_OS_WINDOWS479 mov pGip, [NAME(g_pSUPGlobalInfoPage) wrt rip]480 %else481 mov pGip, [rel NAME(g_pSUPGlobalInfoPage) wrt ..gotpcrel]482 mov pGip, [pGip]483 %endif484 510 lea pGipCPU, [pGip + rax + SUPGLOBALINFOPAGE.aCPUs] 485 ; lea pGipCPU, [pGip + SUPGLOBALINFOPAGE.aCPUs]486 ; lea pGipCPU, [pGipCPU + rax]487 511 %else 488 %ifdef RT_OS_WINDOWS489 mov pGip, [NAME(g_pSUPGlobalInfoPage) wrt rip]490 %else491 mov pGip, [rel NAME(g_pSUPGlobalInfoPage) wrt ..gotpcrel]492 mov pGip, [pGip]493 %endif494 512 lea pGipCPU, [pGip + SUPGLOBALINFOPAGE.aCPUs] 495 513 %endif 496 or pGip, pGip497 jz .Rediscover498 cmp dword [pGip + SUPGLOBALINFOPAGE.u32Magic], SUPGLOBALINFOPAGE_MAGIC499 jne .Rediscover500 514 501 515 %ifdef NEED_TRANSACTION_ID
Note:
See TracChangeset
for help on using the changeset viewer.