diff options
author | Richard Henderson <rth@twiddle.net> | 2015-02-18 11:45:54 -0800 |
---|---|---|
committer | Richard Henderson <rth@twiddle.net> | 2017-02-14 08:14:59 +1100 |
commit | 84775c43f390d4f5dd9adf8732e7e0b6deed8f61 (patch) | |
tree | 56b0df7c4bfbcbafb342b4d3f7fb8c862ad2431e /target/openrisc/sys_helper.c | |
parent | cf2ae4428f320f3d8027a50c1cd45f4b5a6c93bb (diff) |
target/openrisc: Keep SR_F in a separate variable
This avoids having to keep merging and extracting the flag from SR.
Reviewed-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
Signed-off-by: Richard Henderson <rth@twiddle.net>
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; |