Update signbit functions to work on targets where integers are only 16-bits.
* libm/common/s_signbit.c (__signbitf): Fix for 16-bit targets. (__signbitd): Likewise.
This commit is contained in:
parent
baa681fd38
commit
7b3c1cffce
@ -1,3 +1,8 @@
|
|||||||
|
2015-05-13 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
|
* libm/common/s_signbit.c (__signbitf): Fix for 16-bit targets.
|
||||||
|
(__signbitd): Likewise.
|
||||||
|
|
||||||
2015-05-02 Corinna Vinschen <vinschen@redhat.com>
|
2015-05-02 Corinna Vinschen <vinschen@redhat.com>
|
||||||
|
|
||||||
* libc/include/sys/time.h: Include sys/select.h on Cygwin. Explain why.
|
* libc/include/sys/time.h: Include sys/select.h on Cygwin. Explain why.
|
||||||
|
@ -41,19 +41,19 @@ int __signbitd (double x);
|
|||||||
int
|
int
|
||||||
__signbitf (float x)
|
__signbitf (float x)
|
||||||
{
|
{
|
||||||
unsigned int w;
|
__uint32_t w;
|
||||||
|
|
||||||
GET_FLOAT_WORD(w,x);
|
GET_FLOAT_WORD(w,x);
|
||||||
|
|
||||||
return (w & 0x80000000);
|
return (w & 0x80000000) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
__signbitd (double x)
|
__signbitd (double x)
|
||||||
{
|
{
|
||||||
unsigned int msw;
|
__uint32_t msw;
|
||||||
|
|
||||||
GET_HIGH_WORD(msw, x);
|
GET_HIGH_WORD(msw, x);
|
||||||
|
|
||||||
return (msw & 0x80000000);
|
return (msw & 0x80000000) != 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user