diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2018-02-20 11:18:07 -0800 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2018-05-14 14:58:08 -0700 |
commit | c7b6f54bf8d6d0e847230998d09495c73eeac9aa (patch) | |
tree | f68ab664dbfdfe2151800de2005fb224e051db0c /target/openrisc | |
parent | 6fd204a2e934ae013d0b96458ab3d4163ccbea27 (diff) |
target/openrisc: Merge disas_openrisc_insn
Acked-by: Stafford Horne <shorne@gmail.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/openrisc')
-rw-r--r-- | target/openrisc/translate.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/target/openrisc/translate.c b/target/openrisc/translate.c index 1f87ad6b2e..e7c96ca990 100644 --- a/target/openrisc/translate.c +++ b/target/openrisc/translate.c @@ -1373,14 +1373,6 @@ static bool trans_lf_sfle_s(DisasContext *dc, arg_ab *a, uint32_t insn) return true; } -static void disas_openrisc_insn(DisasContext *dc, OpenRISCCPU *cpu) -{ - uint32_t insn = cpu_ldl_code(&cpu->env, dc->base.pc_next); - if (!decode(dc, insn)) { - gen_illegal_exception(dc); - } -} - static void openrisc_tr_init_disas_context(DisasContextBase *dcb, CPUState *cs) { DisasContext *dc = container_of(dcb, DisasContext, base); @@ -1435,8 +1427,11 @@ static void openrisc_tr_translate_insn(DisasContextBase *dcbase, CPUState *cs) { DisasContext *dc = container_of(dcbase, DisasContext, base); OpenRISCCPU *cpu = OPENRISC_CPU(cs); + uint32_t insn = cpu_ldl_code(&cpu->env, dc->base.pc_next); - disas_openrisc_insn(dc, cpu); + if (!decode(dc, insn)) { + gen_illegal_exception(dc); + } dc->base.pc_next += 4; /* delay slot */ |