[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 68/69] target/arm: Read fz16 from env->vfp.fpcr
From: |
Peter Maydell |
Subject: |
[PATCH v2 68/69] target/arm: Read fz16 from env->vfp.fpcr |
Date: |
Sat, 1 Feb 2025 16:40:11 +0000 |
From: Richard Henderson <richard.henderson@linaro.org>
Read the bit from the source, rather than from the proxy via
get_flush_inputs_to_zero. This makes it clear that it does
not matter which of the float_status structures is used.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250129013857.135256-34-richard.henderson@linaro.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
target/arm/tcg/vec_helper.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/target/arm/tcg/vec_helper.c b/target/arm/tcg/vec_helper.c
index 2da44ae7102..cc3586f44ac 100644
--- a/target/arm/tcg/vec_helper.c
+++ b/target/arm/tcg/vec_helper.c
@@ -2155,7 +2155,7 @@ void HELPER(gvec_fmlal_a32)(void *vd, void *vn, void *vm,
uint64_t negx = is_s ? 0x8000800080008000ull : 0;
do_fmlal(vd, vn, vm, &env->vfp.fp_status[FPST_STD], negx, 0, desc,
- get_flush_inputs_to_zero(&env->vfp.fp_status[FPST_A32_F16]));
+ env->vfp.fpcr & FPCR_FZ16);
}
void HELPER(gvec_fmlal_a64)(void *vd, void *vn, void *vm,
@@ -2173,7 +2173,7 @@ void HELPER(gvec_fmlal_a64)(void *vd, void *vn, void *vm,
}
}
do_fmlal(vd, vn, vm, &env->vfp.fp_status[FPST_A64], negx, negf, desc,
- get_flush_inputs_to_zero(&env->vfp.fp_status[FPST_A64_F16]));
+ env->vfp.fpcr & FPCR_FZ16);
}
void HELPER(sve2_fmlal_zzzw_s)(void *vd, void *vn, void *vm, void *va,
@@ -2183,7 +2183,7 @@ void HELPER(sve2_fmlal_zzzw_s)(void *vd, void *vn, void
*vm, void *va,
bool is_s = extract32(desc, SIMD_DATA_SHIFT, 1);
intptr_t sel = extract32(desc, SIMD_DATA_SHIFT + 1, 1) * sizeof(float16);
float_status *status = &env->vfp.fp_status[FPST_A64];
- bool fz16 = get_flush_inputs_to_zero(&env->vfp.fp_status[FPST_A64_F16]);
+ bool fz16 = env->vfp.fpcr & FPCR_FZ16;
int negx = 0, negf = 0;
if (is_s) {
@@ -2236,7 +2236,7 @@ void HELPER(gvec_fmlal_idx_a32)(void *vd, void *vn, void
*vm,
uint64_t negx = is_s ? 0x8000800080008000ull : 0;
do_fmlal_idx(vd, vn, vm, &env->vfp.fp_status[FPST_STD], negx, 0, desc,
- get_flush_inputs_to_zero(&env->vfp.fp_status[FPST_A32_F16]));
+ env->vfp.fpcr & FPCR_FZ16);
}
void HELPER(gvec_fmlal_idx_a64)(void *vd, void *vn, void *vm,
@@ -2254,7 +2254,7 @@ void HELPER(gvec_fmlal_idx_a64)(void *vd, void *vn, void
*vm,
}
}
do_fmlal_idx(vd, vn, vm, &env->vfp.fp_status[FPST_A64], negx, negf, desc,
- get_flush_inputs_to_zero(&env->vfp.fp_status[FPST_A64_F16]));
+ env->vfp.fpcr & FPCR_FZ16);
}
void HELPER(sve2_fmlal_zzxw_s)(void *vd, void *vn, void *vm, void *va,
@@ -2265,7 +2265,7 @@ void HELPER(sve2_fmlal_zzxw_s)(void *vd, void *vn, void
*vm, void *va,
intptr_t sel = extract32(desc, SIMD_DATA_SHIFT + 1, 1) * sizeof(float16);
intptr_t idx = extract32(desc, SIMD_DATA_SHIFT + 2, 3) * sizeof(float16);
float_status *status = &env->vfp.fp_status[FPST_A64];
- bool fz16 = get_flush_inputs_to_zero(&env->vfp.fp_status[FPST_A64_F16]);
+ bool fz16 = env->vfp.fpcr & FPCR_FZ16;
int negx = 0, negf = 0;
if (is_s) {
--
2.34.1
- [PATCH v2 56/69] target/arm: Enable FEAT_RPRES for -cpu max, (continued)
- [PATCH v2 56/69] target/arm: Enable FEAT_RPRES for -cpu max, Peter Maydell, 2025/02/01
- [PATCH v2 58/69] target/arm: Remove standard_fp_status_f16, Peter Maydell, 2025/02/01
- [PATCH v2 60/69] target/arm: Remove ah_fp_status_f16, Peter Maydell, 2025/02/01
- [PATCH v2 59/69] target/arm: Remove standard_fp_status, Peter Maydell, 2025/02/01
- [PATCH v2 62/69] target/arm: Remove fp_status_f16_a64, Peter Maydell, 2025/02/01
- [PATCH v2 66/69] target/arm: Simplify fp_status indexing in mve_helper.c, Peter Maydell, 2025/02/01
- [PATCH v2 52/69] target/arm: Enable FEAT_AFP for '-cpu max', Peter Maydell, 2025/02/01
- [PATCH v2 55/69] target/arm: Implement increased precision FRSQRTE, Peter Maydell, 2025/02/01
- [PATCH v2 54/69] target/arm: Implement increased precision FRECPE, Peter Maydell, 2025/02/01
- [PATCH v2 57/69] target/arm: Introduce CPUARMState.vfp.fp_status[], Peter Maydell, 2025/02/01
- [PATCH v2 68/69] target/arm: Read fz16 from env->vfp.fpcr,
Peter Maydell <=
- [PATCH v2 61/69] target/arm: Remove ah_fp_status, Peter Maydell, 2025/02/01
- [PATCH v2 63/69] target/arm: Remove fp_status_f16_a32, Peter Maydell, 2025/02/01
- [PATCH v2 69/69] target/arm: Sink fp_status and fpcr access into do_fmlal*, Peter Maydell, 2025/02/01
- [PATCH v2 64/69] target/arm: Remove fp_status_a64, Peter Maydell, 2025/02/01
- [PATCH v2 67/69] target/arm: Simplify DO_VFP_cmp in vfp_helper.c, Peter Maydell, 2025/02/01
- [PATCH v2 65/69] target/arm: Remove fp_status_a32, Peter Maydell, 2025/02/01