summaryrefslogtreecommitdiff
path: root/libpcsxcore
diff options
context:
space:
mode:
authorSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2010-11-05 08:11:53 +0000
committerSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2010-11-05 08:11:53 +0000
commita554d2c4011f7dbcc9560d7d9c11368ed1bf3f7a (patch)
tree387f87374ca282a75b7db1f293629f915e00402d /libpcsxcore
parentb6a7c5e5bc9f438059e5a71fe7f850410b668210 (diff)
downloadpcsxr-a554d2c4011f7dbcc9560d7d9c11368ed1bf3f7a.tar.gz
x86_64 dynarec as well
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@59210 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'libpcsxcore')
-rw-r--r--libpcsxcore/ix86_64/iR3000A-64.c46
-rw-r--r--libpcsxcore/mdec.c2
2 files changed, 45 insertions, 3 deletions
diff --git a/libpcsxcore/ix86_64/iR3000A-64.c b/libpcsxcore/ix86_64/iR3000A-64.c
index 23ccea49..12004e82 100644
--- a/libpcsxcore/ix86_64/iR3000A-64.c
+++ b/libpcsxcore/ix86_64/iR3000A-64.c
@@ -1136,7 +1136,16 @@ static void recDIV() {
// iFlushRegs();
if (IsConst(_Rt_)) {
- if (iRegs[_Rt_].k == 0) return;
+ if (iRegs[_Rt_].k == 0) {
+ MOV32ItoM((uptr)&psxRegs.GPR.n.lo, 0xffffffff);
+ if (IsConst(_Rs_)) {
+ MOV32ItoM((uptr)&psxRegs.GPR.n.hi, iRegs[_Rs_].k);
+ } else {
+ MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rs_]);
+ MOV32RtoM((uptr)&psxRegs.GPR.n.hi, EAX);
+ }
+ return;
+ }
MOV32ItoR(ECX, iRegs[_Rt_].k);// printf("divrtk %x\n", iRegs[_Rt_].k);
} else {
MOV32MtoR(ECX, (uptr)&psxRegs.GPR.r[_Rt_]);
@@ -1153,7 +1162,19 @@ static void recDIV() {
MOV32RtoM((uptr)&psxRegs.GPR.n.lo, EAX);
MOV32RtoM((uptr)&psxRegs.GPR.n.hi, EDX);
if (!IsConst(_Rt_)) {
+ j8Ptr[1] = JMP8(1);
+
x86SetJ8(j8Ptr[0]);
+
+ MOV32ItoM((uptr)&psxRegs.GPR.n.lo, 0xffffffff);
+ if (IsConst(_Rs_)) {
+ MOV32ItoM((uptr)&psxRegs.GPR.n.hi, iRegs[_Rs_].k);
+ } else {
+ MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rs_]);
+ MOV32RtoM((uptr)&psxRegs.GPR.n.hi, EAX);
+ }
+
+ x86SetJ8(j8Ptr[1]);
}
}
@@ -1163,7 +1184,16 @@ static void recDIVU() {
// iFlushRegs();
if (IsConst(_Rt_)) {
- if (iRegs[_Rt_].k == 0) return;
+ if (iRegs[_Rt_].k == 0) {
+ MOV32ItoM((uptr)&psxRegs.GPR.n.lo, 0xffffffff);
+ if (IsConst(_Rs_)) {
+ MOV32ItoM((uptr)&psxRegs.GPR.n.hi, iRegs[_Rs_].k);
+ } else {
+ MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rs_]);
+ MOV32RtoM((uptr)&psxRegs.GPR.n.hi, EAX);
+ }
+ return;
+ }
MOV32ItoR(ECX, iRegs[_Rt_].k);// printf("divurtk %x\n", iRegs[_Rt_].k);
} else {
MOV32MtoR(ECX, (uptr)&psxRegs.GPR.r[_Rt_]);
@@ -1180,7 +1210,19 @@ static void recDIVU() {
MOV32RtoM((uptr)&psxRegs.GPR.n.lo, EAX);
MOV32RtoM((uptr)&psxRegs.GPR.n.hi, EDX);
if (!IsConst(_Rt_)) {
+ j8Ptr[1] = JMP8(1);
+
x86SetJ8(j8Ptr[0]);
+
+ MOV32ItoM((uptr)&psxRegs.GPR.n.lo, 0xffffffff);
+ if (IsConst(_Rs_)) {
+ MOV32ItoM((uptr)&psxRegs.GPR.n.hi, iRegs[_Rs_].k);
+ } else {
+ MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rs_]);
+ MOV32RtoM((uptr)&psxRegs.GPR.n.hi, EAX);
+ }
+
+ x86SetJ8(j8Ptr[1]);
}
}
#endif
diff --git a/libpcsxcore/mdec.c b/libpcsxcore/mdec.c
index 04476521..b96538f4 100644
--- a/libpcsxcore/mdec.c
+++ b/libpcsxcore/mdec.c
@@ -536,7 +536,7 @@ void psxDma1(u32 adr, u32 bcr, u32 chcr) {
return;
}
- in_ptr = mdec.rl;
+ in_ptr = (u8 *)mdec.rl;
size = (bcr >> 16) * (bcr & 0xffff);