* 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.
This commit is contained in:
Andreas Schwab 1999-02-13 16:51:29 +00:00
parent c29c42b0af
commit 3634b0706f
2 changed files with 11 additions and 3 deletions

View File

@ -1,3 +1,8 @@
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.
1999-02-11 Andreas Schwab <schwab@issan.cs.uni-dortmund.de> 1999-02-11 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
* sysdeps/wordsize-64/inttypes.h: Always define ldiv_t if not yet * sysdeps/wordsize-64/inttypes.h: Always define ldiv_t if not yet

View File

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