From 4815fcc2265bbbddbc08826aefc7343803db0187 Mon Sep 17 00:00:00 2001 From: linear cannon Date: Sat, 29 Jan 2022 07:25:38 -0800 Subject: [PATCH] add fpu_cycles variable to cpu_state to track fpu/iu concurrency --- src/86box.c | 2 ++ src/cpu/cpu.h | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/86box.c b/src/86box.c index 4cee64445..315c07a5c 100644 --- a/src/86box.c +++ b/src/86box.c @@ -1048,6 +1048,8 @@ pc_reset_hard_init(void) cycles = cycles_main = 0; + fpu_cycles = 0; + update_mouse_msg(); } diff --git a/src/cpu/cpu.h b/src/cpu/cpu.h index 18962bab0..690869424 100644 --- a/src/cpu/cpu.h +++ b/src/cpu/cpu.h @@ -354,7 +354,7 @@ typedef struct { uint8_t ssegs, ismmx, abrt, _smi_line; - int _cycles, _in_smm; + int _cycles, _fpu_cycles, _in_smm; uint16_t npxs, npxc; @@ -457,6 +457,7 @@ COMPILE_TIME_ASSERT(sizeof(cpu_state_t) <= 128) #define DI cpu_state.regs[7].w #define cycles cpu_state._cycles +#define fpu_cycles cpu_state._fpu_cycles #define cpu_rm cpu_state.rm_data.rm_mod_reg.rm #define cpu_mod cpu_state.rm_data.rm_mod_reg.mod