diff options
Diffstat (limited to 'target/openrisc/sys_helper.c')
-rw-r--r-- | target/openrisc/sys_helper.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/target/openrisc/sys_helper.c b/target/openrisc/sys_helper.c index daea902856..4a59728964 100644 --- a/target/openrisc/sys_helper.c +++ b/target/openrisc/sys_helper.c @@ -49,8 +49,7 @@ void HELPER(mtspr)(CPUOpenRISCState *env, (rb & (SR_IME | SR_DME | SR_SM))) { tlb_flush(cs); } - env->sr = rb; - env->sr |= SR_FO; /* FO is const equal to 1 */ + cpu_set_sr(env, rb); if (env->sr & SR_DME) { env->tlb->cpu_openrisc_map_address_data = &cpu_openrisc_get_phys_data; @@ -200,7 +199,7 @@ target_ulong HELPER(mfspr)(CPUOpenRISCState *env, return env->npc; case TO_SPR(0, 17): /* SR */ - return env->sr; + return cpu_get_sr(env); case TO_SPR(0, 18): /* PPC */ return env->ppc; |