]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - sysdeps/sparc/sparc32/soft-fp/q_flt.c
soft-fp: Refactor exception handling for comparisons.
[thirdparty/glibc.git] / sysdeps / sparc / sparc32 / soft-fp / q_flt.c
index c76a0c7bfd915bfea6c1876c35f7a21f95cecda0..caa188d72c64b1b7348489fc6ff3c70ab42ced65 100644 (file)
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return 1 if a < b
-   Copyright (C) 1997,1999 Free Software Foundation, Inc.
+   Copyright (C) 1997-2014 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
                  Jakub Jelinek (jj@ultra.linux.cz).
@@ -30,9 +30,7 @@ int _Q_flt(const long double a, const long double b)
 
   FP_UNPACK_RAW_Q(A, a);
   FP_UNPACK_RAW_Q(B, b);
-  FP_CMP_Q(r, B, A, 3);
-  if (r == 3)
-    FP_SET_EXCEPTION(FP_EX_INVALID);
+  FP_CMP_Q(r, B, A, 3, 2);
   FP_HANDLE_EXCEPTIONS;
 
   return (r == 1);