On 1/24/25 08:27, Peter Maydell wrote:
We want to split the existing fp_status in the Arm CPUState into
separate float_status fields for AArch32 and AArch64.  (This is
because new control bits defined by FEAT_AFP only have an effect for
AArch64, not AArch32.) To make this split we will:
  * define new fp_status_a32 and fp_status_a64 which have
    identical behaviour to the existing fp_status
  * move existing uses of fp_status to fp_status_a32 or
    fp_status_a64 as appropriate
  * delete the old fp_status when it has no uses left

In this patch we add the new float_status fields.

We will also need to split fp_status_f16, but we will do that
as a separate series of patches.

Signed-off-by: Peter Maydell <peter.mayd...@linaro.org>
---
  target/arm/cpu.h           |  4 ++++
  target/arm/tcg/translate.h | 12 ++++++++++++
  target/arm/cpu.c           |  2 ++
  target/arm/vfp_helper.c    | 12 ++++++++++++
  4 files changed, 30 insertions(+)

Hmm.  My mistake for being slow about posting SME2 patches.
I converted fp_status* to an array indexed by ARMFPStatusFlavour.

@@ -702,6 +708,12 @@ static inline TCGv_ptr fpstatus_ptr(ARMFPStatusFlavour 
flavour)
      case FPST_FPCR:
          offset = offsetof(CPUARMState, vfp.fp_status);
          break;
+    case FPST_FPCR_A32:
+        offset = offsetof(CPUARMState, vfp.fp_status_a32);
+        break;
+    case FPST_FPCR_A64:
+        offset = offsetof(CPUARMState, vfp.fp_status_a64);
+        break;
      case FPST_FPCR_F16:
          offset = offsetof(CPUARMState, vfp.fp_status_f16);
          break;

... which eliminated this.

Anyway,
Reviewed-by: Richard Henderson <richard.hender...@linaro.org>

r~


Reply via email to