qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 3/4] target/arm: Assert hflags is correct in cpu


From: Alex Bennée
Subject: Re: [Qemu-devel] [PATCH 3/4] target/arm: Assert hflags is correct in cpu_get_tb_cpu_state
Date: Tue, 19 Feb 2019 14:53:43 +0000
User-agent: mu4e 1.1.0; emacs 26.1

Richard Henderson <address@hidden> writes:

> Make sure that we are updating env->hflags everywhere required.
>
> Signed-off-by: Richard Henderson <address@hidden>

Arguably this is a debugging aid and we don't need it the git history,
nevertheless:

Reviewed-by: Alex Bennée <address@hidden>

> ---
>  target/arm/helper.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/target/arm/helper.c b/target/arm/helper.c
> index d8249f0eae..3c8724883d 100644
> --- a/target/arm/helper.c
> +++ b/target/arm/helper.c
> @@ -13902,11 +13902,13 @@ void cpu_get_tb_cpu_state(CPUARMState *env, 
> target_ulong *pc,
>      if (is_a64(env)) {
>          *pc = env->pc;
>          flags = rebuild_hflags_a64(env, current_el);
> +        assert(flags == env->hflags);
>          flags = FIELD_DP32(flags, TBFLAG_A64, BTYPE, env->btype);
>          pstate_for_ss = env->pstate;
>      } else {
>          *pc = env->regs[15];
>          flags = rebuild_hflags_a32(env, current_el);
> +        assert(flags == env->hflags);
>          flags = FIELD_DP32(flags, TBFLAG_A32, THUMB, env->thumb);
>          flags = FIELD_DP32(flags, TBFLAG_A32, CONDEXEC, env->condexec_bits);
>          pstate_for_ss = env->uncached_cpsr;


--
Alex Bennée



reply via email to

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