vbox的更動 15761 路徑 trunk/src/recompiler_new
- 時間撮記:
- 2008-12-25 下午09:07:53 (16 年 以前)
- 位置:
- trunk/src/recompiler_new
- 檔案:
-
- 修改 4 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/recompiler_new/Makefile.kmk
r15342 r15761 107 107 endif # !win 108 108 $(REM_MOD)_DEFS += IN_REM_R3 REM_INCLUDE_CPU_H 109 $(REM_MOD)_DEFS += REM_PHYS_ADDR_IN_TLB109 #$(REM_MOD)_DEFS += REM_PHYS_ADDR_IN_TLB 110 110 $(REM_MOD)_DEFS += VBOX_WITH_NEW_RECOMPILER 111 111 #$(REM_MOD)_DEFS += DEBUG_ALL_LOGGING DEBUG_DISAS DEBUG_PCALL DEBUG_EXEC DEBUG_FLUSH DEBUG_IOPORT DEBUG_SIGNAL DEBUG_TLB_CHECK DEBUG_TB_INVALIDATE DEBUG_TLB # Enables huge amounts of debug logging. … … 117 117 endif 118 118 119 $(REM_MOD)_INCS = \120 Sun \121 target-i386 \122 tcg \123 fpu \124 $(PATH_$(REM_MOD)) \125 $(PATH_ROOT)/src/VBox/VMM \119 $(REM_MOD)_INCS = \ 120 Sun \ 121 target-i386 \ 122 tcg \ 123 fpu \ 124 $(PATH_$(REM_MOD)) \ 125 $(PATH_ROOT)/src/VBox/VMM \ 126 126 . 127 127 128 $(REM_MOD)_SOURCES = \129 VBoxRecompiler.c \130 cpu-exec.c 131 exec.c \132 translate-all.c \133 host-utils.c \134 cutils.c \135 tcg/tcg.c \136 tcg/tcg-dyngen.c \137 tcg/tcg-runtime.c \138 fpu/softfloat-native.c \139 target-i386/op_helper.c \140 target-i386/helper.c \128 $(REM_MOD)_SOURCES = \ 129 VBoxRecompiler.c \ 130 cpu-exec.c \ 131 exec.c \ 132 translate-all.c \ 133 host-utils.c \ 134 cutils.c \ 135 tcg/tcg.c \ 136 tcg/tcg-dyngen.c \ 137 tcg/tcg-runtime.c \ 138 fpu/softfloat-native.c \ 139 target-i386/op_helper.c \ 140 target-i386/helper.c \ 141 141 target-i386/translate.c 142 142 … … 213 213 214 214 ifdef VBOX_USE_REM64 215 ## @todo Note to self: One should be the default config (VBoxREM) with a NAME, the 64 bit varian should be done like here.216 215 DLLS += VBoxREM32 217 216 VBoxREM32_EXTENDS = VBoxREM … … 287 286 testmath_DEFS += VBOX_WITH_NEW_RECOMPILER 288 287 testmath_SOURCES = Sun/testmath.c 289 #testmath_SOURCES += $(PATH_LIB)/RuntimeR3NoCRTGCC$(VBOX_SUFF_LIB)290 288 291 289 -
trunk/src/recompiler_new/VBoxRecompiler.c
r15605 r15761 1298 1298 { 1299 1299 void *pv; 1300 int rc = PGMR3PhysTlbGCPhys2Ptr(env1->pVM, physAddr, true /*fWritable*/, &pv); 1300 int rc; 1301 1302 /* Address must be aligned enough to fiddle with lower bits */ 1303 Assert((physAddr & 0x3) == 0); 1304 1305 rc = PGMR3PhysTlbGCPhys2Ptr(env1->pVM, physAddr, true /*fWritable*/, &pv); 1301 1306 Assert( rc == VINF_SUCCESS 1302 1307 || rc == VINF_PGM_PHYS_TLB_CATCH_WRITE … … 1308 1313 return (void *)((uintptr_t)pv | 2); 1309 1314 return pv; 1315 //return (void *)((uintptr_t)pv | 2); 1310 1316 } 1311 1317 -
trunk/src/recompiler_new/exec.c
r15284 r15761 2153 2153 int i; 2154 2154 target_phys_addr_t iotlb; 2155 #if defined(VBOX) && !defined(REM_PHYS_ADDR_IN_TLB) 2156 int read_mods = 0, write_mods = 0, code_mods = 0; 2157 #endif 2155 2158 2156 2159 p = phys_page_find(paddr >> TARGET_PAGE_BITS); … … 2182 2185 !!(prot & PAGE_WRITE)); 2183 2186 #endif 2187 2184 2188 if ((pd & ~TARGET_PAGE_MASK) <= IO_MEM_ROM) { 2185 2189 /* Normal RAM. */ … … 2201 2205 code_address = address; 2202 2206 2203 #ifdef VBOX 2204 # if !defined(REM_PHYS_ADDR_IN_TLB) 2205 if (addend & 0x2) 2207 #if defined(VBOX) && !defined(REM_PHYS_ADDR_IN_TLB) 2208 if (addend & 0x3) 2206 2209 { 2207 /* catch write */ 2210 if (addend & 0x2) 2211 { 2212 /* catch write */ 2213 if ((pd & ~TARGET_PAGE_MASK) <= IO_MEM_ROM) 2214 write_mods |= TLB_MMIO; 2215 } 2216 else if (addend & 0x1) 2217 { 2218 /* catch all */ 2219 if ((pd & ~TARGET_PAGE_MASK) <= IO_MEM_ROM) 2220 { 2221 read_mods |= TLB_MMIO; 2222 write_mods |= TLB_MMIO; 2223 code_mods |= TLB_MMIO; 2224 } 2225 } 2226 if ((iotlb & ~TARGET_PAGE_MASK) == 0) 2227 iotlb = env->pVM->rem.s.iHandlerMemType + paddr; 2208 2228 addend &= ~(target_ulong)0x3; 2209 if ((pd & ~TARGET_PAGE_MASK) <= IO_MEM_ROM) 2210 { 2211 /** @todo improve this, it's only avoid code reads right now! */ 2212 address |= TLB_MMIO; 2213 iotlb = env->pVM->rem.s.iHandlerMemType + paddr; 2214 } 2215 } 2216 else if (addend & 0x1) 2217 { 2218 /* catch all */ 2219 addend &= ~(target_ulong)0x3; 2220 if ((pd & ~TARGET_PAGE_MASK) <= IO_MEM_ROM) 2221 { 2222 address |= TLB_MMIO; 2223 code_address |= TLB_MMIO; 2224 iotlb = env->pVM->rem.s.iHandlerMemType + paddr; 2225 } 2226 } 2227 # endif 2229 } 2228 2230 #endif 2229 2231 … … 2268 2270 te->addr_write = -1; 2269 2271 } 2272 2273 #if defined(VBOX) && !defined(REM_PHYS_ADDR_IN_TLB) 2274 if (prot & PAGE_READ) 2275 te->addr_read |= read_mods; 2276 if (prot & PAGE_EXEC) 2277 te->addr_code |= code_mods; 2278 if (prot & PAGE_WRITE) 2279 te->addr_write |= write_mods; 2280 #endif 2281 2270 2282 #ifdef VBOX 2271 2283 /* inform raw mode about TLB page change */ -
trunk/src/recompiler_new/tcg/x86_64/tcg-target.c
r14542 r15761 601 601 #if defined(VBOX) && defined(REM_PHYS_ADDR_IN_TLB) 602 602 static void *vbox_ld_helpers[] = { 603 remR3PhysReadU8,604 remR3PhysReadU16,605 remR3PhysReadU32,606 remR3PhysReadU64,607 remR3PhysReadS8,608 remR3PhysReadS16,609 remR3PhysReadS32,610 remR3PhysReadS64,603 __ldub_vbox_phys, 604 __lduw_vbox_phys, 605 __ldul_vbox_phys, 606 __ldq_vbox_phys, 607 __ldb_vbox_phys, 608 __ldw_vbox_phys, 609 __ldl_vbox_phys, 610 __ldq_vbox_phys, 611 611 }; 612 612 613 613 static void *vbox_st_helpers[] = { 614 remR3PhysWriteU8,615 remR3PhysWriteU16,616 remR3PhysWriteU32,617 remR3PhysWriteU64614 __stb_vbox_phys, 615 __stw_vbox_phys, 616 __stl_vbox_phys, 617 __stq_vbox_phys 618 618 }; 619 619
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器