aboutsummaryrefslogtreecommitdiff
path: root/libpcsxcore/new_dynarec/assem_arm.c
diff options
context:
space:
mode:
authornotaz2012-12-23 03:07:18 +0200
committernotaz2012-12-23 03:55:16 +0200
commit82336ba3f94b3a4674042833ca89a3da9cbc2625 (patch)
tree82ecc5f16f0329f93e36bef9c184e59a1dff9293 /libpcsxcore/new_dynarec/assem_arm.c
parentb68bf5c238ef32ed93eb8935c5b0288da5b3ad67 (diff)
downloadpcsx_rearmed-82336ba3f94b3a4674042833ca89a3da9cbc2625.tar.gz
pcsx_rearmed-82336ba3f94b3a4674042833ca89a3da9cbc2625.tar.bz2
pcsx_rearmed-82336ba3f94b3a4674042833ca89a3da9cbc2625.zip
drc: fix bugs in armv4 codepath
wasn't even passing BIOS because of them..
Diffstat (limited to 'libpcsxcore/new_dynarec/assem_arm.c')
-rw-r--r--libpcsxcore/new_dynarec/assem_arm.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/libpcsxcore/new_dynarec/assem_arm.c b/libpcsxcore/new_dynarec/assem_arm.c
index 51cceec..1d944c2 100644
--- a/libpcsxcore/new_dynarec/assem_arm.c
+++ b/libpcsxcore/new_dynarec/assem_arm.c
@@ -4531,8 +4531,8 @@ static void c2op_assemble(int i,struct regstat *i_regs)
int lm = (source[i] >> 10) & 1;
switch(c2op) {
#ifndef DRC_DBG
-#ifdef HAVE_ARMV5
case GTE_MVMVA: {
+#ifdef HAVE_ARMV5
int v = (source[i] >> 15) & 3;
int cv = (source[i] >> 13) & 3;
int mx = (source[i] >> 17) & 3;
@@ -4572,9 +4572,14 @@ static void c2op_assemble(int i,struct regstat *i_regs)
if(need_flags||need_ir)
c2op_call_MACtoIR(lm,need_flags);
#endif
+#else /* if not HAVE_ARMV5 */
+ c2op_prologue(c2op,reglist);
+ emit_movimm(source[i],1); // opcode
+ emit_writeword(1,(int)&psxRegs.code);
+ emit_call((int)(need_flags?gte_handlers[c2op]:gte_handlers_nf[c2op]));
+#endif
break;
}
-#endif /* HAVE_ARMV5 */
case GTE_OP:
c2op_prologue(c2op,reglist);
emit_call((int)(shift?gteOP_part_shift:gteOP_part_noshift));
@@ -5312,7 +5317,7 @@ void multdiv_assemble_arm(int i,struct regstat *i_regs)
emit_negmi(remainder,remainder); // .. remainder for div0 case (will be negated back after jump)
emit_movs(d2,HOST_TEMPREG);
emit_jeq((int)out+52); // Division by zero
- emit_negmi(HOST_TEMPREG,HOST_TEMPREG);
+ emit_negsmi(HOST_TEMPREG,HOST_TEMPREG);
#ifdef HAVE_ARMV5
emit_clz(HOST_TEMPREG,quotient);
emit_shl(HOST_TEMPREG,quotient,HOST_TEMPREG);
@@ -5354,8 +5359,8 @@ void multdiv_assemble_arm(int i,struct regstat *i_regs)
emit_shl(d2,HOST_TEMPREG,d2);
#else
emit_movimm(0,HOST_TEMPREG);
- emit_addpl_imm(d2,1,d2);
- emit_lslpls_imm(HOST_TEMPREG,1,HOST_TEMPREG);
+ emit_addpl_imm(HOST_TEMPREG,1,HOST_TEMPREG);
+ emit_lslpls_imm(d2,1,d2);
emit_jns((int)out-2*4);
emit_movimm(1<<31,quotient);
#endif