From 767a95380b8b7a68a80bbf333b66c4060c77b109 Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Fri, 21 Nov 2014 09:38:36 +0000 Subject: [PATCH] mirror cache handling with dynrec core with allocation stuff for 64 bit things Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3873 --- src/cpu/core_dyn_x86/cache.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cpu/core_dyn_x86/cache.h b/src/cpu/core_dyn_x86/cache.h index 2b817f16..ec78aeba 100644 --- a/src/cpu/core_dyn_x86/cache.h +++ b/src/cpu/core_dyn_x86/cache.h @@ -510,7 +510,7 @@ static void cache_init(bool enable) { #endif if(!cache_code_start_ptr) E_Exit("Allocating dynamic core cache memory failed"); - cache_code=(Bit8u*)(((int)cache_code_start_ptr + PAGESIZE_TEMP-1) & ~(PAGESIZE_TEMP-1)); //MEM LEAK. store old pointer if you want to free it. + cache_code=(Bit8u*)(((Bitu)cache_code_start_ptr + PAGESIZE_TEMP-1) & ~(PAGESIZE_TEMP-1)); //Bitu is same size as a pointer. cache_code_link_blocks=cache_code; cache_code+=PAGESIZE_TEMP; @@ -605,7 +605,7 @@ static void cache_reset(void) { #endif if (!cache_code_start_ptr) E_Exit("Allocating dynamic core cache memory failed"); - cache_code=(Bit8u*)(((int)cache_code_start_ptr + PAGESIZE_TEMP-1) & ~(PAGESIZE_TEMP-1)); //MEM LEAK. store old pointer if you want to free it. + cache_code=(Bit8u*)(((Bitu)cache_code_start_ptr + PAGESIZE_TEMP-1) & ~(PAGESIZE_TEMP-1)); //Bitu is same size as a pointer. cache_code_link_blocks=cache_code; cache_code+=PAGESIZE_TEMP;