[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 10/19] target/arm: Use float_status in helper_fcvtx_f64_to_f32
From: |
Peter Maydell |
Subject: |
[PULL 10/19] target/arm: Use float_status in helper_fcvtx_f64_to_f32 |
Date: |
Tue, 17 Dec 2024 17:19:28 +0000 |
From: Richard Henderson <richard.henderson@linaro.org>
Pass float_status not env to match other functions.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20241206031952.78776-2-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
target/arm/tcg/helper-a64.h | 2 +-
target/arm/tcg/helper-a64.c | 3 +--
target/arm/tcg/translate-a64.c | 2 +-
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/target/arm/tcg/helper-a64.h b/target/arm/tcg/helper-a64.h
index 26e327af3a2..0c120bf3883 100644
--- a/target/arm/tcg/helper-a64.h
+++ b/target/arm/tcg/helper-a64.h
@@ -44,7 +44,7 @@ DEF_HELPER_FLAGS_3(rsqrtsf_f64, TCG_CALL_NO_RWG, f64, f64,
f64, fpst)
DEF_HELPER_FLAGS_2(frecpx_f64, TCG_CALL_NO_RWG, f64, f64, fpst)
DEF_HELPER_FLAGS_2(frecpx_f32, TCG_CALL_NO_RWG, f32, f32, fpst)
DEF_HELPER_FLAGS_2(frecpx_f16, TCG_CALL_NO_RWG, f16, f16, fpst)
-DEF_HELPER_FLAGS_2(fcvtx_f64_to_f32, TCG_CALL_NO_RWG, f32, f64, env)
+DEF_HELPER_FLAGS_2(fcvtx_f64_to_f32, TCG_CALL_NO_RWG, f32, f64, fpst)
DEF_HELPER_FLAGS_3(crc32_64, TCG_CALL_NO_RWG_SE, i64, i64, i64, i32)
DEF_HELPER_FLAGS_3(crc32c_64, TCG_CALL_NO_RWG_SE, i64, i64, i64, i32)
DEF_HELPER_FLAGS_3(advsimd_maxh, TCG_CALL_NO_RWG, f16, f16, f16, fpst)
diff --git a/target/arm/tcg/helper-a64.c b/target/arm/tcg/helper-a64.c
index ff48bac1a8e..35dce4bef3c 100644
--- a/target/arm/tcg/helper-a64.c
+++ b/target/arm/tcg/helper-a64.c
@@ -384,10 +384,9 @@ float64 HELPER(frecpx_f64)(float64 a, float_status *fpst)
}
}
-float32 HELPER(fcvtx_f64_to_f32)(float64 a, CPUARMState *env)
+float32 HELPER(fcvtx_f64_to_f32)(float64 a, float_status *fpst)
{
float32 r;
- float_status *fpst = &env->vfp.fp_status;
int old = get_float_rounding_mode(fpst);
set_float_rounding_mode(float_round_to_odd, fpst);
diff --git a/target/arm/tcg/translate-a64.c b/target/arm/tcg/translate-a64.c
index 3e57b98c27f..fda1176b3f4 100644
--- a/target/arm/tcg/translate-a64.c
+++ b/target/arm/tcg/translate-a64.c
@@ -9102,7 +9102,7 @@ static void gen_fcvtxn_sd(TCGv_i64 d, TCGv_i64 n)
* with von Neumann rounding (round to odd)
*/
TCGv_i32 tmp = tcg_temp_new_i32();
- gen_helper_fcvtx_f64_to_f32(tmp, n, tcg_env);
+ gen_helper_fcvtx_f64_to_f32(tmp, n, fpstatus_ptr(FPST_FPCR));
tcg_gen_extu_i32_i64(d, tmp);
}
--
2.34.1
- [PULL 00/19] target-arm queue, Peter Maydell, 2024/12/17
- [PULL 03/19] target/arm: Convert helper-a64.c to fpst alias, Peter Maydell, 2024/12/17
- [PULL 02/19] target/arm: Convert vfp_helper.c to fpst alias, Peter Maydell, 2024/12/17
- [PULL 01/19] target/arm: remove redundant code, Peter Maydell, 2024/12/17
- [PULL 07/19] target/arm: Convert sme_helper.c to fpst alias, Peter Maydell, 2024/12/17
- [PULL 05/19] target/arm: Convert neon_helper.c to fpst alias, Peter Maydell, 2024/12/17
- [PULL 04/19] target/arm: Convert vec_helper.c to fpst alias, Peter Maydell, 2024/12/17
- [PULL 06/19] target/arm: Convert sve_helper.c to fpst alias, Peter Maydell, 2024/12/17
- [PULL 09/19] target/arm: Convert neon_helper.c to use env alias, Peter Maydell, 2024/12/17
- [PULL 10/19] target/arm: Use float_status in helper_fcvtx_f64_to_f32,
Peter Maydell <=
- [PULL 08/19] target/arm: Convert vec_helper.c to use env alias, Peter Maydell, 2024/12/17
- [PULL 11/19] target/arm: Use float_status in helper_vfp_fcvt{ds,sd}, Peter Maydell, 2024/12/17
- [PULL 15/19] target/arm: Add decodetree entry for DSB nXS variant, Peter Maydell, 2024/12/17
- [PULL 18/19] hw/intc/arm_gicv3_its: Zero initialize local DTEntry etc structs, Peter Maydell, 2024/12/17
- [PULL 13/19] target/arm: Add ARM_CP_ADD_TLBI_NXS type flag for NXS insns, Peter Maydell, 2024/12/17
- [PULL 19/19] tests/functional: update sbsa-ref firmware used in test, Peter Maydell, 2024/12/17
- [PULL 14/19] target/arm: Add ARM_CP_ADD_TLBI_NXS type flag to TLBI insns, Peter Maydell, 2024/12/17
- [PULL 16/19] target/arm: Enable FEAT_XS for the max cpu, Peter Maydell, 2024/12/17
- [PULL 12/19] target/arm: Implement fine-grained-trap handling for FEAT_XS, Peter Maydell, 2024/12/17
- [PULL 17/19] tests/tcg/aarch64: add system test for FEAT_XS, Peter Maydell, 2024/12/17