aboutsummaryrefslogtreecommitdiff
path: root/libpcsxcore/new_dynarec/assem_arm.c
diff options
context:
space:
mode:
authornotaz2011-03-07 16:38:15 +0200
committernotaz2011-03-07 19:58:54 +0200
commit97a238a64737245ec8977d0242059e90e0ac01fb (patch)
tree64e57da90f3ac261a0095418fcdcb62812916e7a /libpcsxcore/new_dynarec/assem_arm.c
parent2c8869044c0faff01c6bb8986346f78f631ceac1 (diff)
downloadpcsx_rearmed-97a238a64737245ec8977d0242059e90e0ac01fb.tar.gz
pcsx_rearmed-97a238a64737245ec8977d0242059e90e0ac01fb.tar.bz2
pcsx_rearmed-97a238a64737245ec8977d0242059e90e0ac01fb.zip
drc: rm unneeded writebacks in stubs, as suggested by Ari64
also fix leftover moves, missed by last cleanup commit.
Diffstat (limited to 'libpcsxcore/new_dynarec/assem_arm.c')
-rw-r--r--libpcsxcore/new_dynarec/assem_arm.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libpcsxcore/new_dynarec/assem_arm.c b/libpcsxcore/new_dynarec/assem_arm.c
index 9530410..bc9e5cd 100644
--- a/libpcsxcore/new_dynarec/assem_arm.c
+++ b/libpcsxcore/new_dynarec/assem_arm.c
@@ -2646,12 +2646,14 @@ do_readstub(int n)
emit_writeword(rs,(int)&address);
//emit_pusha();
save_regs(reglist);
+#ifndef PCSX
ds=i_regs!=&regs[i];
int real_rs=(itype[i]==LOADLR)?-1:get_reg(i_regmap,rs1[i]);
u_int cmask=ds?-1:(0x100f|~i_regs->wasconst);
if(!ds) load_all_consts(regs[i].regmap_entry,regs[i].was32,regs[i].wasdirty&~(1<<addr)&(real_rs<0?-1:~(1<<real_rs))&0x100f,i);
wb_dirtys(i_regs->regmap_entry,i_regs->was32,i_regs->wasdirty&cmask&~(1<<addr)&(real_rs<0?-1:~(1<<real_rs)));
if(!ds) wb_consts(regs[i].regmap_entry,regs[i].was32,regs[i].wasdirty&~(1<<addr)&(real_rs<0?-1:~(1<<real_rs))&~0x100f,i);
+#endif
emit_shrimm(rs,16,1);
int cc=get_reg(i_regmap,CCREG);
if(cc<0) {
@@ -2842,12 +2844,14 @@ do_writestub(int n)
}
//emit_pusha();
save_regs(reglist);
+#ifndef PCSX
ds=i_regs!=&regs[i];
int real_rs=get_reg(i_regmap,rs1[i]);
u_int cmask=ds?-1:(0x100f|~i_regs->wasconst);
if(!ds) load_all_consts(regs[i].regmap_entry,regs[i].was32,regs[i].wasdirty&~(1<<addr)&(real_rs<0?-1:~(1<<real_rs))&0x100f,i);
wb_dirtys(i_regs->regmap_entry,i_regs->was32,i_regs->wasdirty&cmask&~(1<<addr)&(real_rs<0?-1:~(1<<real_rs)));
if(!ds) wb_consts(regs[i].regmap_entry,regs[i].was32,regs[i].wasdirty&~(1<<addr)&(real_rs<0?-1:~(1<<real_rs))&~0x100f,i);
+#endif
emit_shrimm(rs,16,1);
int cc=get_reg(i_regmap,CCREG);
if(cc<0) {
@@ -2979,12 +2983,14 @@ do_unalignedwritestub(int n)
emit_writeword(temp2,(int)&address);
save_regs(reglist);
+#ifndef PCSX
ds=i_regs!=&regs[i];
real_rs=get_reg(i_regmap,rs1[i]);
u_int cmask=ds?-1:(0x100f|~i_regs->wasconst);
if(!ds) load_all_consts(regs[i].regmap_entry,regs[i].was32,regs[i].wasdirty&~(1<<addr)&(real_rs<0?-1:~(1<<real_rs))&0x100f,i);
wb_dirtys(i_regs->regmap_entry,i_regs->was32,i_regs->wasdirty&cmask&~(1<<addr)&(real_rs<0?-1:~(1<<real_rs)));
if(!ds) wb_consts(regs[i].regmap_entry,regs[i].was32,regs[i].wasdirty&~(1<<addr)&(real_rs<0?-1:~(1<<real_rs))&~0x100f,i);
+#endif
emit_shrimm(addr,16,1);
int cc=get_reg(i_regmap,CCREG);
if(cc<0) {