[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 40/46] target/arm/vfp_helper: Move code around
From: |
Peter Maydell |
Subject: |
[Qemu-devel] [PULL 40/46] target/arm/vfp_helper: Move code around |
Date: |
Mon, 1 Jul 2019 17:39:37 +0100 |
From: Philippe Mathieu-Daudé <address@hidden>
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>
Message-id: address@hidden
Reviewed-by: Peter Maydell <address@hidden>
Signed-off-by: Peter Maydell <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 121bdbd3aff..d54e3253240 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-devel] [PULL 11/46] hw: timer: Add ASPEED RTC device, (continued)
- [Qemu-devel] [PULL 11/46] hw: timer: Add ASPEED RTC device, Peter Maydell, 2019/07/01
- [Qemu-devel] [PULL 15/46] aspeed/timer: Fix behaviour running Linux, Peter Maydell, 2019/07/01
- [Qemu-devel] [PULL 03/46] hw/arm/virt: Add support for Cortex-A7, Peter Maydell, 2019/07/01
- [Qemu-devel] [PULL 04/46] i.mx7d: Add no-op/unimplemented APBH DMA module, Peter Maydell, 2019/07/01
- [Qemu-devel] [PULL 36/46] target/arm: Move the DC ZVA helper into op_helper, Peter Maydell, 2019/07/01
- [Qemu-devel] [PULL 29/46] target/arm: Makefile cleanup (ARM), Peter Maydell, 2019/07/01
- [Qemu-devel] [PULL 05/46] i.mx7d: Add no-op/unimplemented PCIE PHY IP block, Peter Maydell, 2019/07/01
- [Qemu-devel] [PULL 13/46] aspeed: introduce a configurable number of CPU per machine, Peter Maydell, 2019/07/01
- [Qemu-devel] [PULL 07/46] pci: designware: Update MSI mapping when MSI address changes, Peter Maydell, 2019/07/01
- [Qemu-devel] [PULL 42/46] target/arm/vfp_helper: Extract vfp_set_fpscr_from_host(), Peter Maydell, 2019/07/01
- [Qemu-devel] [PULL 40/46] target/arm/vfp_helper: Move code around,
Peter Maydell <=
- [Qemu-devel] [PULL 35/46] target/arm: Fix coding style issues, Peter Maydell, 2019/07/01
- [Qemu-devel] [PULL 23/46] hw/misc/aspeed_xdma: New device, Peter Maydell, 2019/07/01
- [Qemu-devel] [PULL 10/46] aspeed: add a per SoC mapping for the memory space, Peter Maydell, 2019/07/01
- [Qemu-devel] [PULL 25/46] aspeed: Link SCU to the watchdog, Peter Maydell, 2019/07/01
- [Qemu-devel] [PULL 18/46] aspeed/timer: Ensure positive muldiv delta, Peter Maydell, 2019/07/01
- [Qemu-devel] [PULL 33/46] target/arm/helper: Remove unused include, Peter Maydell, 2019/07/01
- [Qemu-devel] [PULL 43/46] target/arm/vfp_helper: Restrict the SoftFloat use to TCG, Peter Maydell, 2019/07/01
- [Qemu-devel] [PULL 41/46] target/arm/vfp_helper: Extract vfp_set_fpscr_to_host(), Peter Maydell, 2019/07/01