diff options
author | pbrook | 2008-06-29 03:03:05 +0200 |
---|---|---|
committer | pbrook | 2008-06-29 03:03:05 +0200 |
commit | 2e70f6efa8b960d3b5401373ad6fa98747bb9578 (patch) | |
tree | 4864a691a4d52324fe4626261e202525dd3a8659 /hw/mips_timer.c | |
parent | Fix shell quoting. (diff) | |
download | qemu-2e70f6efa8b960d3b5401373ad6fa98747bb9578.tar.gz qemu-2e70f6efa8b960d3b5401373ad6fa98747bb9578.tar.xz qemu-2e70f6efa8b960d3b5401373ad6fa98747bb9578.zip |
Add instruction counter.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4799 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/mips_timer.c')
-rw-r--r-- | hw/mips_timer.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/mips_timer.c b/hw/mips_timer.c index 5b172ea424..5549e2483a 100644 --- a/hw/mips_timer.c +++ b/hw/mips_timer.c @@ -91,7 +91,12 @@ static void mips_timer_cb (void *opaque) if (env->CP0_Cause & (1 << CP0Ca_DC)) return; + /* ??? This callback should occur when the counter is exactly equal to + the comparator value. Offset the count by one to avoid immediately + retriggering the callback before any virtual time has passed. */ + env->CP0_Count++; cpu_mips_timer_update(env); + env->CP0_Count--; if (env->insn_flags & ISA_MIPS32R2) env->CP0_Cause |= 1 << CP0Ca_TI; qemu_irq_raise(env->irq[(env->CP0_IntCtl >> CP0IntCtl_IPTI) & 0x7]); |