^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 <linux/module.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) #include "libgcc.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) word_type __ucmpdi2(unsigned long long a, unsigned long long b)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) const DWunion au = {.ll = a};
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) const DWunion bu = {.ll = b};
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) if ((unsigned int) au.s.high < (unsigned int) bu.s.high)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) else if ((unsigned int) au.s.high > (unsigned int) bu.s.high)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) return 2;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) if ((unsigned int) au.s.low < (unsigned int) bu.s.low)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) else if ((unsigned int) au.s.low > (unsigned int) bu.s.low)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) return 2;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) return 1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) EXPORT_SYMBOL(__ucmpdi2);