Changeset 36175 in vbox for trunk/src/recompiler/fpu
- Timestamp:
- Mar 4, 2011 4:21:09 PM (14 years ago)
- Location:
- trunk/src/recompiler/fpu
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/recompiler/fpu/softfloat-macros.h
r36170 r36175 591 591 index = ( a>>27 ) & 15; 592 592 if ( aExp & 1 ) { 593 z = 0x4000 + ( a>>17 ) - sqrtOddAdjustments[ index ];593 z = 0x4000 + ( a>>17 ) - sqrtOddAdjustments[ (int)index ]; 594 594 z = ( ( a / z )<<14 ) + ( z<<15 ); 595 595 a >>= 1; 596 596 } 597 597 else { 598 z = 0x8000 + ( a>>17 ) - sqrtEvenAdjustments[ index ];598 z = 0x8000 + ( a>>17 ) - sqrtEvenAdjustments[ (int)index ]; 599 599 z = a / z + z; 600 600 z = ( 0x20000 <= z ) ? 0xFFFF8000 : ( z<<15 ); -
trunk/src/recompiler/fpu/softfloat-native.c
r36170 r36175 3 3 #include "softfloat.h" 4 4 #include <math.h> 5 #if defined(HOST_SOLARIS) 6 #include <fenv.h> 7 #endif 5 8 6 9 void set_float_rounding_mode(int val STATUS_PARAM) 7 10 { 8 11 STATUS(float_rounding_mode) = val; 9 #if defined(_BSD) && !defined(__APPLE__) || (defined(HOST_SOLARIS) && (HOST_SOLARIS < 10 || HOST_SOLARIS == 11)) /* VBOX adds sol 11 */ 12 #if defined(HOST_BSD) && !defined(__APPLE__) || \ 13 (defined(HOST_SOLARIS) && (HOST_SOLARIS < 10 || HOST_SOLARIS == 11)) /* VBOX adds sol 11 */ 10 14 fpsetround(val); 11 15 #elif defined(__arm__) … … 23 27 #endif 24 28 25 #if defined( _BSD) || (defined(HOST_SOLARIS) && HOST_SOLARIS < 10)29 #if defined(HOST_BSD) || (defined(HOST_SOLARIS) && HOST_SOLARIS < 10) 26 30 #define lrint(d) ((int32_t)rint(d)) 27 31 #define llrint(d) ((int64_t)rint(d)) … … 32 36 #define rintf(f) ((float)rint(f)) 33 37 /* Some defines which only apply to *BSD */ 34 # if defined(VBOX) && defined( _BSD)38 # if defined(VBOX) && defined(HOST_BSD) 35 39 # define lrintl(f) ((int32_t)rint(f)) 36 40 # define llrintl(f) ((int64_t)rint(f)) -
trunk/src/recompiler/fpu/softfloat-native.h
r36170 r36175 21 21 */ 22 22 #if defined(HOST_SOLARIS) && (( HOST_SOLARIS <= 9 ) || ((HOST_SOLARIS >= 10) \ 23 && (__GNUC__ < =4))) \23 && (__GNUC__ < 4))) \ 24 24 || (defined(__OpenBSD__) && (OpenBSD < 200811)) 25 25 /* … … 112 112 | Software IEC/IEEE floating-point rounding mode. 113 113 *----------------------------------------------------------------------------*/ 114 #if (defined( _BSD) && !defined(__APPLE__)) || defined(HOST_SOLARIS)114 #if (defined(HOST_BSD) && !defined(__APPLE__)) || defined(HOST_SOLARIS) 115 115 #if defined(__OpenBSD__) 116 116 #define FE_RM FP_RM -
trunk/src/recompiler/fpu/softfloat-specialize.h
r36170 r36175 167 167 } 168 168 else if ( aIsNaN ) { 169 if ( bIsSignalingNaN | ! bIsNaN )169 if ( bIsSignalingNaN || ! bIsNaN ) 170 170 res = av; 171 171 else { … … 302 302 } 303 303 else if ( aIsNaN ) { 304 if ( bIsSignalingNaN | ! bIsNaN )304 if ( bIsSignalingNaN || ! bIsNaN ) 305 305 res = av; 306 306 else { … … 442 442 } 443 443 else if ( aIsNaN ) { 444 if ( bIsSignalingNaN | ! bIsNaN ) return a;444 if ( bIsSignalingNaN || ! bIsNaN ) return a; 445 445 returnLargerSignificand: 446 446 if ( a.low < b.low ) return b; … … 568 568 } 569 569 else if ( aIsNaN ) { 570 if ( bIsSignalingNaN | ! bIsNaN ) return a;570 if ( bIsSignalingNaN || ! bIsNaN ) return a; 571 571 returnLargerSignificand: 572 572 if ( lt128( a.high<<1, a.low, b.high<<1, b.low ) ) return b; -
trunk/src/recompiler/fpu/softfloat.h
r36170 r36175 95 95 #else 96 96 /* native float support */ 97 #if (defined(__i386__) || defined(__x86_64__)) && (!defined( _BSD) || defined(VBOX)) /** @todo VBOX: not correct on windows */97 #if (defined(__i386__) || defined(__x86_64__)) && (!defined(HOST_BSD) || defined(VBOX)) /** @todo VBOX: not correct on windows */ 98 98 #define FLOATX80 99 99 #endif
Note:
See TracChangeset
for help on using the changeset viewer.