[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 2.0 09/15] target-ppc: Correct VSX FP to FP Conversions
From: |
Alexander Graf |
Subject: |
[Qemu-ppc] [PULL 2.0 09/15] target-ppc: Correct VSX FP to FP Conversions |
Date: |
Tue, 8 Apr 2014 11:31:48 +0200 |
From: Tom Musta <address@hidden>
This change corrects the VSX double precision to single precision and
single precision to double precisions conversion routines. The endian
correct accessors are now used. The auxiliary "j" index is no longer
necessary and is eliminated.
Signed-off-by: Tom Musta <address@hidden>
Tested-by: Tom Musta <address@hidden>
Signed-off-by: Alexander Graf <address@hidden>
---
target-ppc/fpu_helper.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/target-ppc/fpu_helper.c b/target-ppc/fpu_helper.c
index 6233d5e..12bec90 100644
--- a/target-ppc/fpu_helper.c
+++ b/target-ppc/fpu_helper.c
@@ -2512,7 +2512,6 @@ void helper_##op(CPUPPCState *env, uint32_t opcode)
\
getVSR(xT(opcode), &xt, env); \
\
for (i = 0; i < nels; i++) { \
- int j = 2*i + JOFFSET; \
xt.tfld = stp##_to_##ttp(xb.sfld, &env->fp_status); \
if (unlikely(stp##_is_signaling_nan(xb.sfld))) { \
fload_invalid_op_excp(env, POWERPC_EXCP_FP_VXSNAN, 0); \
@@ -2528,10 +2527,10 @@ void helper_##op(CPUPPCState *env, uint32_t opcode)
\
helper_float_check_status(env); \
}
-VSX_CVT_FP_TO_FP(xscvdpsp, 1, float64, float32, f64[i], f32[j], 1)
-VSX_CVT_FP_TO_FP(xscvspdp, 1, float32, float64, f32[j], f64[i], 1)
-VSX_CVT_FP_TO_FP(xvcvdpsp, 2, float64, float32, f64[i], f32[j], 0)
-VSX_CVT_FP_TO_FP(xvcvspdp, 2, float32, float64, f32[j], f64[i], 0)
+VSX_CVT_FP_TO_FP(xscvdpsp, 1, float64, float32, VsrD(0), VsrW(0), 1)
+VSX_CVT_FP_TO_FP(xscvspdp, 1, float32, float64, VsrW(0), VsrD(0), 1)
+VSX_CVT_FP_TO_FP(xvcvdpsp, 2, float64, float32, VsrD(i), VsrW(2*i), 0)
+VSX_CVT_FP_TO_FP(xvcvspdp, 2, float32, float64, VsrW(2*i), VsrD(i), 0)
uint64_t helper_xscvdpspn(CPUPPCState *env, uint64_t xb)
{
--
1.8.1.4
- [Qemu-ppc] [PULL 2.0 00/15] ppc patch queue 2014-04-08 for 2.0, Alexander Graf, 2014/04/08
- [Qemu-ppc] [PULL 2.0 05/15] target-ppc: Define Endian-Correct Accessors for VSR Field Access, Alexander Graf, 2014/04/08
- [Qemu-ppc] [PULL 2.0 01/15] PPC: E500: Set PIR default reset value rather than SPR value, Alexander Graf, 2014/04/08
- [Qemu-ppc] [PULL 2.0 03/15] softfloat: Introduce float32_to_uint64_round_to_zero, Alexander Graf, 2014/04/08
- [Qemu-ppc] [PULL 2.0 09/15] target-ppc: Correct VSX FP to FP Conversions,
Alexander Graf <=
- [Qemu-ppc] [PULL 2.0 06/15] target-ppc: Correct LE Host Inversion of Lower VSRs, Alexander Graf, 2014/04/08
- [Qemu-ppc] [PULL 2.0 10/15] target-ppc: Correct VSX FP to Integer Conversion, Alexander Graf, 2014/04/08
- [Qemu-ppc] [PULL 2.0 07/15] target-ppc: Correct Simple VSR LE Host Inversions, Alexander Graf, 2014/04/08
- [Qemu-ppc] [PULL 2.0 12/15] PPC: Clean up DECR implementation, Alexander Graf, 2014/04/08
- [Qemu-ppc] [PULL 2.0 13/15] PPC: Only enter MSR_POW when no interrupts pending, Alexander Graf, 2014/04/08
- [Qemu-ppc] [PULL 2.0 08/15] target-ppc: Correct VSX Scalar Compares, Alexander Graf, 2014/04/08
- [Qemu-ppc] [PULL 2.0 11/15] target-ppc: Correct VSX Integer to FP Conversion, Alexander Graf, 2014/04/08
- [Qemu-ppc] [PULL 2.0 15/15] PPC: Add l1 cache sizes for 970 and above systems, Alexander Graf, 2014/04/08
- [Qemu-ppc] [PULL 2.0 04/15] target-ppc: Bug: VSX Convert to Integer Should Truncate, Alexander Graf, 2014/04/08
- [Qemu-ppc] [PULL 2.0 14/15] ppce500_spin: Initialize struct properly, Alexander Graf, 2014/04/08