Changeset feef1cd in mainline for softfloat/generic/comparison.c


Ignore:
Timestamp:
2006-01-08T19:39:07Z (19 years ago)
Author:
Josef Cejka <malyzelenyhnus@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
56a39dde
Parents:
3af72dc
Message:

Added new function for testint 64 bit floats and functions for 32↔64 bit conversion.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • softfloat/generic/comparison.c

    r3af72dc rfeef1cd  
    3535};
    3636
     37inline int isFloat64NaN(float64 d)
     38{       /* NaN : exp = 0x7ff and nonzero mantisa */
     39        return ((d.parts.exp==0x7FF)&&(d.parts.mantisa));
     40};
     41
    3742inline int isFloat32SigNaN(float32 f)
    3843{       /* SigNaN : exp = 0xff mantisa = 1xxxxx..x (binary), where at least one x is nonzero */
    3944        return ((f.parts.exp==0xFF)&&(f.parts.mantisa>0x400000));
     45};
     46
     47inline int isFloat64SigNaN(float64 d)
     48{       /* SigNaN : exp = 0x7ff mantisa = 1xxxxx..x (binary), where at least one x is nonzero */
     49        return ((d.parts.exp==0x7FF)&&(d.parts.mantisa>0x8000000000000ll));
    4050};
    4151
     
    4555};
    4656
     57inline int isFloat64Infinity(float64 d)
     58{
     59        return ((d.parts.exp==0x7FF)&&(d.parts.mantisa==0x0));
     60};
     61
    4762inline int isFloat32Zero(float32 f)
    4863{
    4964        return (((f.binary) & 0x7FFFFFFF) == 0);
     65}
     66
     67inline int isFloat64Zero(float64 d)
     68{
     69        return (((d.binary) & 0x7FFFFFFFFFFFFFFFll) == 0);
    5070}
    5171
     
    101121
    102122
     123
Note: See TracChangeset for help on using the changeset viewer.