1
0
Fork 0

enable instant irq checking after STI for the dynamic core

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2735
This commit is contained in:
Sebastian Strohhäcker 2007-01-08 21:29:27 +00:00
parent cb75e86089
commit 0cca0c96cf

View file

@ -188,6 +188,22 @@ static void dyn_check_bool_exception_al(void) {
used_save_info++;
}
#include "pic.h"
static void dyn_check_irqrequest(void) {
gen_load_host(&PIC_IRQCheck,DREG(TMPB),4);
gen_dop_word(DOP_OR,true,DREG(TMPB),DREG(TMPB));
save_info[used_save_info].branch_pos=gen_create_branch_long(BR_NZ);
gen_releasereg(DREG(TMPB));
dyn_savestate(&save_info[used_save_info].state);
if (!decode.cycles) decode.cycles++;
save_info[used_save_info].cycles=decode.cycles;
save_info[used_save_info].eip_change=decode.code-decode.code_start;
if (!cpu.code.big) save_info[used_save_info].eip_change&=0xffff;
save_info[used_save_info].type=normal;
used_save_info++;
}
static void dyn_fill_blocks(void) {
for (Bitu sct=0; sct<used_save_info; sct++) {
gen_fill_branch_long(save_info[sct].branch_pos);
@ -1791,6 +1807,7 @@ restart_prefix:
gen_call_function((void *)&CPU_STI,"%Rd",DREG(TMPB));
if (cpu.pmode) dyn_check_bool_exception(DREG(TMPB));
gen_releasereg(DREG(TMPB));
dyn_check_irqrequest();
if (max_opcodes<=0) max_opcodes=1; //Allow 1 extra opcode
break;
case 0xfc: //CLD