aboutsummaryrefslogtreecommitdiff
path: root/libpcsxcore
diff options
context:
space:
mode:
authornotaz2011-06-22 16:07:01 +0300
committernotaz2011-07-08 00:15:07 +0300
commit79c75f1b7efbec9dc8bbd6e3546ec1c07040b702 (patch)
treea435aaeecf0b4e7e3a5a2c14ca3949110c24c58e /libpcsxcore
parent0c1fe38bf0d4077fb38ee1d1f42ec819b17a0be0 (diff)
downloadpcsx_rearmed-79c75f1b7efbec9dc8bbd6e3546ec1c07040b702.tar.gz
pcsx_rearmed-79c75f1b7efbec9dc8bbd6e3546ec1c07040b702.tar.bz2
pcsx_rearmed-79c75f1b7efbec9dc8bbd6e3546ec1c07040b702.zip
drc: merge Ari64's patch: 11_dealloc_reg_clear_const_flag
Diffstat (limited to 'libpcsxcore')
-rw-r--r--libpcsxcore/new_dynarec/new_dynarec.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libpcsxcore/new_dynarec/new_dynarec.c b/libpcsxcore/new_dynarec/new_dynarec.c
index 95e5104..66603ea 100644
--- a/libpcsxcore/new_dynarec/new_dynarec.c
+++ b/libpcsxcore/new_dynarec/new_dynarec.c
@@ -599,6 +599,7 @@ void clear_const(struct regstat *cur,signed char reg)
int is_const(struct regstat *cur,signed char reg)
{
int hr;
+ if(reg<0) return 0;
if(!reg) return 1;
for (hr=0;hr<HOST_REGS;hr++) {
if((cur->regmap[hr]&63)==reg) {
@@ -9751,7 +9752,10 @@ int new_recompile_block(int addr)
if(likely[i]) {
regs[i].regmap[hr]=-1;
regs[i].isconst&=~(1<<hr);
- if(i<slen-2) regmap_pre[i+2][hr]=-1;
+ if(i<slen-2) {
+ regmap_pre[i+2][hr]=-1;
+ regs[i+2].wasconst&=~(1<<hr);
+ }
}
}
}
@@ -9806,6 +9810,7 @@ int new_recompile_block(int addr)
{
if(!likely[i]&&i<slen-2) {
regmap_pre[i+2][hr]=-1;
+ regs[i+2].wasconst&=~(1<<hr);
}
}
}
@@ -9851,6 +9856,7 @@ int new_recompile_block(int addr)
}
regmap_pre[i+1][hr]=-1;
if(regs[i+1].regmap_entry[hr]==CCREG) regs[i+1].regmap_entry[hr]=-1;
+ regs[i+1].wasconst&=~(1<<hr);
}
regs[i].regmap[hr]=-1;
regs[i].isconst&=~(1<<hr);