On 04/11/26, Richard Henderson wrote:
> CF_NO_GOTO_PTR is in cflags, not flags.
> 
> Cc: [email protected]
> Fixes: 46d396bde98 ("target/ppc: enable PMU instruction count")
> Reported-by: Matt Turner <[email protected]>
> Signed-off-by: Richard Henderson <[email protected]>
> ---
>  target/ppc/translate.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/target/ppc/translate.c b/target/ppc/translate.c
> index 467b8f3d4e..dfd09b66ff 100644
> --- a/target/ppc/translate.c
> +++ b/target/ppc/translate.c
> @@ -2645,7 +2645,7 @@ static void gen_lookup_and_goto_ptr(DisasContext *ctx)
>           * tcg_gen_lookup_and_goto_ptr will exit the TB if
>           * CF_NO_GOTO_PTR is set. Count insns now.
>           */
> -        if (ctx->base.tb->flags & CF_NO_GOTO_PTR) {
> +        if (ctx->base.tb->cflags & CF_NO_GOTO_PTR) {
>              pmu_count_insns(ctx);
>          }
>  
> -- 
> 2.53.0
> 
> 

There is another such check in 

  static void ppc_tr_tb_stop(DisasContextBase *dcbase, CPUState *cs)
  {
      [...]

      case DISAS_CHAIN:
          /*
           * tcg_gen_lookup_and_goto_ptr will exit the TB if
           * CF_NO_GOTO_PTR is set. Count insns now.
           */
          if (ctx->base.tb->flags & CF_NO_GOTO_PTR) {
              pmu_count_insns(ctx);
          }
  
          tcg_gen_lookup_and_goto_ptr();
          break;
        
      [...]
  }

with that one fixed as well

Reviewed-by: Anton Johansson <[email protected]>

Reply via email to