Recompiler now handles reset caused by a newly generated codeblock.
This commit is contained in:
parent
d79814692f
commit
6bc394b4c6
3 changed files with 14 additions and 1 deletions
|
|
@ -1319,6 +1319,7 @@ inrecomp=0;
|
|||
|
||||
// pclog("Hash %08x %i\n", codeblock_hash_pc[HASH(cs + pc)], codeblock_page_dirty[(cs + pc) >> 12]);
|
||||
cpu_block_end = 0;
|
||||
x86_was_reset = 0;
|
||||
|
||||
cpu_new_blocks++;
|
||||
|
||||
|
|
@ -1356,6 +1357,13 @@ inrecomp=0;
|
|||
|
||||
x86_opcodes[(opcode | op32) & 0x3ff](fetchdat);
|
||||
}
|
||||
|
||||
if (x86_was_reset)
|
||||
{
|
||||
x86_was_reset = 0;
|
||||
/*Codeblock structure will have been cleared so no need for CODE_BLOCK_END()*/
|
||||
goto recomp_end;
|
||||
}
|
||||
|
||||
if (!use32) pc &= 0xffff;
|
||||
|
||||
|
|
@ -1387,7 +1395,8 @@ inrecomp=0;
|
|||
// if (output && (SP & 1))
|
||||
// fatal("odd SP\n");
|
||||
}
|
||||
cycdiff=oldcyc-cycles;
|
||||
recomp_end:
|
||||
cycdiff=oldcyc-cycles;
|
||||
tsc += cycdiff;
|
||||
|
||||
// timer_end_period(cycles);
|
||||
|
|
|
|||
|
|
@ -619,6 +619,7 @@ chdir(pcempath);
|
|||
}
|
||||
|
||||
int resets = 0;
|
||||
int x86_was_reset = 0;
|
||||
void resetx86()
|
||||
{
|
||||
pclog("x86 reset\n");
|
||||
|
|
@ -655,6 +656,7 @@ void resetx86()
|
|||
#ifdef DYNAREC
|
||||
codegen_reset();
|
||||
#endif
|
||||
x86_was_reset = 1;
|
||||
}
|
||||
|
||||
void softresetx86()
|
||||
|
|
|
|||
|
|
@ -104,3 +104,5 @@ void x86seg_reset();
|
|||
void x86gpf(char *s, uint16_t error);
|
||||
|
||||
extern uint16_t zero;
|
||||
|
||||
extern int x86_was_reset;
|
||||
|
|
|
|||
Loading…
Reference in a new issue