cmpdi2.c 443 B

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