ucmpdi2.c 413 B

12345678910111213141516171819
  1. // SPDX-License-Identifier: GPL-2.0
  2. #include "libgcc.h"
  3. word_type __ucmpdi2(DWtype a, DWtype b)
  4. {
  5. const DWunion au = {.ll = a};
  6. const DWunion bu = {.ll = b};
  7. if ((UWtype) au.s.high < (UWtype) bu.s.high)
  8. return 0;
  9. else if ((UWtype) au.s.high > (UWtype) bu.s.high)
  10. return 2;
  11. if ((UWtype) au.s.low < (UWtype) bu.s.low)
  12. return 0;
  13. else if ((UWtype) au.s.low > (UWtype) bu.s.low)
  14. return 2;
  15. return 1;
  16. }