~mingw-w64/mingw-w64/experimental

« back to all changes in this revision

Viewing changes to ros-privexp/mingw-w64-crt/math/signbitl.c

  • Committer: NightStrike
  • Date: 2010-08-11 22:20:57 UTC
  • Revision ID: svn-v4:4407c894-4637-0410-b4f5-ada5f102cad1:experimental:3266
Branch for adding option for supporting ros

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**
 
2
 * This file has no copyright assigned and is placed in the Public Domain.
 
3
 * This file is part of the w64 mingw-runtime package.
 
4
 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
 
5
 */
 
6
#define __FP_SIGNBIT  0x0200
 
7
int __signbitl (long double x);
 
8
 
 
9
int __signbitl (long double x) {
 
10
  unsigned short sw;
 
11
  __asm__ __volatile__ ("fxam; fstsw %%ax;"
 
12
           : "=a" (sw)
 
13
           : "t" (x) );
 
14
  return (sw & __FP_SIGNBIT) != 0;
 
15
}
 
16
 
 
17
int __attribute__ ((alias ("__signbitl"))) signbitl (long double);