Use the GCC builtin functions for the non-inlined signbit implementations.
2015-09-18 Wilco Dijkstra <wdijkstr@arm.com> * sysdeps/ieee754/dbl-64/s_signbit.c (__signbit): Use __builtin_signbit. * sysdeps/ieee754/flt-32/s_signbitf.c (__signbitf): Use __builtin_signbitf. * sysdeps/ieee754/ldbl-128/s_signbitl.c (__signbitl): Use __builtin_signbitl. * sysdeps/ieee754/ldbl-128ibm/s_signbitl.c (___signbitl): Likewise. * sysdeps/ieee754/ldbl-96/s_signbitl.c (__signbitl): Likewise.
This commit is contained in:
parent
8df4e219e4
commit
020167a4ce
11
ChangeLog
11
ChangeLog
@ -1,3 +1,14 @@
|
|||||||
|
2015-09-18 Wilco Dijkstra <wdijkstr@arm.com>
|
||||||
|
|
||||||
|
* sysdeps/ieee754/dbl-64/s_signbit.c (__signbit):
|
||||||
|
Use __builtin_signbit.
|
||||||
|
* sysdeps/ieee754/flt-32/s_signbitf.c (__signbitf):
|
||||||
|
Use __builtin_signbitf.
|
||||||
|
* sysdeps/ieee754/ldbl-128/s_signbitl.c (__signbitl):
|
||||||
|
Use __builtin_signbitl.
|
||||||
|
* sysdeps/ieee754/ldbl-128ibm/s_signbitl.c (___signbitl): Likewise.
|
||||||
|
* sysdeps/ieee754/ldbl-96/s_signbitl.c (__signbitl): Likewise.
|
||||||
|
|
||||||
2015-09-18 Wilco Dijkstra <wdijkstr@arm.com>
|
2015-09-18 Wilco Dijkstra <wdijkstr@arm.com>
|
||||||
|
|
||||||
[BZ #15367]
|
[BZ #15367]
|
||||||
|
@ -19,13 +19,8 @@
|
|||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include <math_private.h>
|
|
||||||
|
|
||||||
int
|
int
|
||||||
__signbit (double x)
|
__signbit (double x)
|
||||||
{
|
{
|
||||||
int32_t hx;
|
return __builtin_signbit (x);
|
||||||
|
|
||||||
GET_HIGH_WORD (hx, x);
|
|
||||||
return hx & 0x80000000;
|
|
||||||
}
|
}
|
||||||
|
@ -19,13 +19,8 @@
|
|||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include <math_private.h>
|
|
||||||
|
|
||||||
int
|
int
|
||||||
__signbitf (float x)
|
__signbitf (float x)
|
||||||
{
|
{
|
||||||
int32_t hx;
|
return __builtin_signbitf (x);
|
||||||
|
|
||||||
GET_FLOAT_WORD (hx, x);
|
|
||||||
return hx & 0x80000000;
|
|
||||||
}
|
}
|
||||||
|
@ -19,13 +19,8 @@
|
|||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include <math_private.h>
|
|
||||||
|
|
||||||
int
|
int
|
||||||
__signbitl (long double x)
|
__signbitl (long double x)
|
||||||
{
|
{
|
||||||
int64_t e;
|
return __builtin_signbitl (x);
|
||||||
|
|
||||||
GET_LDOUBLE_MSW64 (e, x);
|
|
||||||
return e < 0;
|
|
||||||
}
|
}
|
||||||
|
@ -18,18 +18,12 @@
|
|||||||
<http://www.gnu.org/licenses/>. */
|
<http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <math_private.h>
|
|
||||||
#include <math_ldbl_opt.h>
|
#include <math_ldbl_opt.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
___signbitl (long double x)
|
___signbitl (long double x)
|
||||||
{
|
{
|
||||||
int64_t e;
|
return __builtin_signbitl (x);
|
||||||
double xhi;
|
|
||||||
|
|
||||||
xhi = ldbl_high (x);
|
|
||||||
EXTRACT_WORDS64 (e, xhi);
|
|
||||||
return e < 0;
|
|
||||||
}
|
}
|
||||||
#if IS_IN (libm)
|
#if IS_IN (libm)
|
||||||
long_double_symbol (libm, ___signbitl, __signbitl);
|
long_double_symbol (libm, ___signbitl, __signbitl);
|
||||||
|
@ -19,13 +19,8 @@
|
|||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include <math_private.h>
|
|
||||||
|
|
||||||
int
|
int
|
||||||
__signbitl (long double x)
|
__signbitl (long double x)
|
||||||
{
|
{
|
||||||
int32_t e;
|
return __builtin_signbitl (x);
|
||||||
|
|
||||||
GET_LDOUBLE_EXP (e, x);
|
|
||||||
return e & 0x8000;
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user