[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 09/22] target/arm: Remove ah_fp_status_f16
From: |
Richard Henderson |
Subject: |
[PATCH 09/22] target/arm: Remove ah_fp_status_f16 |
Date: |
Mon, 27 Jan 2025 15:25:51 -0800 |
Replace with fp_status[FPST_AH_F16].
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/arm/cpu.h | 3 +--
target/arm/cpu.c | 2 +-
target/arm/vfp_helper.c | 10 +++++-----
3 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/target/arm/cpu.h b/target/arm/cpu.h
index 18afff8509..0f7d5d5430 100644
--- a/target/arm/cpu.h
+++ b/target/arm/cpu.h
@@ -237,7 +237,7 @@ typedef struct NVICState NVICState;
* behaviour when FPCR.AH == 1: they don't update cumulative
* exception flags, they act like FPCR.{FZ,FIZ} = {1,1} and
* they ignore FPCR.RMode. But they don't ignore FPCR.FZ16,
- * which means we need an ah_fp_status_f16 as well.
+ * which means we need an FPST_AH_F16 as well.
*
* To avoid having to transfer exception bits around, we simply
* say that the FPSCR cumulative exception flags are the logical
@@ -695,7 +695,6 @@ typedef struct CPUArchState {
float_status fp_status_f16_a32;
float_status fp_status_f16_a64;
float_status ah_fp_status;
- float_status ah_fp_status_f16;
};
};
diff --git a/target/arm/cpu.c b/target/arm/cpu.c
index 26e3465a4b..ffb2151de5 100644
--- a/target/arm/cpu.c
+++ b/target/arm/cpu.c
@@ -559,7 +559,7 @@ static void arm_cpu_reset_hold(Object *obj, ResetType type)
arm_set_ah_fp_behaviours(&env->vfp.ah_fp_status);
set_flush_to_zero(1, &env->vfp.ah_fp_status);
set_flush_inputs_to_zero(1, &env->vfp.ah_fp_status);
- arm_set_ah_fp_behaviours(&env->vfp.ah_fp_status_f16);
+ arm_set_ah_fp_behaviours(&env->vfp.fp_status[FPST_AH_F16]);
#ifndef CONFIG_USER_ONLY
if (kvm_enabled()) {
diff --git a/target/arm/vfp_helper.c b/target/arm/vfp_helper.c
index 93db713a40..d8dc58098b 100644
--- a/target/arm/vfp_helper.c
+++ b/target/arm/vfp_helper.c
@@ -129,7 +129,7 @@ static uint32_t vfp_get_fpsr_from_host(CPUARMState *env)
a64_flags |= (get_float_exception_flags(&env->vfp.fp_status_f16_a64)
& ~(float_flag_input_denormal_flushed |
float_flag_input_denormal_used));
/*
- * We do not merge in flags from ah_fp_status or ah_fp_status_f16, because
+ * We do not merge in flags from ah_fp_status or FPST_AH_F16, because
* they are used for insns that must not set the cumulative exception bits.
*/
@@ -160,7 +160,7 @@ static void vfp_clear_float_status_exc_flags(CPUARMState
*env)
set_float_exception_flags(0, &env->vfp.fp_status[FPST_STD]);
set_float_exception_flags(0, &env->vfp.fp_status[FPST_STD_F16]);
set_float_exception_flags(0, &env->vfp.ah_fp_status);
- set_float_exception_flags(0, &env->vfp.ah_fp_status_f16);
+ set_float_exception_flags(0, &env->vfp.fp_status[FPST_AH_F16]);
}
static void vfp_sync_and_clear_float_status_exc_flags(CPUARMState *env)
@@ -206,11 +206,11 @@ static void vfp_set_fpcr_to_host(CPUARMState *env,
uint32_t val, uint32_t mask)
set_flush_to_zero(ftz_enabled, &env->vfp.fp_status_f16_a32);
set_flush_to_zero(ftz_enabled, &env->vfp.fp_status_f16_a64);
set_flush_to_zero(ftz_enabled, &env->vfp.fp_status[FPST_STD_F16]);
- set_flush_to_zero(ftz_enabled, &env->vfp.ah_fp_status_f16);
+ set_flush_to_zero(ftz_enabled, &env->vfp.fp_status[FPST_AH_F16]);
set_flush_inputs_to_zero(ftz_enabled, &env->vfp.fp_status_f16_a32);
set_flush_inputs_to_zero(ftz_enabled, &env->vfp.fp_status_f16_a64);
set_flush_inputs_to_zero(ftz_enabled,
&env->vfp.fp_status[FPST_STD_F16]);
- set_flush_inputs_to_zero(ftz_enabled, &env->vfp.ah_fp_status_f16);
+ set_flush_inputs_to_zero(ftz_enabled,
&env->vfp.fp_status[FPST_AH_F16]);
}
if (changed & FPCR_FZ) {
bool ftz_enabled = val & FPCR_FZ;
@@ -235,7 +235,7 @@ static void vfp_set_fpcr_to_host(CPUARMState *env, uint32_t
val, uint32_t mask)
set_default_nan_mode(dnan_enabled, &env->vfp.fp_status_f16_a32);
set_default_nan_mode(dnan_enabled, &env->vfp.fp_status_f16_a64);
set_default_nan_mode(dnan_enabled, &env->vfp.ah_fp_status);
- set_default_nan_mode(dnan_enabled, &env->vfp.ah_fp_status_f16);
+ set_default_nan_mode(dnan_enabled, &env->vfp.fp_status[FPST_AH_F16]);
}
if (changed & FPCR_AH) {
bool ah_enabled = val & FPCR_AH;
--
2.43.0
- [PATCH 01/22] target/arm: Rename FPST_FPCR_A32 to FPST_A32, (continued)
- [PATCH 01/22] target/arm: Rename FPST_FPCR_A32 to FPST_A32, Richard Henderson, 2025/01/27
- [PATCH 03/22] target/arm: Rename FPST_FPCR_F16_A32 to FPST_A32_F16, Richard Henderson, 2025/01/27
- [PATCH 05/22] target/arm: Rename FPST_FPCR_AH* to FPST_AH*, Richard Henderson, 2025/01/27
- [PATCH 02/22] target/arm: Rename FPST_FPCR_A64 to FPST_A64, Richard Henderson, 2025/01/27
- [PATCH 07/22] target/arm: Remove standard_fp_status_f16, Richard Henderson, 2025/01/27
- [PATCH 16/22] target/arm: Simplify DO_VFP_cmp in vfp_helper.c, Richard Henderson, 2025/01/27
- [PATCH 18/22] target/arm: Introduce float*_maybe_ah_chs, Richard Henderson, 2025/01/27
- [PATCH 06/22] target/arm: Introduce CPUARMState.vfp.fp_status[], Richard Henderson, 2025/01/27
- [PATCH 04/22] target/arm: Rename FPST_FPCR_F16_A64 to FPST_A64_F16, Richard Henderson, 2025/01/27
- [PATCH 08/22] target/arm: Remove standard_fp_status, Richard Henderson, 2025/01/27
- [PATCH 09/22] target/arm: Remove ah_fp_status_f16,
Richard Henderson <=
- [PATCH 13/22] target/arm: Remove fp_status_a64, Richard Henderson, 2025/01/27
- [PATCH 15/22] target/arm: Simplify fp_status indexing in mve_helper.c, Richard Henderson, 2025/01/27
- [PATCH 12/22] target/arm: Remove fp_status_f16_a32, Richard Henderson, 2025/01/27
- [PATCH 14/22] target/arm: Remove fp_status_a32, Richard Henderson, 2025/01/27
- [PATCH 10/22] target/arm: Remove ah_fp_status, Richard Henderson, 2025/01/27
- [PATCH 11/22] target/arm: Remove fp_status_f16_a64, Richard Henderson, 2025/01/27
- [PATCH 19/22] target/arm: Use float*_maybe_ah_chs in sve_ftssel_*, Richard Henderson, 2025/01/27
- [PATCH 22/22] target/arm: Use flags for AH negation in do_fmla_zpzzz_*, Richard Henderson, 2025/01/27
- [PATCH 17/22] target/arm: Move float*_ah_chs to vec_internal.h, Richard Henderson, 2025/01/27
- [PATCH 21/22] target/arm: Use float*_maybe_ah_chs in sve_ftmad_*, Richard Henderson, 2025/01/27