Fixed cycles accumulation in update_tsc() when cache is enabled (and the actual recompiler kicks in), and also fixed a warning in the 82091AA code.

This commit is contained in:
OBattler
2020-07-12 20:01:16 +02:00
parent 8e5fa10d0e
commit 974a7ae4f1
9 changed files with 39 additions and 3 deletions

View File

@@ -276,12 +276,17 @@ static void prefetch_flush()
static int cycles_main = 0, cycles_old = 0;
static uint64_t tsc_old = 0;
int acycs = 0;
void update_tsc(void)
{
int cycdiff;
uint64_t delta;
cycdiff = cycles_old - cycles;
if (CACHE_ON())
cycdiff = acycs;
else
cycdiff = cycles_old - cycles;
delta = tsc - tsc_old;
if (delta > 0) {
/* TSC has changed, this means interim timer processing has happened,