On 4/9/21 2:36 AM, Philippe Mathieu-Daudé wrote:
-static uint32_t ns_to_count(CPUMIPSState *env, uint64_t ns) +static uint32_t tick_to_count(MIPSCPU *cpu, uint64_t ticks) { - return ns / env->cp0_count_ns; + return ticks / cpu->cp0_count_rate; }
I'm not clear on the difference between ticks and counts, and this change looks suspicious in terms of units. Hasn't cp0_count_rate been used to initialize the clock in the first place? And if so, why didn't clock_ns_to_ticks do the entire job?
r~