diff options
| author | SND\shalma_cp <SND\shalma_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2010-11-11 00:41:38 +0000 |
|---|---|---|
| committer | SND\shalma_cp <SND\shalma_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2010-11-11 00:41:38 +0000 |
| commit | 56ab45f8f43fcf8bba53bbf33f21eb21202c3542 (patch) | |
| tree | ff9e53424c0c09257f853779e502828b820727ee | |
| parent | e2d0128e13d29685bd79922e608e06a5c14a89c7 (diff) | |
| download | pcsxr-56ab45f8f43fcf8bba53bbf33f21eb21202c3542.tar.gz | |
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
| -rw-r--r-- | libpcsxcore/ix86/iR3000A.c | 10 |
1 files changed, 6 insertions, 4 deletions
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; |
