ucmpdi2.c 435 B

123456789101112131415161718
  1. #include "libgcc.h"
  2. int __ucmpdi2(unsigned long long a, unsigned long long b)
  3. {
  4. const DWunion au = {.ll = a};
  5. const DWunion bu = {.ll = b};
  6. if ((unsigned int)au.s.high < (unsigned int)bu.s.high)
  7. return 0;
  8. else if ((unsigned int)au.s.high > (unsigned int)bu.s.high)
  9. return 2;
  10. if ((unsigned int)au.s.low < (unsigned int)bu.s.low)
  11. return 0;
  12. else if ((unsigned int)au.s.low > (unsigned int)bu.s.low)
  13. return 2;
  14. return 1;
  15. }