summaryrefslogtreecommitdiff
path: root/libpcsxcore/ix86_64
diff options
context:
space:
mode:
authorSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2010-12-21 09:13:21 +0000
committerSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2010-12-21 09:13:21 +0000
commit4b1597fce0d6917e48f7479e4efc459d47e213fd (patch)
tree256e59b5b8c34c624de05d5d5480224e53737135 /libpcsxcore/ix86_64
parentd9896430dad2f79fd6ef63da106499d4d66e366d (diff)
downloadpcsxr-4b1597fce0d6917e48f7479e4efc459d47e213fd.tar.gz
dynarec (x86): re-enabled some of the optimizations on memory access. Seems to be okay for V-Rally 2.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@61378 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'libpcsxcore/ix86_64')
-rw-r--r--libpcsxcore/ix86_64/iR3000A-64.c27
1 files changed, 18 insertions, 9 deletions
diff --git a/libpcsxcore/ix86_64/iR3000A-64.c b/libpcsxcore/ix86_64/iR3000A-64.c
index 85737046..fe146589 100644
--- a/libpcsxcore/ix86_64/iR3000A-64.c
+++ b/libpcsxcore/ix86_64/iR3000A-64.c
@@ -493,7 +493,7 @@ static void recExecuteBlock() {
}
static void recClear(u32 Addr, u32 Size) {
- memset((void*)PC_REC(Addr), 0, Size * sizeof(uptr));
+ memset((void *)PC_REC(Addr), 0, Size * sizeof(uptr));
}
static void recNULL() {
@@ -1291,7 +1291,7 @@ static void recLB() {
MapConst(_Rt_, psxRs8(addr));
return;
}
- if ((t & 0x1fe0) == 0 && (t & 0x1fff) != 0) {
+ if ((t & 0x1fe0) == 0) {
if (!_Rt_) return;
iRegs[_Rt_].state = ST_UNK;
@@ -1335,7 +1335,7 @@ static void recLBU() {
MapConst(_Rt_, psxRu8(addr));
return;
}
- if ((t & 0x1fe0) == 0 && (t & 0x1fff) != 0) {
+ if ((t & 0x1fe0) == 0) {
if (!_Rt_) return;
iRegs[_Rt_].state = ST_UNK;
@@ -1379,7 +1379,7 @@ static void recLH() {
MapConst(_Rt_, psxRs16(addr));
return;
}
- if ((t & 0x1fe0) == 0 && (t & 0x1fff) != 0) {
+ if ((t & 0x1fe0) == 0) {
if (!_Rt_) return;
iRegs[_Rt_].state = ST_UNK;
@@ -1423,7 +1423,7 @@ static void recLHU() {
MapConst(_Rt_, psxRu16(addr));
return;
}
- if ((t & 0x1fe0) == 0 && (t & 0x1fff) != 0) {
+ if ((t & 0x1fe0) == 0) {
if (!_Rt_) return;
iRegs[_Rt_].state = ST_UNK;
@@ -1520,7 +1520,7 @@ static void recLW() {
MapConst(_Rt_, psxRu32(addr));
return;
}
- if ((t & 0x1fe0) == 0 && (t & 0x1fff) != 0) {
+ if ((t & 0x1fe0) == 0) {
if (!_Rt_) return;
iRegs[_Rt_].state = ST_UNK;
@@ -1604,7 +1604,7 @@ void recLWL() {
u32 addr = iRegs[_Rs_].k + _Imm_;
int t = addr >> 16;
- if ((t & 0x1fe0) == 0 && (t & 0x1fff) != 0) {
+ if ((t & 0x1fe0) == 0) {
MOV32MtoR(EAX, (uptr)&psxM[addr & 0x1ffffc]);
iLWLk(addr & 3);
@@ -1688,7 +1688,7 @@ static void recLWBlock(int count) {
}
return;
}
- if ((t & 0x1fe0) == 0 && (t & 0x1fff) != 0) {
+ if ((t & 0x1fe0) == 0) {
for (i=0; i<count; i++, code++, addr+=4) {
if (!_fRt_(*code)) return;
iRegs[_fRt_(*code)].state = ST_UNK;
@@ -1763,7 +1763,7 @@ void recLWR() {
u32 addr = iRegs[_Rs_].k + _Imm_;
int t = addr >> 16;
- if ((t & 0x1fe0) == 0 && (t & 0x1fff) != 0) {
+ if ((t & 0x1fe0) == 0) {
MOV32MtoR(EAX, (uptr)&psxM[addr & 0x1ffffc]);
iLWRk(addr & 3);
@@ -1834,6 +1834,9 @@ static void recSB() {
MOV8MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rt_]);
MOV8RtoM((uptr)&psxM[addr & 0x1fffff], EAX);
}
+ MOV32ItoR(X86ARG2, 1);
+ MOV32ItoR(X86ARG1, addr & ~3);
+ CALLFunc((uptr)&recClear);
return;
}
if (t == 0x1f80 && addr < 0x1f801000) {
@@ -1874,6 +1877,9 @@ static void recSH() {
MOV16MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rt_]);
MOV16RtoM((uptr)&psxM[addr & 0x1fffff], EAX);
}
+ MOV32ItoR(X86ARG2, 1);
+ MOV32ItoR(X86ARG1, addr & ~3);
+ CALLFunc((uptr)&recClear);
return;
}
if (t == 0x1f80 && addr < 0x1f801000) {
@@ -1929,6 +1935,9 @@ static void recSW() {
MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rt_]);
MOV32RtoM((uptr)&psxM[addr & 0x1fffff], EAX);
}
+ MOV32ItoR(X86ARG2, 1);
+ MOV32ItoR(X86ARG1, addr);
+ CALLFunc((uptr)&recClear);
return;
}
if (t == 0x1f80 && addr < 0x1f801000) {