summaryrefslogtreecommitdiff
path: root/gcc/libgcc2.c
diff options
context:
space:
mode:
authorrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>1993-05-11 04:42:22 +0000
committerrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>1993-05-11 04:42:22 +0000
commita06dece2dca2ff620b857210db8cce5d01ea208b (patch)
tree3b2353e3282207922f59e925f48062ca493d3cdf /gcc/libgcc2.c
parentee6d4b2a72d74858cd345ed1f6de151e642877a8 (diff)
downloadgcc-a06dece2dca2ff620b857210db8cce5d01ea208b.tar.gz
(__floatdisf): Use DFtype for intermediate values.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@4421 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/libgcc2.c')
-rw-r--r--gcc/libgcc2.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/libgcc2.c b/gcc/libgcc2.c
index 433627edf90..9dcccbe3d01 100644
--- a/gcc/libgcc2.c
+++ b/gcc/libgcc2.c
@@ -1018,7 +1018,10 @@ SFtype
__floatdisf (u)
DItype u;
{
- SFtype f;
+ /* Do the calculation in DFmode
+ so that we don't lose any of the precision of the high word
+ while multiplying it. */
+ DFtype f;
SItype negate = 0;
if (u < 0)
@@ -1029,7 +1032,7 @@ __floatdisf (u)
f *= HIGH_HALFWORD_COEFF;
f += (USItype) (u & (HIGH_WORD_COEFF - 1));
- return (negate ? -f : f);
+ return (SFtype) (negate ? -f : f);
}
#endif