qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 7/7] target/xtensa: move non-HELPER functions to


From: Philippe Mathieu-Daudé
Subject: Re: [Qemu-devel] [PATCH 7/7] target/xtensa: move non-HELPER functions to helper.c
Date: Mon, 17 May 2021 07:05:41 +0200

Hi Max,

On Mon, Jan 14, 2019 at 8:52 AM Max Filippov <jcmvbkbc@gmail.com> wrote:
>
> Move remaining non-HELPER functions from op_helper.c to helper.c.
> No functional changes.
>
> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
> ---
>  target/xtensa/helper.c    | 61 
> ++++++++++++++++++++++++++++++++++++++++++++---
>  target/xtensa/op_helper.c | 56 -------------------------------------------
>  2 files changed, 58 insertions(+), 59 deletions(-)

> +void xtensa_cpu_do_unaligned_access(CPUState *cs,
> +                                    vaddr addr, MMUAccessType access_type,
> +                                    int mmu_idx, uintptr_t retaddr)
> +{
> +    XtensaCPU *cpu = XTENSA_CPU(cs);
> +    CPUXtensaState *env = &cpu->env;
> +
> +    if (xtensa_option_enabled(env->config, 
> XTENSA_OPTION_UNALIGNED_EXCEPTION) &&
> +        !xtensa_option_enabled(env->config, XTENSA_OPTION_HW_ALIGNMENT)) {

I know this is a simple code movement, but I wonder, what should
happen when there is
an unaligned fault and the options are disabled? Is this an impossible
case (unreachable)?

> +        cpu_restore_state(CPU(cpu), retaddr, true);
> +        HELPER(exception_cause_vaddr)(env,
> +                                      env->pc, LOAD_STORE_ALIGNMENT_CAUSE,
> +                                      addr);
> +    }
> +}



reply via email to

[Prev in Thread] Current Thread [Next in Thread]