[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-arm] [PATCH v3 14/27] target/arm/vfp_helper: Move code around
From: |
Philippe Mathieu-Daudé |
Subject: |
[Qemu-arm] [PATCH v3 14/27] target/arm/vfp_helper: Move code around |
Date: |
Mon, 1 Jul 2019 15:25:03 +0200 |
To ease the review of the next commit,
move the vfp_exceptbits_to_host() function directly after
vfp_exceptbits_from_host(). Amusingly the diff shows we
are moving vfp_get_fpscr().
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
target/arm/vfp_helper.c | 52 ++++++++++++++++++++---------------------
1 file changed, 26 insertions(+), 26 deletions(-)
diff --git a/target/arm/vfp_helper.c b/target/arm/vfp_helper.c
index 121bdbd3af..d54e325324 100644
--- a/target/arm/vfp_helper.c
+++ b/target/arm/vfp_helper.c
@@ -55,32 +55,6 @@ static inline int vfp_exceptbits_from_host(int host_bits)
return target_bits;
}
-uint32_t HELPER(vfp_get_fpscr)(CPUARMState *env)
-{
- uint32_t i, fpscr;
-
- fpscr = env->vfp.xregs[ARM_VFP_FPSCR]
- | (env->vfp.vec_len << 16)
- | (env->vfp.vec_stride << 20);
-
- i = get_float_exception_flags(&env->vfp.fp_status);
- i |= get_float_exception_flags(&env->vfp.standard_fp_status);
- /* FZ16 does not generate an input denormal exception. */
- i |= (get_float_exception_flags(&env->vfp.fp_status_f16)
- & ~float_flag_input_denormal);
- fpscr |= vfp_exceptbits_from_host(i);
-
- i = env->vfp.qc[0] | env->vfp.qc[1] | env->vfp.qc[2] | env->vfp.qc[3];
- fpscr |= i ? FPCR_QC : 0;
-
- return fpscr;
-}
-
-uint32_t vfp_get_fpscr(CPUARMState *env)
-{
- return HELPER(vfp_get_fpscr)(env);
-}
-
/* Convert vfp exception flags to target form. */
static inline int vfp_exceptbits_to_host(int target_bits)
{
@@ -107,6 +81,32 @@ static inline int vfp_exceptbits_to_host(int target_bits)
return host_bits;
}
+uint32_t HELPER(vfp_get_fpscr)(CPUARMState *env)
+{
+ uint32_t i, fpscr;
+
+ fpscr = env->vfp.xregs[ARM_VFP_FPSCR]
+ | (env->vfp.vec_len << 16)
+ | (env->vfp.vec_stride << 20);
+
+ i = get_float_exception_flags(&env->vfp.fp_status);
+ i |= get_float_exception_flags(&env->vfp.standard_fp_status);
+ /* FZ16 does not generate an input denormal exception. */
+ i |= (get_float_exception_flags(&env->vfp.fp_status_f16)
+ & ~float_flag_input_denormal);
+ fpscr |= vfp_exceptbits_from_host(i);
+
+ i = env->vfp.qc[0] | env->vfp.qc[1] | env->vfp.qc[2] | env->vfp.qc[3];
+ fpscr |= i ? FPCR_QC : 0;
+
+ return fpscr;
+}
+
+uint32_t vfp_get_fpscr(CPUARMState *env)
+{
+ return HELPER(vfp_get_fpscr)(env);
+}
+
void HELPER(vfp_set_fpscr)(CPUARMState *env, uint32_t val)
{
int i;
--
2.20.1
- [Qemu-arm] [PATCH v3 03/27] target/arm: Makefile cleanup (KVM), (continued)
- [Qemu-arm] [PATCH v3 03/27] target/arm: Makefile cleanup (KVM), Philippe Mathieu-Daudé, 2019/07/01
- [Qemu-arm] [PATCH v3 04/27] target/arm: Makefile cleanup (softmmu), Philippe Mathieu-Daudé, 2019/07/01
- [Qemu-arm] [PATCH v3 05/27] target/arm: Add copyright boilerplate, Philippe Mathieu-Daudé, 2019/07/01
- [Qemu-arm] [PATCH v3 06/27] target/arm/helper: Remove unused include, Philippe Mathieu-Daudé, 2019/07/01
- [Qemu-arm] [PATCH v3 07/27] target/arm: Fix multiline comment syntax, Philippe Mathieu-Daudé, 2019/07/01
- [Qemu-arm] [PATCH v3 08/27] target/arm: Fix coding style issues, Philippe Mathieu-Daudé, 2019/07/01
- [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é <=
- [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é, 2019/07/01
- [Qemu-arm] [PATCH v3 18/27] target/arm: Restrict semi-hosting to TCG, Philippe Mathieu-Daudé, 2019/07/01