Changeset 36170 in vbox for trunk/src/recompiler/fpu/softfloat-native.h
- Timestamp:
- Mar 4, 2011 12:49:02 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 70361
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/recompiler/fpu/softfloat-native.h
r36140 r36170 9 9 #endif 10 10 11 #ifdef __OpenBSD__ 12 /* Get OpenBSD version number */ 11 #if defined(__OpenBSD__) || defined(__NetBSD__) 13 12 #include <sys/param.h> 14 13 #endif … … 36 35 #endif 37 36 37 #ifdef __NetBSD__ 38 #ifndef isgreater 39 #define isgreater(x, y) __builtin_isgreater(x, y) 40 #endif 41 #ifndef isgreaterequal 42 #define isgreaterequal(x, y) __builtin_isgreaterequal(x, y) 43 #endif 44 #ifndef isless 45 #define isless(x, y) __builtin_isless(x, y) 46 #endif 47 #ifndef islessequal 48 #define islessequal(x, y) __builtin_islessequal(x, y) 49 #endif 50 #ifndef isunordered 51 #define isunordered(x, y) __builtin_isunordered(x, y) 52 #endif 53 #endif 54 55 38 56 #define isnormal(x) (fpclass(x) >= FP_NZERO) 39 57 #define isgreater(x, y) ((!unordered(x, y)) && ((x) > (y))) … … 123 141 124 142 typedef struct float_status { 125 signed charfloat_rounding_mode;126 #ifdef FLOATX80 127 signed charfloatx80_rounding_precision;143 int float_rounding_mode; 144 #ifdef FLOATX80 145 int floatx80_rounding_precision; 128 146 #endif 129 147 } float_status; … … 229 247 int float32_compare_quiet( float32, float32 STATUS_PARAM ); 230 248 int float32_is_signaling_nan( float32 ); 249 int float32_is_nan( float32 ); 231 250 232 251 INLINE float32 float32_abs(float32 a) … … 238 257 { 239 258 return -a; 259 } 260 261 INLINE float32 float32_is_infinity(float32 a) 262 { 263 return fpclassify(a) == FP_INFINITE; 264 } 265 266 INLINE float32 float32_is_neg(float32 a) 267 { 268 float32u u; 269 u.f = a; 270 return u.i >> 31; 271 } 272 273 INLINE float32 float32_is_zero(float32 a) 274 { 275 return fpclassify(a) == FP_ZERO; 240 276 } 241 277 … … 332 368 } 333 369 370 INLINE float64 float64_is_infinity(float64 a) 371 { 372 return fpclassify(a) == FP_INFINITE; 373 } 374 375 INLINE float64 float64_is_neg(float64 a) 376 { 377 float64u u; 378 u.f = a; 379 return u.i >> 63; 380 } 381 382 INLINE float64 float64_is_zero(float64 a) 383 { 384 return fpclassify(a) == FP_ZERO; 385 } 386 334 387 INLINE float64 float64_scalbn(float64 a, int n) 335 388 { … … 407 460 int floatx80_compare_quiet( floatx80, floatx80 STATUS_PARAM ); 408 461 int floatx80_is_signaling_nan( floatx80 ); 462 int floatx80_is_nan( floatx80 ); 409 463 410 464 INLINE floatx80 floatx80_abs(floatx80 a) … … 418 472 } 419 473 474 INLINE floatx80 floatx80_is_infinity(floatx80 a) 475 { 476 return fpclassify(a) == FP_INFINITE; 477 } 478 479 INLINE floatx80 floatx80_is_neg(floatx80 a) 480 { 481 floatx80u u; 482 u.f = a; 483 return u.i.high >> 15; 484 } 485 486 INLINE floatx80 floatx80_is_zero(floatx80 a) 487 { 488 return fpclassify(a) == FP_ZERO; 489 } 490 420 491 INLINE floatx80 floatx80_scalbn(floatx80 a, int n) 421 492 {
Note:
See TracChangeset
for help on using the changeset viewer.