Changeset 3212921 in mainline


Ignore:
Timestamp:
2018-03-20T20:23:48Z (7 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
874381a
Parents:
565aaff
Message:

Add aeabi_fcmple

Location:
uspace/lib/softfloat
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/softfloat/comparison.c

    r565aaff r3212921  
    637637}
    638638
     639int __aeabi_fcmple(float32_t a, float32_t b)
     640{
     641        float32_u ua;
     642        ua.val = a;
     643
     644        float32_u ub;
     645        ub.val = b;
     646
     647        if ((is_float32_nan(ua.data)) || (is_float32_nan(ub.data))) {
     648                // TODO: sigNaNs
     649                return 0;
     650        }
     651
     652        if (is_float32_eq(ua.data, ub.data))
     653                return 1;
     654
     655        if (is_float32_lt(ua.data, ub.data))
     656                return 1;
     657
     658        return 0;
     659}
     660
    639661int __aeabi_fcmpeq(float32_t a, float32_t b)
    640662{
  • uspace/lib/softfloat/comparison.h

    r565aaff r3212921  
    9191extern int __aeabi_fcmplt(float32_t, float32_t);
    9292extern int __aeabi_fcmpge(float32_t, float32_t);
     93extern int __aeabi_fcmple(float32_t, float32_t);
    9394extern int __aeabi_fcmpeq(float32_t, float32_t);
    9495#endif
Note: See TracChangeset for help on using the changeset viewer.