summaryrefslogtreecommitdiff
path: root/gcc/config/fp-bit.c
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>1996-05-17 17:09:54 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>1996-05-17 17:09:54 +0000
commit39b480923a8707d39627fcb2c1d935c988433a3a (patch)
tree44034b4b0740028e8cac3b0c061a5bea34784f4f /gcc/config/fp-bit.c
parentf892cb3ada73ee59fc29c1372629bd6c073bd68d (diff)
downloadgcc-39b480923a8707d39627fcb2c1d935c988433a3a.tar.gz
Correct sign handling when dividing zero or infinity by something
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@12009 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/fp-bit.c')
-rw-r--r--gcc/config/fp-bit.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/config/fp-bit.c b/gcc/config/fp-bit.c
index eb160e8afc7..7381ae80b27 100644
--- a/gcc/config/fp-bit.c
+++ b/gcc/config/fp-bit.c
@@ -2,7 +2,7 @@
the floating point routines in libgcc1.c for targets without hardware
floating point. */
-/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
This file is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
@@ -944,13 +944,15 @@ _fpdiv_parts (fp_number_type * a,
{
return b;
}
+
+ a->sign = a->sign ^ b->sign;
+
if (isinf (a) || iszero (a))
{
if (a->class == b->class)
return nan ();
return a;
}
- a->sign = a->sign ^ b->sign;
if (isinf (b))
{