- Timestamp:
- Jul 19, 2007 7:07:48 PM (18 years ago)
- Location:
- trunk/src/recompiler
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/recompiler/InnoTek/config-host.h
r2981 r3726 21 21 22 22 23 #if defined( __amd64__) || defined(HOST_X86_64) /* latter, for dyngen on win64. */23 #if defined(RT_ARCH_AMD64) || defined(HOST_X86_64) /* The latter, for dyngen when cross compiling (windows, l4, etc). */ 24 24 # define HOST_X86_64 1 25 25 # define HOST_LONG_BITS 64 … … 27 27 # define HOST_I386 1 28 28 # define HOST_LONG_BITS 32 29 # ifdef __WIN32__29 # ifdef RT_OS_WINDOWS 30 30 # define CONFIG_WIN32 1 31 # elif defined( __OS2__)31 # elif defined(RT_OS_OS2) 32 32 # define CONFIG_OS2 33 # elif defined( __DARWIN__)33 # elif defined(RT_OS_DARWIN) 34 34 # define CONFIG_DARWIN 35 # elif defined( __FREEBSD__) || defined(__NETBSD__) || defined(__OPENBSD__)35 # elif defined(RT_OS_FREEBSD) || defined(RT_OS_NETBSD) || defined(RT_OS_OPENBSD) 36 36 /*# define CONFIG_BSD*/ 37 # elif defined( __SOLARIS__)37 # elif defined(RT_OS_SOLARIS) 38 38 /*# define CONFIG_SUN*/ 39 39 # elif !defined(IPRT_NO_CRT) -
trunk/src/recompiler/VBoxREMWrapper.cpp
r3615 r3726 158 158 * use calling convention wrappers. 159 159 */ 160 #if (defined( __AMD64__) && defined(__WIN__)) || defined(__DOXYGEN__)160 #if (defined(RT_ARCH_AMD64) && defined(RT_OS_WINDOWS)) || defined(__DOXYGEN__) 161 161 # define USE_REM_CALLING_CONVENTION_GLUE 162 162 #endif … … 166 166 * emit some jump glue to deal with big addresses. 167 167 */ 168 #if (defined( __AMD64__) && !defined(USE_REM_CALLING_CONVENTION_GLUE) && !defined(__DARWIN__)) || defined(__DOXYGEN__)168 #if (defined(RT_ARCH_AMD64) && !defined(USE_REM_CALLING_CONVENTION_GLUE) && !defined(__DARWIN__)) || defined(__DOXYGEN__) 169 169 # define USE_REM_IMPORT_JUMP_GLUE 170 170 #endif … … 217 217 * For REMPARMDESC_FLAGS_PFN this is a PREMFNDESC. */ 218 218 void *pvExtra; 219 219 220 220 } REMPARMDESC, *PREMPARMDESC; 221 221 /** Pointer to a constant parameter descriptor. */ … … 486 486 { REMPARMDESC_FLAGS_INT, sizeof(CSAMTAG), NULL } 487 487 }; 488 #if !(defined( __WIN__) && defined(__AMD64__)) /* the callbacks are problematic */488 #if !(defined(RT_OS_WINDOWS) && defined(RT_ARCH_AMD64)) /* the callbacks are problematic */ 489 489 static const REMPARMDESC g_aArgsDBGCRegisterCommands[] = 490 490 { … … 772 772 { REMPARMDESC_FLAGS_INT, sizeof(PSSMHANDLE), NULL }, 773 773 }; 774 static REMFNDESC g_SSMIntCallback = 775 { 776 "SSMIntCallback", NULL, &g_aArgsSSMIntCallback[0], ELEMENTS(g_aArgsSSMIntCallback), REMFNDESC_FLAGS_RET_INT, sizeof(int), NULL 774 static REMFNDESC g_SSMIntCallback = 775 { 776 "SSMIntCallback", NULL, &g_aArgsSSMIntCallback[0], ELEMENTS(g_aArgsSSMIntCallback), REMFNDESC_FLAGS_RET_INT, sizeof(int), NULL 777 777 }; 778 778 … … 783 783 { REMPARMDESC_FLAGS_INT, sizeof(uint32_t), NULL }, 784 784 }; 785 static REMFNDESC g_SSMIntLoadExecCallback = 786 { 787 "SSMIntLoadExecCallback", NULL, &g_aArgsSSMIntLoadExecCallback[0], ELEMENTS(g_aArgsSSMIntLoadExecCallback), REMFNDESC_FLAGS_RET_INT, sizeof(int), NULL 785 static REMFNDESC g_SSMIntLoadExecCallback = 786 { 787 "SSMIntLoadExecCallback", NULL, &g_aArgsSSMIntLoadExecCallback[0], ELEMENTS(g_aArgsSSMIntLoadExecCallback), REMFNDESC_FLAGS_RET_INT, sizeof(int), NULL 788 788 }; 789 789 static const REMPARMDESC g_aArgsSSMR3RegisterInternal[] = … … 987 987 { "CPUMQueryGuestCtxPtr", (void *)(uintptr_t)&CPUMQueryGuestCtxPtr, &g_aArgsCPUMQueryGuestCtxPtr[0], ELEMENTS(g_aArgsCPUMQueryGuestCtxPtr), REMFNDESC_FLAGS_RET_INT, sizeof(int), NULL }, 988 988 { "CSAMR3MonitorPage", (void *)(uintptr_t)&CSAMR3MonitorPage, &g_aArgsCSAMR3MonitorPage[0], ELEMENTS(g_aArgsCSAMR3MonitorPage), REMFNDESC_FLAGS_RET_INT, sizeof(int), NULL }, 989 #if !(defined( __WIN__) && defined(__AMD64__)) /* the callbacks are problematic */989 #if !(defined(RT_OS_WINDOWS) && defined(RT_ARCH_AMD64)) /* the callbacks are problematic */ 990 990 { "DBGCRegisterCommands", (void *)(uintptr_t)&DBGCRegisterCommands, &g_aArgsDBGCRegisterCommands[0], ELEMENTS(g_aArgsDBGCRegisterCommands), REMFNDESC_FLAGS_RET_INT, sizeof(int), NULL }, 991 991 #endif … … 1270 1270 /** 1271 1271 * Entry logger function. 1272 * 1272 * 1273 1273 * @param pDesc The description. 1274 1274 */ … … 1281 1281 /** 1282 1282 * Exit logger function. 1283 * 1283 * 1284 1284 * @param pDesc The description. 1285 1285 * @param pvRet The return code. … … 1293 1293 /** 1294 1294 * Creates a wrapper for the specified callback function at run time. 1295 * 1295 * 1296 1296 * @param pDesc The function descriptor. 1297 1297 * @param pValue Upon entry *pValue contains the address of the function to be wrapped. … … 1305 1305 AssertPtr(pValue); 1306 1306 1307 /* 1307 /* 1308 1308 * Simple? 1309 1309 */ … … 1311 1311 return; 1312 1312 1313 /* 1313 /* 1314 1314 * Locate the right function descriptor. 1315 1315 */ … … 1328 1328 * Create a new glue patch. 1329 1329 */ 1330 #ifdef __WIN__1330 #ifdef RT_OS_WINDOWS 1331 1331 int rc = remGenerateExportGlue(pValue, pDesc); 1332 1332 #else 1333 1333 #error "port me" 1334 #endif 1334 #endif 1335 1335 AssertReleaseRC(rc); 1336 1336 … … 1633 1633 } 1634 1634 else 1635 { 1635 { 1636 1636 /* custom hacks - it's simpler to make assembly templates than writing a more generic code generator... */ 1637 1637 static const struct { const char *pszName; PFNRT pvStart, pvEnd; } s_aTemplates[] = … … 1660 1660 */ 1661 1661 uint8_t *pb; 1662 # ifdef __AMD64__1662 # ifdef RT_ARCH_AMD64 1663 1663 pDesc->pvWrapper = pb = (uint8_t *)remAllocGlue(32); 1664 1664 AssertReturn(pDesc->pvWrapper, VERR_NO_MEMORY); -
trunk/src/recompiler/VBoxREMWrapperA.asm
r3615 r3726 33 33 34 34 35 %ifdef __AMD64__35 %ifdef RT_ARCH_AMD64 36 36 ;; 37 37 ; 64-bit pushad … … 84 84 sub rsp, 20h ; shadow space 85 85 86 %ifdef __WIN__86 %ifdef RT_OS_WINDOWS 87 87 mov rcx, REM_FIXUP_64_DESC 88 88 %else … … 109 109 sub rsp, 20h ; shadow space 110 110 111 %ifdef __WIN__111 %ifdef RT_OS_WINDOWS 112 112 mov rdx, rax 113 113 mov rcx, REM_FIXUP_64_DESC … … 134 134 BEGINCODE 135 135 136 %ifdef __WIN__137 %ifdef __AMD64__136 %ifdef RT_OS_WINDOWS 137 %ifdef RT_ARCH_AMD64 138 138 139 139 … … 568 568 mov [rsp], rdi ; -> rcx 569 569 570 ; Now convert the function pointers. Have to setup a new shadow 570 ; Now convert the function pointers. Have to setup a new shadow 571 571 ; space here since the SSMR3RegisterInternal one is already in use. 572 572 sub rsp, 20h … … 878 878 ENDPROC WrapMSC2GCC9Int 879 879 880 %endif ; __AMD64__881 %endif ; __WIN__882 880 %endif ; RT_ARCH_AMD64 881 %endif ; RT_OS_WINDOWS 882 -
trunk/src/recompiler/VBoxRecompiler.c
r3615 r3726 91 91 DECLINLINE(target_ulong) remR3HCVirt2GCPhysInlined(PVM pVM, void *addr); 92 92 DECLINLINE(void *) remR3GCPhys2HCVirtInlined(PVM pVM, target_ulong addr); 93 #endif 93 #endif 94 94 95 95 static uint32_t remR3MMIOReadU8(void *pvVM, target_phys_addr_t GCPhys); … … 127 127 static STAMPROFILEADV gStatMemReadHCPtr; 128 128 static STAMPROFILEADV gStatMemWriteHCPtr; 129 #endif 129 #endif 130 130 #ifdef PGM_DYNAMIC_RAM_ALLOC 131 131 static STAMPROFILE gStatGCPhys2HCVirt; 132 132 static STAMPROFILE gStatHCVirt2GCPhys; 133 #endif 133 #endif 134 134 static STAMCOUNTER gStatCpuGetTSC; 135 135 static STAMCOUNTER gStatRefuseTFInhibit; … … 188 188 189 189 190 #if defined(VBOX_WITH_DEBUGGER) && !(defined( __WIN__) && defined(__AMD64__))190 #if defined(VBOX_WITH_DEBUGGER) && !(defined(RT_OS_WINDWS) && defined(RT_ARCH_AMD64)) 191 191 /* 192 192 * Debugger commands. … … 235 235 /* Put them here to avoid unused variable warning. */ 236 236 AssertCompile(RT_SIZEOFMEMB(VM, rem.padding) >= RT_SIZEOFMEMB(VM, rem.s)); 237 #if !defined(IPRT_NO_CRT) && (defined( __LINUX__) || defined(__DARWIN__) || defined(__WIN__))237 #if !defined(IPRT_NO_CRT) && (defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_WINDOWS)) 238 238 AssertCompileMemberSize(REM, Env, REM_ENV_SIZE); 239 239 #else … … 337 337 return rc; 338 338 339 #if defined(VBOX_WITH_DEBUGGER) && !(defined( __WIN__) && defined(__AMD64__))339 #if defined(VBOX_WITH_DEBUGGER) && !(defined(RT_OS_WINDOWS) && defined(RT_ARCH_AMD64)) 340 340 /* 341 341 * Debugger commands. … … 367 367 STAM_REG(pVM, &gStatMemReadHCPtr, STAMTYPE_PROFILE, "/PROF/REM/MemReadHCPtr", STAMUNIT_TICKS_PER_CALL, "Profiling memory access."); 368 368 STAM_REG(pVM, &gStatMemWriteHCPtr, STAMTYPE_PROFILE, "/PROF/REM/MemWriteHCPtr", STAMUNIT_TICKS_PER_CALL, "Profiling memory access."); 369 #endif 369 #endif 370 370 #ifdef PGM_DYNAMIC_RAM_ALLOC 371 371 STAM_REG(pVM, &gStatHCVirt2GCPhys, STAMTYPE_PROFILE, "/PROF/REM/HCVirt2GCPhys", STAMUNIT_TICKS_PER_CALL, "Profiling memory convertion."); … … 1386 1386 if(!is_user && !(env->state & CPU_RAW_RING0)) 1387 1387 return; /* We are currently not interested in kernel pages */ 1388 #endif 1388 #endif 1389 1389 1390 1390 #if !defined(PGM_DYNAMIC_RAM_ALLOC) && !defined(REM_PHYS_ADDR_IN_TLB) … … 1432 1432 # else 1433 1433 phys_addr = virt_addr - (uintptr_t)phys_ram_base + addend; 1434 # endif 1434 # endif 1435 1435 else 1436 1436 phys_addr = addend; … … 2577 2577 # ifndef REM_PHYS_ADDR_IN_TLB 2578 2578 uint32_t i; 2579 # endif 2579 # endif 2580 2580 2581 2581 cpu_register_physical_memory(GCPhys, cb, GCPhys | (fFlags & MM_RAM_FLAGS_RESERVED ? IO_MEM_UNASSIGNED : 0)); … … 2627 2627 # ifndef REM_PHYS_ADDR_IN_TLB 2628 2628 uint32_t idx; 2629 #endif 2629 #endif 2630 2630 2631 2631 Log(("REMR3NotifyPhysRamChunkRegister: GCPhys=%VGp cb=%d pvRam=%p fFlags=%d\n", GCPhys, cb, pvRam, fFlags)); … … 2740 2740 } 2741 2741 pv = (void *)((uintptr_t)pv | (addr & PAGE_OFFSET_MASK)); 2742 #endif 2742 #endif 2743 2743 return pv; 2744 2744 } … … 3168 3168 #else 3169 3169 # define VBOX_CHECK_ADDR(GCPhys) do { } while (0) 3170 #endif 3170 #endif 3171 3171 3172 3172 /** … … 3857 3857 3858 3858 3859 #if defined(VBOX_WITH_DEBUGGER) && !(defined( __WIN__) && defined(__AMD64__))3859 #if defined(VBOX_WITH_DEBUGGER) && !(defined(RT_OS_WINDOWS) && defined(RT_ARCH_AMD64)) 3860 3860 /** 3861 3861 * External Debugger Command: .remstep [on|off|1|0] … … 5391 5391 5392 5392 5393 #if defined(IPRT_NO_CRT) && defined( __WIN__) && defined(__X86__)5393 #if defined(IPRT_NO_CRT) && defined(RT_OS_WINDOWS) && defined(RT_ARCH_X86) 5394 5394 /** 5395 5395 * The Dll main entry point (stub).
Note:
See TracChangeset
for help on using the changeset viewer.