Welcome to mirror list, hosted at ThFree Co, Russian Federation.

signbitf.c « math « mingwex « mingw « winsup - cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 1c96b9f8058729a7d5eddb1ec549941490bc0c58 (plain)
1
2
3
4
5
6
7
8
9
10
#define __FP_SIGNBIT  0x0200

int __signbitf (float x) {
  unsigned short sw;
  __asm__ ("fxam; fstsw %%ax;"
	   : "=a" (sw)
	   : "t" (x) );
  return (sw & __FP_SIGNBIT) != 0;
}
int __attribute__ ((alias ("__signbitf"))) signbitf (float);