aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorSteven Munroe <sjmunroe@us.ibm.com>2008-05-23 14:36:54 +0000
committerNathan Froyd <froydnj@gcc.gnu.org>2008-05-23 14:36:54 +0000
commitc201998ae941d04578f1f54f1ce6bd7f41ac2668 (patch)
tree80f96574206e65b4de70bf22b8c57bcf86e1fa3e /gcc
parent430b2815a3ef5f81bc860582f2f32eebbd4ee9cb (diff)
downloadgcc-c201998ae941d04578f1f54f1ce6bd7f41ac2668.zip
gcc-c201998ae941d04578f1f54f1ce6bd7f41ac2668.tar.gz
gcc-c201998ae941d04578f1f54f1ce6bd7f41ac2668.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/rs6000/darwin-ldouble.c6
2 files changed, 8 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index eace21c..cadf9d1 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2008-05-23 Steven Munroe <sjmunroe@us.ibm.com>
+
+ * 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 <rguenther@suse.de>
* 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 7aa15b6..15cac65 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);