VirtualBox

Changeset 36175 in vbox for trunk/src/recompiler/fpu


Ignore:
Timestamp:
Mar 4, 2011 4:21:09 PM (14 years ago)
Author:
vboxsync
Message:

rem: Synced up to v0.11.1 (35bfc7324e2e6946c4113ada5db30553a1a7c40b) from git://git.savannah.nongnu.org/qemu.git.

Location:
trunk/src/recompiler/fpu
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/recompiler/fpu/softfloat-macros.h

    r36170 r36175  
    591591    index = ( a>>27 ) & 15;
    592592    if ( aExp & 1 ) {
    593         z = 0x4000 + ( a>>17 ) - sqrtOddAdjustments[ index ];
     593        z = 0x4000 + ( a>>17 ) - sqrtOddAdjustments[ (int)index ];
    594594        z = ( ( a / z )<<14 ) + ( z<<15 );
    595595        a >>= 1;
    596596    }
    597597    else {
    598         z = 0x8000 + ( a>>17 ) - sqrtEvenAdjustments[ index ];
     598        z = 0x8000 + ( a>>17 ) - sqrtEvenAdjustments[ (int)index ];
    599599        z = a / z + z;
    600600        z = ( 0x20000 <= z ) ? 0xFFFF8000 : ( z<<15 );
  • trunk/src/recompiler/fpu/softfloat-native.c

    r36170 r36175  
    33#include "softfloat.h"
    44#include <math.h>
     5#if defined(HOST_SOLARIS)
     6#include <fenv.h>
     7#endif
    58
    69void set_float_rounding_mode(int val STATUS_PARAM)
    710{
    811    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 */
    1014    fpsetround(val);
    1115#elif defined(__arm__)
     
    2327#endif
    2428
    25 #if defined(_BSD) || (defined(HOST_SOLARIS) && HOST_SOLARIS < 10)
     29#if defined(HOST_BSD) || (defined(HOST_SOLARIS) && HOST_SOLARIS < 10)
    2630#define lrint(d)                ((int32_t)rint(d))
    2731#define llrint(d)               ((int64_t)rint(d))
     
    3236#define rintf(f)                ((float)rint(f))
    3337/* Some defines which only apply to *BSD */
    34 # if defined(VBOX) && defined(_BSD)
     38# if defined(VBOX) && defined(HOST_BSD)
    3539#  define lrintl(f)            ((int32_t)rint(f))
    3640#  define llrintl(f)           ((int64_t)rint(f))
  • trunk/src/recompiler/fpu/softfloat-native.h

    r36170 r36175  
    2121 */
    2222#if defined(HOST_SOLARIS) && (( HOST_SOLARIS <= 9 ) || ((HOST_SOLARIS >= 10) \
    23                                                         && (__GNUC__ <= 4))) \
     23                                                        && (__GNUC__ < 4))) \
    2424    || (defined(__OpenBSD__) && (OpenBSD < 200811))
    2525/*
     
    112112| Software IEC/IEEE floating-point rounding mode.
    113113*----------------------------------------------------------------------------*/
    114 #if (defined(_BSD) && !defined(__APPLE__)) || defined(HOST_SOLARIS)
     114#if (defined(HOST_BSD) && !defined(__APPLE__)) || defined(HOST_SOLARIS)
    115115#if defined(__OpenBSD__)
    116116#define FE_RM FP_RM
  • trunk/src/recompiler/fpu/softfloat-specialize.h

    r36170 r36175  
    167167    }
    168168    else if ( aIsNaN ) {
    169         if ( bIsSignalingNaN | ! bIsNaN )
     169        if ( bIsSignalingNaN || ! bIsNaN )
    170170            res = av;
    171171        else {
     
    302302    }
    303303    else if ( aIsNaN ) {
    304         if ( bIsSignalingNaN | ! bIsNaN )
     304        if ( bIsSignalingNaN || ! bIsNaN )
    305305            res = av;
    306306        else {
     
    442442    }
    443443    else if ( aIsNaN ) {
    444         if ( bIsSignalingNaN | ! bIsNaN ) return a;
     444        if ( bIsSignalingNaN || ! bIsNaN ) return a;
    445445 returnLargerSignificand:
    446446        if ( a.low < b.low ) return b;
     
    568568    }
    569569    else if ( aIsNaN ) {
    570         if ( bIsSignalingNaN | ! bIsNaN ) return a;
     570        if ( bIsSignalingNaN || ! bIsNaN ) return a;
    571571 returnLargerSignificand:
    572572        if ( lt128( a.high<<1, a.low, b.high<<1, b.low ) ) return b;
  • trunk/src/recompiler/fpu/softfloat.h

    r36170 r36175  
    9595#else
    9696/* 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 */
    9898#define FLOATX80
    9999#endif
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette