From 5aaf004bb2854471b05b3bfa5445d82d3c7ddccd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Thu, 8 Aug 2019 15:30:44 -0400 Subject: [PATCH] target/arm/vfp_helper: Restrict the SoftFloat use to TCG This code is specific to the SoftFloat floating-point implementation, which is only used by TCG. Backports commit 4a15527c9feecfd2fa2807d5e698abbc19feb35f from qemu --- qemu/target/arm/vfp_helper.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/qemu/target/arm/vfp_helper.c b/qemu/target/arm/vfp_helper.c index 042dc77e..2ae242b0 100644 --- a/qemu/target/arm/vfp_helper.c +++ b/qemu/target/arm/vfp_helper.c @@ -21,9 +21,11 @@ #include "qemu/log.h" #include "cpu.h" #include "exec/helper-proto.h" -#include "fpu/softfloat.h" #include "internals.h" +#ifdef CONFIG_TCG +#include "fpu/softfloat.h" +#endif /* * VFP support. We follow the convention used for VFP instructions: @@ -31,6 +33,8 @@ * "d" suffix. */ +#ifdef CONFIG_TCG + /* Convert host exception flags to vfp form. */ static inline int vfp_exceptbits_from_host(int host_bits) { @@ -147,6 +151,19 @@ static void vfp_set_fpscr_to_host(CPUARMState *env, uint32_t val) set_float_exception_flags(0, &env->vfp.standard_fp_status); } +#else + +static uint32_t vfp_get_fpscr_from_host(CPUARMState *env) +{ + return 0; +} + +static void vfp_set_fpscr_to_host(CPUARMState *env, uint32_t val) +{ +} + +#endif + uint32_t HELPER(vfp_get_fpscr)(CPUARMState *env) { uint32_t i, fpscr; @@ -212,6 +229,8 @@ void vfp_set_fpscr(CPUARMState *env, uint32_t val) HELPER(vfp_set_fpscr)(env, val); } +#ifdef CONFIG_TCG + #define VFP_HELPER(name, p) HELPER(glue(glue(vfp_,name),p)) #define VFP_BINOP(name) \ @@ -1323,3 +1342,6 @@ float64 HELPER(frint64_d)(float64 f, void *fpst) { return frint_d(f, fpst, 64); } + +#endif +