aboutsummaryrefslogtreecommitdiff
path: root/target/openrisc/sys_helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'target/openrisc/sys_helper.c')
-rw-r--r--target/openrisc/sys_helper.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/target/openrisc/sys_helper.c b/target/openrisc/sys_helper.c
index dc6e5cc7f2..9fb7d86b4b 100644
--- a/target/openrisc/sys_helper.c
+++ b/target/openrisc/sys_helper.c
@@ -189,7 +189,7 @@ void HELPER(mtspr)(CPUOpenRISCState *env,
break;
case TO_SPR(10, 1): /* TTCR */
- env->ttcr = rb;
+ cpu_openrisc_count_set(cpu, rb);
if (env->ttmr & TIMER_NONE) {
return;
}
@@ -312,7 +312,7 @@ target_ulong HELPER(mfspr)(CPUOpenRISCState *env,
case TO_SPR(10, 1): /* TTCR */
cpu_openrisc_count_update(cpu);
- return env->ttcr;
+ return cpu_openrisc_count_get(cpu);
default:
break;