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

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

int __signbit (double x) {
  unsigned short sw;
  __asm__ ("fxam; fstsw %%ax;"
	   : "=a" (sw)
	   : "t" (x) );
  return (sw & __FP_SIGNBIT) != 0;
}

#undef signbit
int __attribute__ ((alias ("__signbit"))) signbit (double);