Revert "win32/include/math.h: remoing a "t" modifier usage"

This reverts commit 45bc505968.

The new asm code did not work as expected. Coordinated with seiko.
This commit is contained in:
Avi Halachmi (:avih) 2015-11-07 21:30:56 +02:00
parent 8fc9c79705
commit 7307a6a3cb

View File

@ -316,10 +316,7 @@ extern "C" {
__CRT_INLINE int __cdecl __fpclassifyl (long double x){
unsigned short sw;
__asm__ (
"fldt %1 \n"
"fxam \n"
"fstsw %0 \n" : "=a" (sw): "m" (x));
__asm__ ("fxam; fstsw %%ax;" : "=a" (sw): "t" (x));
return sw & (FP_NAN | FP_NORMAL | FP_ZERO );
}
@ -340,11 +337,8 @@ extern "C" {
__CRT_INLINE int __cdecl __isnan (double _x)
{
unsigned short sw;
__asm__ (
"fldl %1 \n"
"fxam \n"
"fstsw %0 \n" : "=a" (sw) : "m" (_x));
__asm__ ("fxam;"
"fstsw %%ax": "=a" (sw) : "t" (_x));
return (sw & (FP_NAN | FP_NORMAL | FP_INFINITE | FP_ZERO | FP_SUBNORMAL))
== FP_NAN;
}
@ -352,11 +346,8 @@ extern "C" {
__CRT_INLINE int __cdecl __isnanf (float _x)
{
unsigned short sw;
__asm__ (
"flds %1 \n"
"fxam \n"
"fstsw %0 \n" : "=a" (sw) : "m" (_x));
__asm__ ("fxam;"
"fstsw %%ax": "=a" (sw) : "t" (_x));
return (sw & (FP_NAN | FP_NORMAL | FP_INFINITE | FP_ZERO | FP_SUBNORMAL))
== FP_NAN;
}
@ -364,11 +355,8 @@ extern "C" {
__CRT_INLINE int __cdecl __isnanl (long double _x)
{
unsigned short sw;
__asm__ (
"fldt %1 \n"
"fxam \n"
"fstsw %0 \n" : "=a" (sw) : "m" (_x));
__asm__ ("fxam;"
"fstsw %%ax": "=a" (sw) : "t" (_x));
return (sw & (FP_NAN | FP_NORMAL | FP_INFINITE | FP_ZERO | FP_SUBNORMAL))
== FP_NAN;
}
@ -384,28 +372,19 @@ extern "C" {
/* 7.12.3.6 The signbit macro */
__CRT_INLINE int __cdecl __signbit (double x) {
unsigned short stw;
__asm__ (
"fldl %1 \n"
"fxam \n"
"fstsw %0 \n" : "=a" (stw) : "m" (x));
__asm__ ( "fxam; fstsw %%ax;": "=a" (stw) : "t" (x));
return stw & 0x0200;
}
__CRT_INLINE int __cdecl __signbitf (float x) {
unsigned short stw;
__asm__ (
"flds %1 \n"
"fxam \n"
"fstsw %0 \n" : "=a" (stw) : "m" (x));
__asm__ ("fxam; fstsw %%ax;": "=a" (stw) : "t" (x));
return stw & 0x0200;
}
__CRT_INLINE int __cdecl __signbitl (long double x) {
unsigned short stw;
__asm__ (
"fldt %1 \n"
"fxam \n"
"fstsw %0 \n" : "=a" (stw) : "m" (x));
__asm__ ("fxam; fstsw %%ax;": "=a" (stw) : "t" (x));
return stw & 0x0200;
}