summaryrefslogtreecommitdiff
path: root/gcc/real.c
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1993-05-20 04:27:34 +0000
committerRichard Stallman <rms@gnu.org>1993-05-20 04:27:34 +0000
commitdca821e1a9a0d5ed3a44fd6a1e15f7cb08833e58 (patch)
tree0dac5c949aa509aa96a0afd80525a062eb2674da /gcc/real.c
parentffed0993533b0e10abcf23e3aefb91e3c39ce3ea (diff)
downloadgcc-dca821e1a9a0d5ed3a44fd6a1e15f7cb08833e58.tar.gz
(e24toe, e53toe, e64toe): Fix sign in conversions of -infinity.
(e24toe, e53toe, e64toe): Fix sign in conversions of -infinity. Always do eclear before einfin. From-SVN: r4513
Diffstat (limited to 'gcc/real.c')
-rw-r--r--gcc/real.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/gcc/real.c b/gcc/real.c
index df911cc2678..40b3cc22f6e 100644
--- a/gcc/real.c
+++ b/gcc/real.c
@@ -1328,7 +1328,9 @@ eisnan (x)
}
/* Fill external format number with infinity pattern (IEEE)
- or largest possible number (non-IEEE). */
+ or largest possible number (non-IEEE).
+ Before calling einfin, you should either call eclear
+ or set up the sign bit by hand. */
void
einfin (x)
@@ -1458,7 +1460,7 @@ emovo (a, b)
}
#endif
einfin (b);
- return;
+ return;
}
#endif
/* skip over guard word */
@@ -2635,8 +2637,9 @@ e53toe (pe, y)
}
#endif
#endif /* NANS */
+ eclear (y);
einfin (y);
- if (r & 0x8000)
+ if (yy[0])
eneg (y);
return;
}
@@ -2728,6 +2731,7 @@ e64toe (pe, y)
}
#endif
#endif /* NANS */
+ eclear (y);
einfin (y);
if (*p & 0x8000)
eneg (y);
@@ -2787,8 +2791,9 @@ e24toe (pe, y)
}
#endif
#endif /* NANS */
+ eclear (y);
einfin (y);
- if (r & 0x8000)
+ if (yy[0])
eneg (y);
return;
}