From c201998ae941d04578f1f54f1ce6bd7f41ac2668 Mon Sep 17 00:00:00 2001 From: Steven Munroe Date: Fri, 23 May 2008 14:36:54 +0000 Subject: [PATCH] darwin-ldouble.c (fmsub): Eliminate the full PACK/UNPACK between FP_SUB_Q and FD_TRUNC so that the result... * config/rs6000/darwin-ldouble.c (fmsub): Eliminate the full PACK/UNPACK between FP_SUB_Q and FD_TRUNC so that the result is only rounded once. From-SVN: r135815 --- gcc/ChangeLog | 6 ++++++ gcc/config/rs6000/darwin-ldouble.c | 6 ++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index eace21cf9b1..cadf9d13705 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2008-05-23 Steven Munroe + + * config/rs6000/darwin-ldouble.c (fmsub): Eliminate the full + PACK/UNPACK between FP_SUB_Q and FD_TRUNC so that the result + is only rounded once. + 2008-05-23 Richard Guenther * tree-ssa-operands.c (mark_difference_for_renaming): Use diff --git a/gcc/config/rs6000/darwin-ldouble.c b/gcc/config/rs6000/darwin-ldouble.c index 7aa15b6d019..15cac65c6ed 100644 --- a/gcc/config/rs6000/darwin-ldouble.c +++ b/gcc/config/rs6000/darwin-ldouble.c @@ -422,15 +422,13 @@ fmsub (double a, double b, double c) FP_UNPACK_SEMIRAW_Q(U,u); FP_UNPACK_SEMIRAW_Q(Z,z); FP_SUB_Q(V,U,Z); - FP_PACK_SEMIRAW_Q(v,V); - FP_HANDLE_EXCEPTIONS; /* Truncate quad to double. */ - FP_INIT_ROUNDMODE; - FP_UNPACK_SEMIRAW_Q(V,v); #if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q + V_f[3] &= 0x0007ffff; FP_TRUNC(D,Q,2,4,R,V); #else + V_f1 &= 0x0007ffffffffffffL; FP_TRUNC(D,Q,1,2,R,V); #endif FP_PACK_SEMIRAW_D(r,R); -- 2.30.2