Skip to content

Commit

Permalink
Add missing releasereg instances. (jmarsh)
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4355 ed541006-0bf7-43e9-8c4d-6fc63c346d47
  • Loading branch information
qbix79 committed Jun 24, 2020
1 parent 07545a4 commit 66f3c1f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/cpu/core_dyn_x86/decoder.h
Expand Up @@ -1043,6 +1043,7 @@ static void dyn_pop(DynReg * dynreg,bool checked=true) {
gen_dop_word_var(DOP_AND,true,DREG(STACK),&cpu.stack.mask);
gen_dop_word_var(DOP_AND,true,DREG(ESP),&cpu.stack.notmask);
gen_dop_word(DOP_OR,true,DREG(ESP),DREG(STACK));
gen_releasereg(DREG(STACK));
}
}

Expand Down Expand Up @@ -1150,6 +1151,7 @@ static void dyn_fill_ea(bool addseg=true, DynReg * reg_ea=DREG(EA)) {
gen_lea(DREG(EA),DREG(EA),scaled,scale,0);
gen_lea(reg_ea,DREG(EA),*seg,0,0);
}
if (reg_ea!=DREG(EA)) gen_releasereg(DREG(EA));
return;
}
imm=(Bit32s)val;
Expand Down Expand Up @@ -1193,6 +1195,7 @@ static void dyn_fill_ea(bool addseg=true, DynReg * reg_ea=DREG(EA)) {
gen_lea(reg_ea,DREG(EA),decode.segprefix ? decode.segprefix : segbase,0,0);
}
}
if (reg_ea!=DREG(EA)) gen_releasereg(DREG(EA));
return;
}

Expand All @@ -1209,6 +1212,7 @@ static void dyn_fill_ea(bool addseg=true, DynReg * reg_ea=DREG(EA)) {
else {
gen_lea(DREG(EA),base,scaled,scale,imm);
gen_lea(reg_ea,DREG(EA),decode.segprefix ? decode.segprefix : segbase,0,0);
if (reg_ea!=DREG(EA)) gen_releasereg(DREG(EA));
}
}
}
Expand Down Expand Up @@ -1762,6 +1766,7 @@ static void dyn_load_seg_off_ea(SegNames seg) {
dyn_read_word_release(DREG(EA),DREG(TMPW),decode.big_op);
dyn_load_seg(seg,DREG(TMPB));gen_releasereg(DREG(TMPB));
gen_dop_word(DOP_MOV,decode.big_op,&DynRegs[decode.modrm.reg],DREG(TMPW));
gen_releasereg(DREG(TMPW));
} else {
IllegalOption("dyn_load_seg_off_ea");
}
Expand Down Expand Up @@ -2791,6 +2796,7 @@ static CacheBlock * CreateCacheBlock(CodePageHandler * codepage,PhysPt start,Bit
case 0x6: /* PUSH Ev */
gen_releasereg(DREG(EA));
dyn_push(src);
gen_releasereg(DREG(TMPW));
break;
default:
LOG(LOG_CPU,LOG_ERROR)("CPU:GRP5:Illegal opcode 0xff");
Expand Down

0 comments on commit 66f3c1f

Please sign in to comment.