Fix to the previous commit to only do it when using the recompiler.

This commit is contained in:
OBattler
2020-05-15 07:26:31 +02:00
parent 8997159dde
commit d5114bdf67
2 changed files with 6 additions and 3 deletions

View File

@@ -125,7 +125,8 @@ acpi_reg_read_intel(int size, uint16_t addr, void *p)
case 0x08: case 0x09: case 0x0a: case 0x0b:
/* PMTMR - Power Management Timer Register (IO) */
ret = (dev->regs.timer_val >> shift32) & 0xff;
update_tsc();
if (cpu_use_dynarec)
update_tsc();
break;
case 0x0c: case 0x0d:
/* GPSTS - General Purpose Status Register (IO) */
@@ -212,7 +213,8 @@ acpi_reg_read_via(int size, uint16_t addr, void *p)
case 0x08: case 0x09: case 0x0a: case 0x0b:
/* PMTMR - Power Management Timer Register (IO) */
ret = (dev->regs.timer_val >> shift32) & 0xff;
update_tsc();
if (cpu_use_dynarec)
update_tsc();
break;
case 0x10: case 0x11: case 0x12: case 0x13:
/* PCNTRL - Processor Control Register (IO) */

View File

@@ -14,7 +14,8 @@ static int opRDTSC(uint32_t fetchdat)
EAX = tsc & 0xffffffff;
EDX = tsc >> 32;
CLOCK_CYCLES(1);
update_tsc();
if (cpu_use_dynarec)
update_tsc();
return 0;
}