From 56ab45f8f43fcf8bba53bbf33f21eb21202c3542 Mon Sep 17 00:00:00 2001 From: "SND\\shalma_cp" Date: Thu, 11 Nov 2010 00:41:38 +0000 Subject: ir3000a.c - use smaller dynarec block size - improves dynarec clear speed hit git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@59405 e17a0e51-4ae3-4d35-97c3-1a29b211df97 --- libpcsxcore/ix86/iR3000A.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'libpcsxcore') diff --git a/libpcsxcore/ix86/iR3000A.c b/libpcsxcore/ix86/iR3000A.c index 9faa15ba..4f7029ab 100644 --- a/libpcsxcore/ix86/iR3000A.c +++ b/libpcsxcore/ix86/iR3000A.c @@ -73,7 +73,9 @@ static void (*recSPC[64])(); static void (*recREG[32])(); static void (*recCP0[32])(); static void (*recCP2[64])(); -static void (*recCP2BSC[32])(); +static void (*recCP2BSC[32])(); + +#define DYNAREC_BLOCK 50 static void MapConst(int reg, u32 _const) { iRegs[reg].k = _const; @@ -462,8 +464,8 @@ static void recClear(u32 Addr, u32 Size) { if( bank == 0x80 || bank == 0xa0 || bank == 0x00 ) { offset &= 0x1fffff; - if( offset >= 500 * 4 ) - memset((void*)PC_REC(Addr - 500 * 4), 0, 500 * 4); + if( offset >= DYNAREC_BLOCK * 4 ) + memset((void*)PC_REC(Addr - DYNAREC_BLOCK * 4), 0, DYNAREC_BLOCK * 4); else memset((void*)PC_REC(Addr - offset), 0, offset); } @@ -2908,7 +2910,7 @@ static void recRecompile() { pc = psxRegs.pc; pcold = pc; - for (count = 0; count < 500;) { + for (count = 0; count < DYNAREC_BLOCK;) { p = (char *)PSXM(pc); if (p == NULL) recError(); psxRegs.code = *(u32 *)p; -- cgit v1.2.3