On Thu, 29 Jul 2021 at 01:50, Richard Henderson <richard.hender...@linaro.org> wrote: > > Signed-off-by: Richard Henderson <richard.hender...@linaro.org> > --- > target/alpha/cpu.c | 2 +- > target/alpha/mem_helper.c | 8 +++----- > 2 files changed, 4 insertions(+), 6 deletions(-) > > diff --git a/target/alpha/cpu.c b/target/alpha/cpu.c > index 4871ad0c0a..cb7e5261bd 100644 > --- a/target/alpha/cpu.c > +++ b/target/alpha/cpu.c > @@ -220,11 +220,11 @@ static const struct TCGCPUOps alpha_tcg_ops = { > .initialize = alpha_translate_init, > .cpu_exec_interrupt = alpha_cpu_exec_interrupt, > .tlb_fill = alpha_cpu_tlb_fill, > + .do_unaligned_access = alpha_cpu_do_unaligned_access, > > #ifndef CONFIG_USER_ONLY > .do_interrupt = alpha_cpu_do_interrupt, > .do_transaction_failed = alpha_cpu_do_transaction_failed, > - .do_unaligned_access = alpha_cpu_do_unaligned_access, > #endif /* !CONFIG_USER_ONLY */ > }; > > diff --git a/target/alpha/mem_helper.c b/target/alpha/mem_helper.c > index 75e72bc337..e3cf98b270 100644 > --- a/target/alpha/mem_helper.c > +++ b/target/alpha/mem_helper.c > @@ -23,30 +23,28 @@ > #include "exec/exec-all.h" > #include "exec/cpu_ldst.h" > > -/* Softmmu support */ > -#ifndef CONFIG_USER_ONLY > void alpha_cpu_do_unaligned_access(CPUState *cs, vaddr addr, > MMUAccessType access_type, > int mmu_idx, uintptr_t retaddr) > { > AlphaCPU *cpu = ALPHA_CPU(cs); > CPUAlphaState *env = &cpu->env; > - uint64_t pc; > uint32_t insn; > > cpu_restore_state(cs, retaddr, true); > > - pc = env->pc; > - insn = cpu_ldl_code(env, pc); > + insn = cpu_ldl_code(env, env->pc); > > env->trap_arg0 = addr; > env->trap_arg1 = insn >> 26; /* opcode */ > env->trap_arg2 = (insn >> 21) & 31; /* dest regno */ > + > cs->exception_index = EXCP_UNALIGN; > env->error_code = 0; > cpu_loop_exit(cs); > }
The code changes here seem unnecessary ? Anyway Reviewed-by: Peter Maydell <peter.mayd...@linaro.org> thanks -- PMM