diff options
| author | SND\notaz_cp <SND\notaz_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2013-01-19 00:51:24 +0000 |
|---|---|---|
| committer | SND\notaz_cp <SND\notaz_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2013-01-19 00:51:24 +0000 |
| commit | 8093a1645070c5b5413fc5dee0d9917aee178c9d (patch) | |
| tree | bddaba3b8209d5d912a152e41497c86bcbabed64 /libpcsxcore/ix86_64 | |
| parent | dfedf538eab08dc2ba7142ea07c51858b4ff6067 (diff) | |
| download | pcsxr-8093a1645070c5b5413fc5dee0d9917aee178c9d.tar.gz | |
dynarec: store cycles before psxBranchTest to better match interpreter
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@82380 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'libpcsxcore/ix86_64')
| -rwxr-xr-x | libpcsxcore/ix86_64/iR3000A-64.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/libpcsxcore/ix86_64/iR3000A-64.c b/libpcsxcore/ix86_64/iR3000A-64.c index 0dccf8bf..0d07ed55 100755 --- a/libpcsxcore/ix86_64/iR3000A-64.c +++ b/libpcsxcore/ix86_64/iR3000A-64.c @@ -110,10 +110,13 @@ static void iFlushRegs() { } } -static void iRet() { - /* store cycle */ +static void iStoreCycle() { count = ((pc - pcold) / 4) * BIAS; ADD32ItoM((uptr)&psxRegs.cycle, count); +} + +static void iRet() { + iStoreCycle(); StackRes(); RET(); } @@ -179,11 +182,13 @@ static void SetBranch() { recBSC[psxRegs.code>>26](); iFlushRegs(); + iStoreCycle(); MOV32MtoR(EAX, (uptr)&target); MOV32RtoM((uptr)&psxRegs.pc, EAX); CALLFunc((uptr)psxBranchTest); - iRet(); + StackRes(); + RET(); } static void iJump(u32 branchPC) { @@ -212,11 +217,10 @@ static void iJump(u32 branchPC) { recBSC[psxRegs.code>>26](); iFlushRegs(); + iStoreCycle(); MOV32ItoM((uptr)&psxRegs.pc, branchPC); CALLFunc((uptr)psxBranchTest); - /* store cycle */ - count = ((pc - pcold) / 4) * BIAS; - ADD32ItoM((uptr)&psxRegs.cycle, count); + StackRes(); RET(); @@ -277,11 +281,9 @@ static void iBranch(u32 branchPC, int savectx) { recBSC[psxRegs.code>>26](); iFlushRegs(); + iStoreCycle(); MOV32ItoM((uptr)&psxRegs.pc, branchPC); CALLFunc((uptr)psxBranchTest); - /* store cycle */ - count = ((pc - pcold) / 4) * BIAS; - ADD32ItoM((uptr)&psxRegs.cycle, count); StackRes(); |
