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

@@ -14,12 +14,19 @@ static struct
} acc_regs[] =
{
[ACCREG_ins] = {0, (uintptr_t) &(ins)},
[ACCREG_cycles] = {0, (uintptr_t) &(cycles)},
[ACCREG_cycles] = {0, (uintptr_t) &(cycles)}
};
void codegen_accumulate(int acc_reg, int delta)
{
acc_regs[acc_reg].count += delta;
if (delta != 0) {
addbyte(0x81); /*ADD $acc_regs[c].count,acc_regs[c].dest*/
addbyte(0x05);
addlong((uint32_t) (uintptr_t) &(acycs));
addlong((uintptr_t) delta);
}
}
void codegen_accumulate_flush(void)
@@ -38,6 +45,8 @@ void codegen_accumulate_flush(void)
acc_regs[c].count = 0;
}
acycs = 0;
}
void codegen_accumulate_reset()