ucmpdi2.c 501 B

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