diff options
author | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-05-25 18:50:28 +0000 |
---|---|---|
committer | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-05-25 18:50:28 +0000 |
commit | 20c9f095c4536e64e60432a5c72fce38e8306cbb (patch) | |
tree | fe68375301d78efc0eb73138da36199a00bcde7a /target-sparc/op.c | |
parent | 8d05ea8a33c9d450d2a3079e967c69ea38ec28ba (diff) |
Implement Sparc64 CPU timers using ptimers
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2860 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-sparc/op.c')
-rw-r--r-- | target-sparc/op.c | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/target-sparc/op.c b/target-sparc/op.c index 5fbbd6db0f..c0aee8f4ac 100644 --- a/target-sparc/op.c +++ b/target-sparc/op.c @@ -1096,12 +1096,38 @@ void OPPROTO op_wrccr(void) void OPPROTO op_rdtick(void) { - T0 = 0; // XXX read cycle counter and bit 31 + T0 = do_tick_get_count(env->tick); } void OPPROTO op_wrtick(void) { - T0 = 0; // XXX write cycle counter and bit 31 + do_tick_set_count(env->tick, T0); +} + +void OPPROTO op_wrtick_cmpr(void) +{ + do_tick_set_limit(env->tick, T0); +} + +void OPPROTO op_rdstick(void) +{ + T0 = do_tick_get_count(env->stick); +} + +void OPPROTO op_wrstick(void) +{ + do_tick_set_count(env->stick, T0); + do_tick_set_count(env->hstick, T0); +} + +void OPPROTO op_wrstick_cmpr(void) +{ + do_tick_set_limit(env->stick, T0); +} + +void OPPROTO op_wrhstick_cmpr(void) +{ + do_tick_set_limit(env->hstick, T0); } void OPPROTO op_rdtpc(void) |