[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
- Re: [PATCH v4 02/30] target/arm: Rename TBFLAG_A32, SCTLR_B, (continued)
- [PATCH v4 05/30] target/arm: Introduce CPUARMTBFlags, Richard Henderson, 2021/04/16
- [PATCH v4 03/30] target/arm: Rename TBFLAG_ANY, PSTATE_SS, Richard Henderson, 2021/04/16
- [PATCH v4 04/30] target/arm: Add wrapper macros for accessing tbflags, Richard Henderson, 2021/04/16
- [PATCH v4 08/30] target/arm: Move TBFLAG_ANY bits to the bottom, Richard Henderson, 2021/04/16
- [PATCH v4 06/30] target/arm: Move mode specific TB flags to tb->cs_base, Richard Henderson, 2021/04/16
- Re: [PATCH v4 06/30] target/arm: Move mode specific TB flags to tb->cs_base,
Peter Maydell <=
- [PATCH v4 07/30] target/arm: Move TBFLAG_AM32 bits to the top, Richard Henderson, 2021/04/16
- [PATCH v4 13/30] target/arm: Adjust gen_aa32_{ld, st}_i64 for align+endianness, Richard Henderson, 2021/04/16
- [PATCH v4 09/30] target/arm: Add ALIGN_MEM to TBFLAG_ANY, Richard Henderson, 2021/04/16
- [PATCH v4 10/30] target/arm: Adjust gen_aa32_{ld, st}_i32 for align+endianness, Richard Henderson, 2021/04/16
- [PATCH v4 12/30] target/arm: Fix SCTLR_B test for TCGv_i64 load/store, Richard Henderson, 2021/04/16
- [PATCH v4 14/30] target/arm: Enforce word alignment for LDRD/STRD, Richard Henderson, 2021/04/16
- [PATCH v4 11/30] target/arm: Merge gen_aa32_frob64 into gen_aa32_ld_i64, Richard Henderson, 2021/04/16