aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornotaz2010-12-02 01:11:39 +0200
committernotaz2010-12-02 01:17:34 +0200
commit666a299d761b91429d2952f55dac9270e0fb930e (patch)
treebf910b1e60b385e2ad90bef24eaba3eb18b939cb
parent7139f3c8070e9aa14fd36c2451d7f10079caa37a (diff)
downloadpcsx_rearmed-666a299d761b91429d2952f55dac9270e0fb930e.tar.gz
pcsx_rearmed-666a299d761b91429d2952f55dac9270e0fb930e.tar.bz2
pcsx_rearmed-666a299d761b91429d2952f55dac9270e0fb930e.zip
drc: fix unsaved register
it caused invalidate_addr() sometimes to be called with bad address.
-rw-r--r--libpcsxcore/new_dynarec/new_dynarec.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libpcsxcore/new_dynarec/new_dynarec.c b/libpcsxcore/new_dynarec/new_dynarec.c
index 3249e57..95d433f 100644
--- a/libpcsxcore/new_dynarec/new_dynarec.c
+++ b/libpcsxcore/new_dynarec/new_dynarec.c
@@ -2952,7 +2952,7 @@ void store_assemble(int i,struct regstat *i_regs)
int addr,temp;
int offset;
int jaddr=0,jaddr2,type;
- int memtarget,c=0;
+ int memtarget=0,c=0;
int agr=AGEN1+(i&1);
u_int hr,reglist=0;
th=get_reg(i_regs->regmap,rs2[i]|64);
@@ -3068,6 +3068,9 @@ void store_assemble(int i,struct regstat *i_regs)
}
type=STORED_STUB;
}
+ if(!using_tlb&&(!c||memtarget))
+ // addr could be a temp, make sure it survives STORE*_STUB
+ reglist|=1<<addr;
if(jaddr) {
add_stub(type,jaddr,(int)out,i,addr,(int)i_regs,ccadj[i],reglist);
} else if(!memtarget) {