mirror of
https://github.com/frida/tinycc
synced 2024-11-28 02:29:38 +03:00
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:
parent
8fc9c79705
commit
7307a6a3cb
@ -316,10 +316,7 @@ extern "C" {
|
|||||||
|
|
||||||
__CRT_INLINE int __cdecl __fpclassifyl (long double x){
|
__CRT_INLINE int __cdecl __fpclassifyl (long double x){
|
||||||
unsigned short sw;
|
unsigned short sw;
|
||||||
__asm__ (
|
__asm__ ("fxam; fstsw %%ax;" : "=a" (sw): "t" (x));
|
||||||
"fldt %1 \n"
|
|
||||||
"fxam \n"
|
|
||||||
"fstsw %0 \n" : "=a" (sw): "m" (x));
|
|
||||||
return sw & (FP_NAN | FP_NORMAL | FP_ZERO );
|
return sw & (FP_NAN | FP_NORMAL | FP_ZERO );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -340,11 +337,8 @@ extern "C" {
|
|||||||
__CRT_INLINE int __cdecl __isnan (double _x)
|
__CRT_INLINE int __cdecl __isnan (double _x)
|
||||||
{
|
{
|
||||||
unsigned short sw;
|
unsigned short sw;
|
||||||
__asm__ (
|
__asm__ ("fxam;"
|
||||||
"fldl %1 \n"
|
"fstsw %%ax": "=a" (sw) : "t" (_x));
|
||||||
"fxam \n"
|
|
||||||
"fstsw %0 \n" : "=a" (sw) : "m" (_x));
|
|
||||||
|
|
||||||
return (sw & (FP_NAN | FP_NORMAL | FP_INFINITE | FP_ZERO | FP_SUBNORMAL))
|
return (sw & (FP_NAN | FP_NORMAL | FP_INFINITE | FP_ZERO | FP_SUBNORMAL))
|
||||||
== FP_NAN;
|
== FP_NAN;
|
||||||
}
|
}
|
||||||
@ -352,11 +346,8 @@ extern "C" {
|
|||||||
__CRT_INLINE int __cdecl __isnanf (float _x)
|
__CRT_INLINE int __cdecl __isnanf (float _x)
|
||||||
{
|
{
|
||||||
unsigned short sw;
|
unsigned short sw;
|
||||||
__asm__ (
|
__asm__ ("fxam;"
|
||||||
"flds %1 \n"
|
"fstsw %%ax": "=a" (sw) : "t" (_x));
|
||||||
"fxam \n"
|
|
||||||
"fstsw %0 \n" : "=a" (sw) : "m" (_x));
|
|
||||||
|
|
||||||
return (sw & (FP_NAN | FP_NORMAL | FP_INFINITE | FP_ZERO | FP_SUBNORMAL))
|
return (sw & (FP_NAN | FP_NORMAL | FP_INFINITE | FP_ZERO | FP_SUBNORMAL))
|
||||||
== FP_NAN;
|
== FP_NAN;
|
||||||
}
|
}
|
||||||
@ -364,11 +355,8 @@ extern "C" {
|
|||||||
__CRT_INLINE int __cdecl __isnanl (long double _x)
|
__CRT_INLINE int __cdecl __isnanl (long double _x)
|
||||||
{
|
{
|
||||||
unsigned short sw;
|
unsigned short sw;
|
||||||
__asm__ (
|
__asm__ ("fxam;"
|
||||||
"fldt %1 \n"
|
"fstsw %%ax": "=a" (sw) : "t" (_x));
|
||||||
"fxam \n"
|
|
||||||
"fstsw %0 \n" : "=a" (sw) : "m" (_x));
|
|
||||||
|
|
||||||
return (sw & (FP_NAN | FP_NORMAL | FP_INFINITE | FP_ZERO | FP_SUBNORMAL))
|
return (sw & (FP_NAN | FP_NORMAL | FP_INFINITE | FP_ZERO | FP_SUBNORMAL))
|
||||||
== FP_NAN;
|
== FP_NAN;
|
||||||
}
|
}
|
||||||
@ -384,28 +372,19 @@ extern "C" {
|
|||||||
/* 7.12.3.6 The signbit macro */
|
/* 7.12.3.6 The signbit macro */
|
||||||
__CRT_INLINE int __cdecl __signbit (double x) {
|
__CRT_INLINE int __cdecl __signbit (double x) {
|
||||||
unsigned short stw;
|
unsigned short stw;
|
||||||
__asm__ (
|
__asm__ ( "fxam; fstsw %%ax;": "=a" (stw) : "t" (x));
|
||||||
"fldl %1 \n"
|
|
||||||
"fxam \n"
|
|
||||||
"fstsw %0 \n" : "=a" (stw) : "m" (x));
|
|
||||||
return stw & 0x0200;
|
return stw & 0x0200;
|
||||||
}
|
}
|
||||||
|
|
||||||
__CRT_INLINE int __cdecl __signbitf (float x) {
|
__CRT_INLINE int __cdecl __signbitf (float x) {
|
||||||
unsigned short stw;
|
unsigned short stw;
|
||||||
__asm__ (
|
__asm__ ("fxam; fstsw %%ax;": "=a" (stw) : "t" (x));
|
||||||
"flds %1 \n"
|
|
||||||
"fxam \n"
|
|
||||||
"fstsw %0 \n" : "=a" (stw) : "m" (x));
|
|
||||||
return stw & 0x0200;
|
return stw & 0x0200;
|
||||||
}
|
}
|
||||||
|
|
||||||
__CRT_INLINE int __cdecl __signbitl (long double x) {
|
__CRT_INLINE int __cdecl __signbitl (long double x) {
|
||||||
unsigned short stw;
|
unsigned short stw;
|
||||||
__asm__ (
|
__asm__ ("fxam; fstsw %%ax;": "=a" (stw) : "t" (x));
|
||||||
"fldt %1 \n"
|
|
||||||
"fxam \n"
|
|
||||||
"fstsw %0 \n" : "=a" (stw) : "m" (x));
|
|
||||||
return stw & 0x0200;
|
return stw & 0x0200;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user