Fix __fpclassifyl when double == long double. As with r283693 this is

needed on ARM and PowerPC.

MFC after:	1 Week
This commit is contained in:
andrew 2015-05-29 09:26:10 +00:00
parent ac994cae1d
commit 665a8e93e6

View File

@ -29,6 +29,8 @@
#include <sys/endian.h>
#include <machine/float.h>
#include <math.h>
#include <stdint.h>
@ -84,10 +86,18 @@ __fpclassifyl(long double e)
return (FP_SUBNORMAL);
}
mask_nbit_l(u); /* Mask normalization bit if applicable. */
#if LDBL_MANT_DIG == 53
if (u.bits.exp == 2047) {
if ((u.bits.manl | u.bits.manh) == 0)
return (FP_INFINITE);
return (FP_NAN);
}
#else
if (u.bits.exp == 32767) {
if ((u.bits.manl | u.bits.manh) == 0)
return (FP_INFINITE);
return (FP_NAN);
}
#endif
return (FP_NORMAL);
}