diff options
Diffstat (limited to 'target/nios2')
-rw-r--r-- | target/nios2/translate.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/target/nios2/translate.c b/target/nios2/translate.c index 194c8eb..fa35530 100644 --- a/target/nios2/translate.c +++ b/target/nios2/translate.c @@ -447,11 +447,13 @@ static void rdctl(DisasContext *dc, uint32_t code, uint32_t flags) gen_check_supervisor(dc); + if (unlikely(instr.c == R_ZERO)) { + return; + } + switch (instr.imm5 + CR_BASE) { default: - if (likely(instr.c != R_ZERO)) { - tcg_gen_mov_tl(cpu_R[instr.c], cpu_R[instr.imm5 + CR_BASE]); - } + tcg_gen_mov_tl(cpu_R[instr.c], cpu_R[instr.imm5 + CR_BASE]); break; } } |