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