]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
* sysdeps/m68k/fpu/s_modf.c: Optimized by using __m81_test instead
authorAndreas Schwab <schwab@suse.de>
Sat, 13 Feb 1999 16:51:29 +0000 (16:51 +0000)
committerAndreas Schwab <schwab@suse.de>
Sat, 13 Feb 1999 16:51:29 +0000 (16:51 +0000)
of separare explicit comparisons.

sysdeps/m68k/fpu/s_modf.c

index 6c2449aa567d563a5e26fc3bc1fe6336fdcdf60c..52ee64caad21f8719dc89331f771d01ac8939b8d 100644 (file)
@@ -33,15 +33,18 @@ float_type
 s(__modf) (float_type x, float_type *iptr)
 {
   float_type x_int, result;
+  unsigned long x_cond;
+
   __asm ("fintrz%.x %1, %0" : "=f" (x_int) : "f" (x));
   *iptr = x_int;
-  if (m81(__isinf) (x))
+  x_cond = __m81_test (x);
+  if (x_cond & __M81_COND_INF)
     {
       result = 0;
-      if (x < 0)
+      if (x_cond & __M81_COND_NEG)
        result = -result;
     }
-  else if (x == 0)
+  else if (x_cond & __M81_COND_ZERO)
     result = x;
   else
     result = x - x_int;