Changeset 1111 in vbox for trunk/src/recompiler
- Timestamp:
- Feb 28, 2007 3:30:06 PM (18 years ago)
- Location:
- trunk/src/recompiler/new
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/recompiler/new/exec.c
r1001 r1111 103 103 uint32_t phys_ram_dirty_size; 104 104 #endif /* VBOX */ 105 #if !defined(VBOX) || !defined(PGM_DYNAMIC_RAM_ALLOC)105 #ifndef VBOX 106 106 uint8_t *phys_ram_base; 107 107 #endif … … 276 276 pd[i].phys_offset = IO_MEM_UNASSIGNED; 277 277 } 278 #if defined(VBOX) && defined(PGM_DYNAMIC_RAM_ALLOC)278 #ifdef VBOX 279 279 pd = ((PhysPageDesc *)pd) + (index & (L2_SIZE - 1)); 280 280 if (RT_UNLIKELY((pd->phys_offset & ~TARGET_PAGE_MASK) == IO_MEM_RAM_MISSING)) … … 1310 1310 #endif /* !VBOX */ 1311 1311 1312 #if !defined(VBOX)/* VBOX: we have our own routine. */1312 #ifndef VBOX /* VBOX: we have our own routine. */ 1313 1313 void cpu_abort(CPUState *env, const char *fmt, ...) 1314 1314 { … … 1431 1431 ram_addr + TARGET_PAGE_SIZE, 1432 1432 CODE_DIRTY_FLAG); 1433 #if defined(VBOX)&& defined(REM_MONITOR_CODE_PAGES)1433 #ifdef VBOX && defined(REM_MONITOR_CODE_PAGES) 1434 1434 /** @todo Retest this? This function has changed... */ 1435 1435 remR3ProtectCode(cpu_single_env, ram_addr); … … 1497 1497 /* we modify the TLB cache so that the dirty bit will be set again 1498 1498 when accessing the range */ 1499 #if !defined(VBOX) || !defined(PGM_DYNAMIC_RAM_ALLOC)1499 #ifndef VBOX 1500 1500 start1 = start + (unsigned long)phys_ram_base; 1501 1501 #else … … 1547 1547 if ((tlb_entry->addr_write & ~TARGET_PAGE_MASK) == IO_MEM_RAM) { 1548 1548 /* RAM case */ 1549 #if !defined(VBOX) || !defined(PGM_DYNAMIC_RAM_ALLOC)1549 #ifndef VBOX 1550 1550 ram_addr = (tlb_entry->addr_write & TARGET_PAGE_MASK) + 1551 1551 tlb_entry->addend - (unsigned long)phys_ram_base; … … 1633 1633 /* standard memory */ 1634 1634 address = vaddr; 1635 #if !defined(VBOX) || !defined(PGM_DYNAMIC_RAM_ALLOC)1635 #ifndef VBOX 1636 1636 addend = (unsigned long)phys_ram_base + (pd & TARGET_PAGE_MASK); 1637 1637 #else … … 1855 1855 if (flags & PAGE_WRITE) 1856 1856 flags |= PAGE_WRITE_ORG; 1857 #if defined(VBOX)1857 #ifdef VBOX 1858 1858 AssertMsgFailed(("We shouldn't be here, and if we should, we must have an env to do the proper locking!\n")); 1859 1859 #endif … … 1950 1950 p = phys_page_find_alloc(addr >> TARGET_PAGE_BITS, 1); 1951 1951 p->phys_offset = phys_offset; 1952 #if !defined(VBOX) || !defined(PGM_DYNAMIC_RAM_ALLOC)1952 #ifndef VBOX 1953 1953 if ((phys_offset & ~TARGET_PAGE_MASK) <= IO_MEM_ROM || 1954 1954 (phys_offset & IO_MEM_ROMD)) … … 2012 2012 unsigned long ram_addr; 2013 2013 int dirty_flags; 2014 #if !defined(VBOX) || !defined(PGM_DYNAMIC_RAM_ALLOC)2014 #ifndef VBOX 2015 2015 ram_addr = addr - (unsigned long)phys_ram_base; 2016 2016 #else … … 2055 2055 unsigned long ram_addr; 2056 2056 int dirty_flags; 2057 #if !defined(VBOX) || !defined(PGM_DYNAMIC_RAM_ALLOC)2057 #ifndef VBOX 2058 2058 ram_addr = addr - (unsigned long)phys_ram_base; 2059 2059 #else … … 2098 2098 unsigned long ram_addr; 2099 2099 int dirty_flags; 2100 #if !defined(VBOX) || !defined(PGM_DYNAMIC_RAM_ALLOC)2100 #ifndef VBOX 2101 2101 ram_addr = addr - (unsigned long)phys_ram_base; 2102 2102 #else … … 2154 2154 cpu_register_io_memory(IO_MEM_UNASSIGNED >> IO_MEM_SHIFT, unassigned_mem_read, unassigned_mem_write, NULL); 2155 2155 cpu_register_io_memory(IO_MEM_NOTDIRTY >> IO_MEM_SHIFT, error_mem_read, notdirty_mem_write, NULL); 2156 #if defined(VBOX) && defined(PGM_DYNAMIC_RAM_ALLOC)2156 #ifdef VBOX 2157 2157 cpu_register_io_memory(IO_MEM_RAM_MISSING >> IO_MEM_SHIFT, unassigned_mem_read, unassigned_mem_write, NULL); 2158 2158 io_mem_nb = 6; … … 2293 2293 /* RAM case */ 2294 2294 #ifdef VBOX 2295 # ifdef PGM_DYNAMIC_RAM_ALLOC2296 2295 ptr = remR3GCPhys2HCVirt(cpu_single_env, addr1); 2297 # else2298 ptr = phys_ram_base + addr1;2299 # endif2300 2296 remR3PhysWrite(ptr, buf, l); 2301 2297 #else … … 2338 2334 /* RAM case */ 2339 2335 #ifdef VBOX 2340 # ifdef PGM_DYNAMIC_RAM_ALLOC2341 2336 ptr = remR3GCPhys2HCVirt(cpu_single_env, (pd & TARGET_PAGE_MASK) + (addr & ~TARGET_PAGE_MASK)); 2342 # else2343 ptr = phys_ram_base + (pd & TARGET_PAGE_MASK) +2344 (addr & ~TARGET_PAGE_MASK);2345 # endif2346 2337 remR3PhysRead(ptr, buf, l); 2347 2338 #else … … 2389 2380 /* ROM/RAM case */ 2390 2381 /* RAM case */ 2391 #if !defined(VBOX) || !defined(PGM_DYNAMIC_RAM_ALLOC)2382 #ifndef VBOX 2392 2383 ptr = phys_ram_base + addr1; 2393 2384 #else … … 2426 2417 } else { 2427 2418 /* RAM case */ 2428 #if !defined(VBOX) || !defined(PGM_DYNAMIC_RAM_ALLOC)2419 #ifndef VBOX 2429 2420 ptr = phys_ram_base + (pd & TARGET_PAGE_MASK) + 2430 2421 (addr & ~TARGET_PAGE_MASK); … … 2466 2457 } else { 2467 2458 /* RAM case */ 2468 #if !defined(VBOX) || !defined(PGM_DYNAMIC_RAM_ALLOC)2459 #ifndef VBOX 2469 2460 ptr = phys_ram_base + (pd & TARGET_PAGE_MASK) + 2470 2461 (addr & ~TARGET_PAGE_MASK); … … 2514 2505 io_mem_write[io_index][2](io_mem_opaque[io_index], addr, val); 2515 2506 } else { 2516 #if !defined(VBOX) || !defined(PGM_DYNAMIC_RAM_ALLOC)2507 #ifndef VBOX 2517 2508 ptr = phys_ram_base + (pd & TARGET_PAGE_MASK) + 2518 2509 (addr & ~TARGET_PAGE_MASK); … … 2546 2537 addr1 = (pd & TARGET_PAGE_MASK) + (addr & ~TARGET_PAGE_MASK); 2547 2538 /* RAM case */ 2548 #if !defined(VBOX) || !defined(PGM_DYNAMIC_RAM_ALLOC)2539 #ifndef VBOX 2549 2540 ptr = phys_ram_base + addr1; 2550 2541 #else -
trunk/src/recompiler/new/target-i386/helper2.c
r1001 r1111 586 586 587 587 /* page directory entry */ 588 # ifdef PGM_DYNAMIC_RAM_ALLOC589 588 pde_ptr = remR3GCPhys2HCVirt(env, (((env->cr[3] & ~0xfff) + ((addr >> 20) & ~3)) & env->a20_mask)); 590 # else591 pde_ptr = phys_ram_base +592 (((env->cr[3] & ~0xfff) + ((addr >> 20) & ~3)) & env->a20_mask);593 # endif594 589 pde = ldl_raw(pde_ptr); 595 590 /* if PSE bit is set, then we use a 4MB page */
Note:
See TracChangeset
for help on using the changeset viewer.