[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-arm] [PATCH v3 17/27] target/arm/vfp_helper: Restrict the SoftFloa
From: |
Philippe Mathieu-Daudé |
Subject: |
[Qemu-arm] [PATCH v3 17/27] target/arm/vfp_helper: Restrict the SoftFloat use to TCG |
Date: |
Mon, 1 Jul 2019 15:25:06 +0200 |
This code is specific to the SoftFloat floating-point
implementation, which is only used by TCG.
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
target/arm/vfp_helper.c | 26 +++++++++++++++++++++++---
1 file changed, 23 insertions(+), 3 deletions(-)
diff --git a/target/arm/vfp_helper.c b/target/arm/vfp_helper.c
index 838f7d25fd..46041e3294 100644
--- a/target/arm/vfp_helper.c
+++ b/target/arm/vfp_helper.c
@@ -18,17 +18,20 @@
*/
#include "qemu/osdep.h"
-#include "qemu/log.h"
#include "cpu.h"
#include "exec/helper-proto.h"
-#include "fpu/softfloat.h"
#include "internals.h"
-
+#ifdef CONFIG_TCG
+#include "qemu/log.h"
+#include "fpu/softfloat.h"
+#endif
/* VFP support. We follow the convention used for VFP instructions:
Single precision routines have a "s" suffix, double precision a
"d" suffix. */
+#ifdef CONFIG_TCG
+
/* Convert host exception flags to vfp form. */
static inline int vfp_exceptbits_from_host(int host_bits)
{
@@ -145,6 +148,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;
@@ -210,6 +226,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) \
@@ -1303,3 +1321,5 @@ float64 HELPER(frint64_d)(float64 f, void *fpst)
{
return frint_d(f, fpst, 64);
}
+
+#endif
--
2.20.1
- [Qemu-arm] [PATCH v3 11/27] target/arm: Declare get_phys_addr() function publicly, (continued)
- [Qemu-arm] [PATCH v3 11/27] target/arm: Declare get_phys_addr() function publicly, Philippe Mathieu-Daudé, 2019/07/01
- [Qemu-arm] [PATCH v3 09/27] target/arm: Move the DC ZVA helper into op_helper, Philippe Mathieu-Daudé, 2019/07/01
- [Qemu-arm] [PATCH v3 10/27] target/arm: Move CPU state dumping routines to cpu.c, Philippe Mathieu-Daudé, 2019/07/01
- [Qemu-arm] [PATCH v3 12/27] target/arm: Move TLB related routines to tlb_helper.c, Philippe Mathieu-Daudé, 2019/07/01
- [Qemu-arm] [PATCH v3 14/27] target/arm/vfp_helper: Move code around, Philippe Mathieu-Daudé, 2019/07/01
- [Qemu-arm] [PATCH v3 13/27] target/arm: Move debug routines to debug_helper.c, Philippe Mathieu-Daudé, 2019/07/01
- [Qemu-arm] [PATCH v3 15/27] target/arm/vfp_helper: Extract vfp_set_fpscr_to_host(), Philippe Mathieu-Daudé, 2019/07/01
- [Qemu-arm] [PATCH v3 19/27] target/arm: Restrict PSCI to TCG, Philippe Mathieu-Daudé, 2019/07/01
- [Qemu-arm] [PATCH v3 20/27] target/arm: Declare arm_log_exception() function publicly, Philippe Mathieu-Daudé, 2019/07/01
- [Qemu-arm] [PATCH v3 17/27] target/arm/vfp_helper: Restrict the SoftFloat use to TCG,
Philippe Mathieu-Daudé <=
- [Qemu-arm] [PATCH v3 18/27] target/arm: Restrict semi-hosting to TCG, Philippe Mathieu-Daudé, 2019/07/01
- [Qemu-arm] [PATCH v3 16/27] target/arm/vfp_helper: Extract vfp_set_fpscr_from_host(), Philippe Mathieu-Daudé, 2019/07/01
- [Qemu-arm] [PATCH v3 21/27] target/arm: Declare some M-profile functions publicly, Philippe Mathieu-Daudé, 2019/07/01
- [Qemu-arm] [RFC PATCH v3 23/27] target/arm: Restrict pre-ARMv7 cpus to TCG, Philippe Mathieu-Daudé, 2019/07/01
- [Qemu-arm] [RFC PATCH v3 24/27] target/arm: Do not build pre-ARMv7 cpus when using KVM, Philippe Mathieu-Daudé, 2019/07/01
- [Qemu-arm] [RFC PATCH v3 25/27] target/arm: Restrict R and M profiles to TCG, Philippe Mathieu-Daudé, 2019/07/01
- [Qemu-arm] [RFC PATCH v3 26/27] target/arm: Do not build A/M-profile cpus when using KVM, Philippe Mathieu-Daudé, 2019/07/01