adjust CLOCK_CYCLES and related macros to handle fpu/iu concurrency

add CLOCK_CYCLES_FPU, which does exactly what CLOCK_CYCLES already did.

add CONCURRENCY_CYCLES, which sets fpu_cycles, which is the number of
available concurrent execution cycles that the integer unit can do
"free" work in while the fpu is executing.

adjust CLOCK_CYCLES so that if there are fpu_cycles, the cycle count is
subtracted from fpu_cycles instead of cycles, emulating the behavior of
these concurrent cycles being "free" as on real hardware.
This commit is contained in:
linear cannon
2022-01-29 07:27:45 -08:00
parent 4815fcc226
commit 04c89959f8
4 changed files with 52 additions and 3 deletions

View File

@@ -65,6 +65,8 @@ static __inline void fetch_ea_16_long(uint32_t rmdat)
#define OP_TABLE(name) dynarec_ops_ ## name
#define CLOCK_CYCLES(c)
#define CLOCK_CYCLES_FPU(c)
#define CONCURRENCY_CYCLES(c) fpu_cycles = (c)
#define CLOCK_CYCLES_ALWAYS(c) cycles -= (c)
#include "386_ops.h"