qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v4 06/30] target/arm: Move mode specific TB flags to tb->cs_b


From: Peter Maydell
Subject: Re: [PATCH v4 06/30] target/arm: Move mode specific TB flags to tb->cs_base
Date: Mon, 19 Apr 2021 18:08:35 +0100

On Fri, 16 Apr 2021 at 20:09, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> Now that we have all of the proper macros defined, expanding
> the CPUARMTBFlags structure and populating the two TB fields
> is relatively simple.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>  target/arm/cpu.h       | 49 ++++++++++++++++++++++++------------------
>  target/arm/translate.h |  2 +-
>  target/arm/helper.c    |  2 +-
>  3 files changed, 30 insertions(+), 23 deletions(-)
>

> diff --git a/target/arm/translate.h b/target/arm/translate.h
> index f30287e554..50c2aba066 100644
> --- a/target/arm/translate.h
> +++ b/target/arm/translate.h
> @@ -402,7 +402,7 @@ typedef void AtomicThreeOpFn(TCGv_i64, TCGv_i64, 
> TCGv_i64, TCGArg, MemOp);
>   */
>  static inline CPUARMTBFlags arm_tbflags_from_tb(const TranslationBlock *tb)
>  {
> -    return (CPUARMTBFlags){ tb->flags };
> +    return (CPUARMTBFlags){ tb->flags, tb->cs_base };
>  }
>
>  /*
> diff --git a/target/arm/helper.c b/target/arm/helper.c
> index 9070b773a9..85b7d6add0 100644
> --- a/target/arm/helper.c
> +++ b/target/arm/helper.c
> @@ -13271,7 +13271,6 @@ void cpu_get_tb_cpu_state(CPUARMState *env, 
> target_ulong *pc,
>  {
>      CPUARMTBFlags flags;
>
> -    *cs_base = 0;
>      assert_hflags_rebuild_correctly(env);
>      flags = env->hflags;
>
> @@ -13340,6 +13339,7 @@ void cpu_get_tb_cpu_state(CPUARMState *env, 
> target_ulong *pc,
>      }
>
>      *pflags = flags.flags;
> +    *cs_base = flags.flags2;
>  }

Don't you also need to make assert_hflags_rebuild_correctly()
check flags2 now ?

Otherwise
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

thanks
-- PMM



reply via email to

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