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


Ignore:
Timestamp:
2005-12-20T16:29:19Z (19 years ago)
Author:
Josef Cejka <malyzelenyhnus@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ef0aa999
Parents:
7e557805
Message:

Comparison function for float type added.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • softfloat/generic/comparison.c

    r7e557805 re649dfa  
    5454
    5555/**
    56  * @return 1, if a>b - but NaNs are not recognized
     56 * @return 1, if a<b - but NaNs are not recognized
    5757 */
    5858inline int isFloat32lt(float32 a, float32 b)
     
    6767}
    6868
     69/**
     70 * @return 1, if a>b - but NaNs are not recognized
     71 */
     72inline int isFloat32gt(float32 a, float32 b)
     73{
     74        if (((a.binary| b.binary)&0x7FFFFFFF)==0) {
     75                return 0;
     76        };
     77        a.parts.sign^=a.parts.sign;
     78        b.parts.sign^=b.parts.sign;
     79        return (a.binary>b.binary);
     80                       
     81}
    6982
     83
Note: See TracChangeset for help on using the changeset viewer.