qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 03/12] target/arm: Add TB flag for "MVE insns not predicat


From: Richard Henderson
Subject: Re: [PATCH v2 03/12] target/arm: Add TB flag for "MVE insns not predicated"
Date: Mon, 13 Sep 2021 06:44:35 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0

On 9/13/21 2:54 AM, Peter Maydell wrote:
Our current codegen for MVE always calls out to helper functions,
because some byte lanes might be predicated.  The common case is that
in fact there is no predication active and all lanes should be
updated together, so we can produce better code by detecting that and
using the TCG generic vector infrastructure.

Add a TB flag that is set when we can guarantee that there is no
active MVE predication, and a bool in the DisasContext.  Subsequent
patches will use this flag to generate improved code for some
instructions.

In most cases when the predication state changes we simply end the TB
after that instruction.  For the code called from vfp_access_check()
that handles lazy state preservation and creating a new FP context,
we can usually avoid having to try to end the TB because luckily the
new value of the flag following the register changes in those
sequences doesn't depend on any runtime decisions.  We do have to end
the TB if the guest has enabled lazy FP state preservation but not
automatic state preservation, but this is an odd corner case that is
not going to be common in real-world code.

Signed-off-by: Peter Maydell<peter.maydell@linaro.org>
---
I renamed the mve_no_predication() function to mve_no_pred() because
I want to use the former name in patch 2 for the translate-time "no
predication of any kind including ECI", and wanted to distinguish it
from this function that is just determining the value of the TB flag
bit.  Better naming suggestions welcome.
---
  target/arm/cpu.h              |  4 +++-
  target/arm/translate.h        |  2 ++
  target/arm/helper.c           | 33 +++++++++++++++++++++++++++++++++
  target/arm/translate-m-nocp.c |  8 +++++++-
  target/arm/translate-mve.c    | 13 ++++++++++++-
  target/arm/translate-vfp.c    | 33 +++++++++++++++++++++++++++------
  target/arm/translate.c        |  8 ++++++++
  7 files changed, 92 insertions(+), 9 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~



reply via email to

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