aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/m68k/fpu/s_modf.c
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@suse.de>1999-02-13 16:51:29 +0000
committerAndreas Schwab <schwab@suse.de>1999-02-13 16:51:29 +0000
commit3634b0706fa816aa3fbeb40da7f0d40f160b9308 (patch)
tree7d18ca8f59751c6350b0b24ab79943dc8315e70d /sysdeps/m68k/fpu/s_modf.c
parentc29c42b0afb80595df9c8a85897806b867b0d8eb (diff)
downloadglibc-3634b0706fa816aa3fbeb40da7f0d40f160b9308.tar
glibc-3634b0706fa816aa3fbeb40da7f0d40f160b9308.tar.gz
glibc-3634b0706fa816aa3fbeb40da7f0d40f160b9308.tar.bz2
glibc-3634b0706fa816aa3fbeb40da7f0d40f160b9308.zip
* sysdeps/m68k/fpu/s_modf.c: Optimized by using __m81_test instead
of separare explicit comparisons. Sun Feb 14 01:49:29 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de> * sysdeps/m68k/fpu/s_modf.c: Optimized by using __m81_test instead of separare explicit comparisons.
Diffstat (limited to 'sysdeps/m68k/fpu/s_modf.c')
-rw-r--r--sysdeps/m68k/fpu/s_modf.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sysdeps/m68k/fpu/s_modf.c b/sysdeps/m68k/fpu/s_modf.c
index 6c2449aa56..52ee64caad 100644
--- a/sysdeps/m68k/fpu/s_modf.c
+++ b/sysdeps/m68k/fpu/s_modf.c
@@ -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;