uint64_t helper_tick_get_count(void *opaque) { #if !defined(CONFIG_USER_ONLY) return cpu_tick_get_count(opaque); #else return 0; #endif }
uint64_t helper_tick_get_count(CPUSPARCState *env, void *opaque, int mem_idx) { #if !defined(CONFIG_USER_ONLY) CPUTimer *timer = opaque; if (timer->npt && mem_idx < MMU_KERNEL_IDX) { cpu_raise_exception_ra(env, TT_PRIV_INSN, GETPC()); } return cpu_tick_get_count(timer); #else return 0; #endif }