VirtualBox

Ignore:
Timestamp:
Mar 4, 2011 12:49:02 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
70361
Message:

rem: synced up to svn://svn.savannah.nongnu.org/qemu/trunk@6686 (repo UUID c046a42c-6fe2-441c-8c8c-71466251a162).

File:
1 edited

Legend:

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

    r36140 r36170  
    99#endif
    1010
    11 #ifdef __OpenBSD__
    12 /* Get OpenBSD version number */
     11#if defined(__OpenBSD__) || defined(__NetBSD__)
    1312#include <sys/param.h>
    1413#endif
     
    3635#endif
    3736
     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
    3856#define isnormal(x)             (fpclass(x) >= FP_NZERO)
    3957#define isgreater(x, y)         ((!unordered(x, y)) && ((x) > (y)))
     
    123141
    124142typedef struct float_status {
    125     signed char float_rounding_mode;
    126 #ifdef FLOATX80
    127     signed char floatx80_rounding_precision;
     143    int float_rounding_mode;
     144#ifdef FLOATX80
     145    int floatx80_rounding_precision;
    128146#endif
    129147} float_status;
     
    229247int float32_compare_quiet( float32, float32 STATUS_PARAM );
    230248int float32_is_signaling_nan( float32 );
     249int float32_is_nan( float32 );
    231250
    232251INLINE float32 float32_abs(float32 a)
     
    238257{
    239258    return -a;
     259}
     260
     261INLINE float32 float32_is_infinity(float32 a)
     262{
     263    return fpclassify(a) == FP_INFINITE;
     264}
     265
     266INLINE float32 float32_is_neg(float32 a)
     267{
     268    float32u u;
     269    u.f = a;
     270    return u.i >> 31;
     271}
     272
     273INLINE float32 float32_is_zero(float32 a)
     274{
     275    return fpclassify(a) == FP_ZERO;
    240276}
    241277
     
    332368}
    333369
     370INLINE float64 float64_is_infinity(float64 a)
     371{
     372    return fpclassify(a) == FP_INFINITE;
     373}
     374
     375INLINE float64 float64_is_neg(float64 a)
     376{
     377    float64u u;
     378    u.f = a;
     379    return u.i >> 63;
     380}
     381
     382INLINE float64 float64_is_zero(float64 a)
     383{
     384    return fpclassify(a) == FP_ZERO;
     385}
     386
    334387INLINE float64 float64_scalbn(float64 a, int n)
    335388{
     
    407460int floatx80_compare_quiet( floatx80, floatx80 STATUS_PARAM );
    408461int floatx80_is_signaling_nan( floatx80 );
     462int floatx80_is_nan( floatx80 );
    409463
    410464INLINE floatx80 floatx80_abs(floatx80 a)
     
    418472}
    419473
     474INLINE floatx80 floatx80_is_infinity(floatx80 a)
     475{
     476    return fpclassify(a) == FP_INFINITE;
     477}
     478
     479INLINE floatx80 floatx80_is_neg(floatx80 a)
     480{
     481    floatx80u u;
     482    u.f = a;
     483    return u.i.high >> 15;
     484}
     485
     486INLINE floatx80 floatx80_is_zero(floatx80 a)
     487{
     488    return fpclassify(a) == FP_ZERO;
     489}
     490
    420491INLINE floatx80 floatx80_scalbn(floatx80 a, int n)
    421492{
Note: See TracChangeset for help on using the changeset viewer.

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