8559dd92d0
consistent with GCC's __builtin_signbit. * mingwex/math/signbitf.c (__signbitf): Likewise. * mingwex/math/signbitf.c (__signbitl): Likewise. * include/math.h (__signbit, __signbitf, __signbitl): Likewise for inlines.
12 lines
253 B
C
12 lines
253 B
C
#define __FP_SIGNBIT 0x0200
|
|
|
|
int __signbitl (long double x) {
|
|
unsigned short sw;
|
|
__asm__ ("fxam; fstsw %%ax;"
|
|
: "=a" (sw)
|
|
: "t" (x) );
|
|
return (sw & __FP_SIGNBIT) != 0;
|
|
}
|
|
|
|
int __attribute__ ((alias ("__signbitl"))) signbitl (long double);
|