Ported the CPU fixes from PCem.
This commit is contained in:
@@ -756,19 +756,6 @@ exec386_dynarec(int cycs)
|
||||
exec386_dynarec_dyn();
|
||||
}
|
||||
|
||||
cycdiff = oldcyc - cycles;
|
||||
delta = tsc - oldtsc;
|
||||
if (delta > 0) {
|
||||
/* TSC has changed, this means interim timer processing has happened,
|
||||
see how much we still need to add. */
|
||||
cycdiff -= delta;
|
||||
if (cycdiff > 0)
|
||||
tsc += cycdiff;
|
||||
} else {
|
||||
/* TSC has not changed. */
|
||||
tsc += cycdiff;
|
||||
}
|
||||
|
||||
if (cpu_state.abrt) {
|
||||
flags_rebuild();
|
||||
tempi = cpu_state.abrt & ABRT_MASK;
|
||||
@@ -819,6 +806,19 @@ exec386_dynarec(int cycs)
|
||||
}
|
||||
}
|
||||
|
||||
cycdiff = oldcyc - cycles;
|
||||
delta = tsc - oldtsc;
|
||||
if (delta > 0) {
|
||||
/* TSC has changed, this means interim timer processing has happened,
|
||||
see how much we still need to add. */
|
||||
cycdiff -= delta;
|
||||
if (cycdiff > 0)
|
||||
tsc += cycdiff;
|
||||
} else {
|
||||
/* TSC has not changed. */
|
||||
tsc += cycdiff;
|
||||
}
|
||||
|
||||
if (cycdiff > 0) {
|
||||
if (TIMER_VAL_LESS_THAN_VAL(timer_target, (uint32_t) tsc))
|
||||
timer_process_inline();
|
||||
|
||||
Reference in New Issue
Block a user