History

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

replaced by loading a float argument from memory and using the "m" modifier

seyko committed 11 years ago

Commit 45bc5051 parent f7dd3d41 file · +31 −10Browse files

Unified · Split

win32/include/math.h+31−10
@@ -316,7 +316,10 @@ extern "C" { · 315 unmodified lines
316 316
317 __CRT_INLINE int __cdecl __fpclassifyl (long double x){317 __CRT_INLINE int __cdecl __fpclassifyl (long double x){
318 unsigned short sw;318 unsigned short sw;
319 __asm__ ("fxam; fstsw %%ax;" : "=a" (sw): "t" (x));319 __asm__ (
320 "fldt %1 \n"
321 "fxam \n"
322 "fstsw %0 \n" : "=a" (sw): "m" (x));
320 return sw & (FP_NAN | FP_NORMAL | FP_ZERO );323 return sw & (FP_NAN | FP_NORMAL | FP_ZERO );
321 }324 }
322 325
@@ -337,8 +340,11 @@ extern "C" { · 14 unmodified lines
337 __CRT_INLINE int __cdecl __isnan (double _x)340 __CRT_INLINE int __cdecl __isnan (double _x)
338 {341 {
339 unsigned short sw;342 unsigned short sw;
340 __asm__ ("fxam;"343 __asm__ (
341 "fstsw %%ax": "=a" (sw) : "t" (_x));344 "fldl %1 \n"
345 "fxam \n"
346 "fstsw %0 \n" : "=a" (sw) : "m" (_x));
347
342 return (sw & (FP_NAN | FP_NORMAL | FP_INFINITE | FP_ZERO | FP_SUBNORMAL))348 return (sw & (FP_NAN | FP_NORMAL | FP_INFINITE | FP_ZERO | FP_SUBNORMAL))
343 == FP_NAN;349 == FP_NAN;
344 }350 }
@@ -346,8 +352,11 @@ extern "C" { · 1 unmodified line
346 __CRT_INLINE int __cdecl __isnanf (float _x)352 __CRT_INLINE int __cdecl __isnanf (float _x)
347 {353 {
348 unsigned short sw;354 unsigned short sw;
349 __asm__ ("fxam;"355 __asm__ (
350 "fstsw %%ax": "=a" (sw) : "t" (_x));356 "flds %1 \n"
357 "fxam \n"
358 "fstsw %0 \n" : "=a" (sw) : "m" (_x));
359
351 return (sw & (FP_NAN | FP_NORMAL | FP_INFINITE | FP_ZERO | FP_SUBNORMAL))360 return (sw & (FP_NAN | FP_NORMAL | FP_INFINITE | FP_ZERO | FP_SUBNORMAL))
352 == FP_NAN;361 == FP_NAN;
353 }362 }
@@ -355,8 +364,11 @@ extern "C" { · 1 unmodified line
355 __CRT_INLINE int __cdecl __isnanl (long double _x)364 __CRT_INLINE int __cdecl __isnanl (long double _x)
356 {365 {
357 unsigned short sw;366 unsigned short sw;
358 __asm__ ("fxam;"367 __asm__ (
359 "fstsw %%ax": "=a" (sw) : "t" (_x));368 "fldt %1 \n"
369 "fxam \n"
370 "fstsw %0 \n" : "=a" (sw) : "m" (_x));
371
360 return (sw & (FP_NAN | FP_NORMAL | FP_INFINITE | FP_ZERO | FP_SUBNORMAL))372 return (sw & (FP_NAN | FP_NORMAL | FP_INFINITE | FP_ZERO | FP_SUBNORMAL))
361 == FP_NAN;373 == FP_NAN;
362 }374 }
@@ -372,19 +384,28 @@ extern "C" { · 9 unmodified lines
372 /* 7.12.3.6 The signbit macro */384 /* 7.12.3.6 The signbit macro */
373 __CRT_INLINE int __cdecl __signbit (double x) {385 __CRT_INLINE int __cdecl __signbit (double x) {
374 unsigned short stw;386 unsigned short stw;
375 __asm__ ( "fxam; fstsw %%ax;": "=a" (stw) : "t" (x));387 __asm__ (
388 "fldl %1 \n"
389 "fxam \n"
390 "fstsw %0 \n" : "=a" (stw) : "m" (x));
376 return stw & 0x0200;391 return stw & 0x0200;
377 }392 }
378 393
379 __CRT_INLINE int __cdecl __signbitf (float x) {394 __CRT_INLINE int __cdecl __signbitf (float x) {
380 unsigned short stw;395 unsigned short stw;
381 __asm__ ("fxam; fstsw %%ax;": "=a" (stw) : "t" (x));396 __asm__ (
397 "flds %1 \n"
398 "fxam \n"
399 "fstsw %0 \n" : "=a" (stw) : "m" (x));
382 return stw & 0x0200;400 return stw & 0x0200;
383 }401 }
384 402
385 __CRT_INLINE int __cdecl __signbitl (long double x) {403 __CRT_INLINE int __cdecl __signbitl (long double x) {
386 unsigned short stw;404 unsigned short stw;
387 __asm__ ("fxam; fstsw %%ax;": "=a" (stw) : "t" (x));405 __asm__ (
406 "fldt %1 \n"
407 "fxam \n"
408 "fstsw %0 \n" : "=a" (stw) : "m" (x));
388 return stw & 0x0200;409 return stw & 0x0200;
389 }410 }
390 411

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t