2002-06-13 18:20:48 +08:00
|
|
|
#define __FP_SIGNBIT 0x0200
|
|
|
|
|
|
|
|
int __signbitf (float x) {
|
|
|
|
unsigned short sw;
|
|
|
|
__asm__ ("fxam; fstsw %%ax;"
|
|
|
|
: "=a" (sw)
|
|
|
|
: "t" (x) );
|
2005-05-03 16:39:19 +08:00
|
|
|
return (sw & __FP_SIGNBIT) != 0;
|
2002-06-13 18:20:48 +08:00
|
|
|
}
|
|
|
|
int __attribute__ ((alias ("__signbitf"))) signbitf (float);
|