target/arm: Remove standard_fp_status_f16

Replace with fp_status[FPST_STD_F16].

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20250129013857.135256-8-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Richard Henderson 2025-02-01 16:40:01 +00:00 committed by Peter Maydell
parent b902f5c62d
commit 7678859152
4 changed files with 18 additions and 19 deletions

View file

@ -549,13 +549,13 @@ static void arm_cpu_reset_hold(Object *obj, ResetType type)
set_flush_to_zero(1, &env->vfp.standard_fp_status); set_flush_to_zero(1, &env->vfp.standard_fp_status);
set_flush_inputs_to_zero(1, &env->vfp.standard_fp_status); set_flush_inputs_to_zero(1, &env->vfp.standard_fp_status);
set_default_nan_mode(1, &env->vfp.standard_fp_status); set_default_nan_mode(1, &env->vfp.standard_fp_status);
set_default_nan_mode(1, &env->vfp.standard_fp_status_f16); set_default_nan_mode(1, &env->vfp.fp_status[FPST_STD_F16]);
arm_set_default_fp_behaviours(&env->vfp.fp_status_a32); arm_set_default_fp_behaviours(&env->vfp.fp_status_a32);
arm_set_default_fp_behaviours(&env->vfp.fp_status_a64); arm_set_default_fp_behaviours(&env->vfp.fp_status_a64);
arm_set_default_fp_behaviours(&env->vfp.standard_fp_status); arm_set_default_fp_behaviours(&env->vfp.standard_fp_status);
arm_set_default_fp_behaviours(&env->vfp.fp_status_f16_a32); arm_set_default_fp_behaviours(&env->vfp.fp_status_f16_a32);
arm_set_default_fp_behaviours(&env->vfp.fp_status_f16_a64); arm_set_default_fp_behaviours(&env->vfp.fp_status_f16_a64);
arm_set_default_fp_behaviours(&env->vfp.standard_fp_status_f16); arm_set_default_fp_behaviours(&env->vfp.fp_status[FPST_STD_F16]);
arm_set_ah_fp_behaviours(&env->vfp.ah_fp_status); arm_set_ah_fp_behaviours(&env->vfp.ah_fp_status);
set_flush_to_zero(1, &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); set_flush_inputs_to_zero(1, &env->vfp.ah_fp_status);

View file

@ -697,7 +697,6 @@ typedef struct CPUArchState {
float_status ah_fp_status; float_status ah_fp_status;
float_status ah_fp_status_f16; float_status ah_fp_status_f16;
float_status standard_fp_status; float_status standard_fp_status;
float_status standard_fp_status_f16;
}; };
}; };

View file

@ -2814,7 +2814,7 @@ DO_VMAXMINA(vminaw, 4, int32_t, uint32_t, DO_MIN)
if ((mask & MAKE_64BIT_MASK(0, ESIZE)) == 0) { \ if ((mask & MAKE_64BIT_MASK(0, ESIZE)) == 0) { \
continue; \ continue; \
} \ } \
fpst = (ESIZE == 2) ? &env->vfp.standard_fp_status_f16 : \ fpst = (ESIZE == 2) ? &env->vfp.fp_status[FPST_STD_F16] : \
&env->vfp.standard_fp_status; \ &env->vfp.standard_fp_status; \
if (!(mask & 1)) { \ if (!(mask & 1)) { \
/* We need the result but without updating flags */ \ /* We need the result but without updating flags */ \
@ -2888,7 +2888,7 @@ DO_2OP_FP_ALL(vminnma, minnuma)
r[e] = 0; \ r[e] = 0; \
continue; \ continue; \
} \ } \
fpst = (ESIZE == 2) ? &env->vfp.standard_fp_status_f16 : \ fpst = (ESIZE == 2) ? &env->vfp.fp_status[FPST_STD_F16] : \
&env->vfp.standard_fp_status; \ &env->vfp.standard_fp_status; \
if (!(tm & 1)) { \ if (!(tm & 1)) { \
/* We need the result but without updating flags */ \ /* We need the result but without updating flags */ \
@ -2926,7 +2926,7 @@ DO_VCADD_FP(vfcadd270s, 4, float32, float32_add, float32_sub)
if ((mask & MAKE_64BIT_MASK(0, ESIZE)) == 0) { \ if ((mask & MAKE_64BIT_MASK(0, ESIZE)) == 0) { \
continue; \ continue; \
} \ } \
fpst = (ESIZE == 2) ? &env->vfp.standard_fp_status_f16 : \ fpst = (ESIZE == 2) ? &env->vfp.fp_status[FPST_STD_F16] : \
&env->vfp.standard_fp_status; \ &env->vfp.standard_fp_status; \
if (!(mask & 1)) { \ if (!(mask & 1)) { \
/* We need the result but without updating flags */ \ /* We need the result but without updating flags */ \
@ -2964,7 +2964,7 @@ DO_VFMA(vfmss, 4, float32, true)
if ((mask & MAKE_64BIT_MASK(0, ESIZE * 2)) == 0) { \ if ((mask & MAKE_64BIT_MASK(0, ESIZE * 2)) == 0) { \
continue; \ continue; \
} \ } \
fpst0 = (ESIZE == 2) ? &env->vfp.standard_fp_status_f16 : \ fpst0 = (ESIZE == 2) ? &env->vfp.fp_status[FPST_STD_F16] : \
&env->vfp.standard_fp_status; \ &env->vfp.standard_fp_status; \
fpst1 = fpst0; \ fpst1 = fpst0; \
if (!(mask & 1)) { \ if (!(mask & 1)) { \
@ -3049,7 +3049,7 @@ DO_VCMLA(vcmla270s, 4, float32, 3, DO_VCMLAS)
if ((mask & MAKE_64BIT_MASK(0, ESIZE)) == 0) { \ if ((mask & MAKE_64BIT_MASK(0, ESIZE)) == 0) { \
continue; \ continue; \
} \ } \
fpst = (ESIZE == 2) ? &env->vfp.standard_fp_status_f16 : \ fpst = (ESIZE == 2) ? &env->vfp.fp_status[FPST_STD_F16] : \
&env->vfp.standard_fp_status; \ &env->vfp.standard_fp_status; \
if (!(mask & 1)) { \ if (!(mask & 1)) { \
/* We need the result but without updating flags */ \ /* We need the result but without updating flags */ \
@ -3084,7 +3084,7 @@ DO_2OP_FP_SCALAR_ALL(vfmul_scalar, mul)
if ((mask & MAKE_64BIT_MASK(0, ESIZE)) == 0) { \ if ((mask & MAKE_64BIT_MASK(0, ESIZE)) == 0) { \
continue; \ continue; \
} \ } \
fpst = (ESIZE == 2) ? &env->vfp.standard_fp_status_f16 : \ fpst = (ESIZE == 2) ? &env->vfp.fp_status[FPST_STD_F16] : \
&env->vfp.standard_fp_status; \ &env->vfp.standard_fp_status; \
if (!(mask & 1)) { \ if (!(mask & 1)) { \
/* We need the result but without updating flags */ \ /* We need the result but without updating flags */ \
@ -3117,7 +3117,7 @@ DO_2OP_FP_ACC_SCALAR(vfmas_scalars, 4, float32, DO_VFMAS_SCALARS)
TYPE *m = vm; \ TYPE *m = vm; \
TYPE ra = (TYPE)ra_in; \ TYPE ra = (TYPE)ra_in; \
float_status *fpst = (ESIZE == 2) ? \ float_status *fpst = (ESIZE == 2) ? \
&env->vfp.standard_fp_status_f16 : \ &env->vfp.fp_status[FPST_STD_F16] : \
&env->vfp.standard_fp_status; \ &env->vfp.standard_fp_status; \
for (e = 0; e < 16 / ESIZE; e++, mask >>= ESIZE) { \ for (e = 0; e < 16 / ESIZE; e++, mask >>= ESIZE) { \
if (mask & 1) { \ if (mask & 1) { \
@ -3168,7 +3168,7 @@ DO_FP_VMAXMINV(vminnmavs, 4, float32, true, float32_minnum)
if ((mask & emask) == 0) { \ if ((mask & emask) == 0) { \
continue; \ continue; \
} \ } \
fpst = (ESIZE == 2) ? &env->vfp.standard_fp_status_f16 : \ fpst = (ESIZE == 2) ? &env->vfp.fp_status[FPST_STD_F16] : \
&env->vfp.standard_fp_status; \ &env->vfp.standard_fp_status; \
if (!(mask & (1 << (e * ESIZE)))) { \ if (!(mask & (1 << (e * ESIZE)))) { \
/* We need the result but without updating flags */ \ /* We need the result but without updating flags */ \
@ -3202,7 +3202,7 @@ DO_FP_VMAXMINV(vminnmavs, 4, float32, true, float32_minnum)
if ((mask & emask) == 0) { \ if ((mask & emask) == 0) { \
continue; \ continue; \
} \ } \
fpst = (ESIZE == 2) ? &env->vfp.standard_fp_status_f16 : \ fpst = (ESIZE == 2) ? &env->vfp.fp_status[FPST_STD_F16] : \
&env->vfp.standard_fp_status; \ &env->vfp.standard_fp_status; \
if (!(mask & (1 << (e * ESIZE)))) { \ if (!(mask & (1 << (e * ESIZE)))) { \
/* We need the result but without updating flags */ \ /* We need the result but without updating flags */ \
@ -3267,7 +3267,7 @@ DO_VCMP_FP_BOTH(vfcmples, vfcmple_scalars, 4, float32, !DO_GT32)
if ((mask & MAKE_64BIT_MASK(0, ESIZE)) == 0) { \ if ((mask & MAKE_64BIT_MASK(0, ESIZE)) == 0) { \
continue; \ continue; \
} \ } \
fpst = (ESIZE == 2) ? &env->vfp.standard_fp_status_f16 : \ fpst = (ESIZE == 2) ? &env->vfp.fp_status[FPST_STD_F16] : \
&env->vfp.standard_fp_status; \ &env->vfp.standard_fp_status; \
if (!(mask & 1)) { \ if (!(mask & 1)) { \
/* We need the result but without updating flags */ \ /* We need the result but without updating flags */ \
@ -3301,7 +3301,7 @@ DO_VCVT_FIXED(vcvt_fu, 4, uint32_t, helper_vfp_touls_round_to_zero)
float_status *fpst; \ float_status *fpst; \
float_status scratch_fpst; \ float_status scratch_fpst; \
float_status *base_fpst = (ESIZE == 2) ? \ float_status *base_fpst = (ESIZE == 2) ? \
&env->vfp.standard_fp_status_f16 : \ &env->vfp.fp_status[FPST_STD_F16] : \
&env->vfp.standard_fp_status; \ &env->vfp.standard_fp_status; \
uint32_t prev_rmode = get_float_rounding_mode(base_fpst); \ uint32_t prev_rmode = get_float_rounding_mode(base_fpst); \
set_float_rounding_mode(rmode, base_fpst); \ set_float_rounding_mode(rmode, base_fpst); \
@ -3427,7 +3427,7 @@ void HELPER(mve_vcvtt_hs)(CPUARMState *env, void *vd, void *vm)
if ((mask & MAKE_64BIT_MASK(0, ESIZE)) == 0) { \ if ((mask & MAKE_64BIT_MASK(0, ESIZE)) == 0) { \
continue; \ continue; \
} \ } \
fpst = (ESIZE == 2) ? &env->vfp.standard_fp_status_f16 : \ fpst = (ESIZE == 2) ? &env->vfp.fp_status[FPST_STD_F16] : \
&env->vfp.standard_fp_status; \ &env->vfp.standard_fp_status; \
if (!(mask & 1)) { \ if (!(mask & 1)) { \
/* We need the result but without updating flags */ \ /* We need the result but without updating flags */ \

View file

@ -122,7 +122,7 @@ static uint32_t vfp_get_fpsr_from_host(CPUARMState *env)
/* FZ16 does not generate an input denormal exception. */ /* FZ16 does not generate an input denormal exception. */
a32_flags |= (get_float_exception_flags(&env->vfp.fp_status_f16_a32) a32_flags |= (get_float_exception_flags(&env->vfp.fp_status_f16_a32)
& ~float_flag_input_denormal_flushed); & ~float_flag_input_denormal_flushed);
a32_flags |= (get_float_exception_flags(&env->vfp.standard_fp_status_f16) a32_flags |= (get_float_exception_flags(&env->vfp.fp_status[FPST_STD_F16])
& ~float_flag_input_denormal_flushed); & ~float_flag_input_denormal_flushed);
a64_flags |= get_float_exception_flags(&env->vfp.fp_status_a64); a64_flags |= get_float_exception_flags(&env->vfp.fp_status_a64);
@ -160,7 +160,7 @@ static void vfp_clear_float_status_exc_flags(CPUARMState *env)
set_float_exception_flags(0, &env->vfp.fp_status_f16_a32); set_float_exception_flags(0, &env->vfp.fp_status_f16_a32);
set_float_exception_flags(0, &env->vfp.fp_status_f16_a64); set_float_exception_flags(0, &env->vfp.fp_status_f16_a64);
set_float_exception_flags(0, &env->vfp.standard_fp_status); set_float_exception_flags(0, &env->vfp.standard_fp_status);
set_float_exception_flags(0, &env->vfp.standard_fp_status_f16); 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);
set_float_exception_flags(0, &env->vfp.ah_fp_status_f16); set_float_exception_flags(0, &env->vfp.ah_fp_status_f16);
} }
@ -207,11 +207,11 @@ static void vfp_set_fpcr_to_host(CPUARMState *env, uint32_t val, uint32_t mask)
bool ftz_enabled = val & FPCR_FZ16; bool ftz_enabled = val & FPCR_FZ16;
set_flush_to_zero(ftz_enabled, &env->vfp.fp_status_f16_a32); 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_f16_a64);
set_flush_to_zero(ftz_enabled, &env->vfp.standard_fp_status_f16); 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.ah_fp_status_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_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_f16_a64);
set_flush_inputs_to_zero(ftz_enabled, &env->vfp.standard_fp_status_f16); 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.ah_fp_status_f16);
} }
if (changed & FPCR_FZ) { if (changed & FPCR_FZ) {