162306a36Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-or-later 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci */ 462306a36Sopenharmony_ci 562306a36Sopenharmony_ci#include <linux/module.h> 662306a36Sopenharmony_ci#include <linux/libgcc.h> 762306a36Sopenharmony_ci 862306a36Sopenharmony_ciword_type notrace __ucmpdi2(unsigned long long a, unsigned long long b) 962306a36Sopenharmony_ci{ 1062306a36Sopenharmony_ci const DWunion au = {.ll = a}; 1162306a36Sopenharmony_ci const DWunion bu = {.ll = b}; 1262306a36Sopenharmony_ci 1362306a36Sopenharmony_ci if ((unsigned int) au.s.high < (unsigned int) bu.s.high) 1462306a36Sopenharmony_ci return 0; 1562306a36Sopenharmony_ci else if ((unsigned int) au.s.high > (unsigned int) bu.s.high) 1662306a36Sopenharmony_ci return 2; 1762306a36Sopenharmony_ci if ((unsigned int) au.s.low < (unsigned int) bu.s.low) 1862306a36Sopenharmony_ci return 0; 1962306a36Sopenharmony_ci else if ((unsigned int) au.s.low > (unsigned int) bu.s.low) 2062306a36Sopenharmony_ci return 2; 2162306a36Sopenharmony_ci return 1; 2262306a36Sopenharmony_ci} 2362306a36Sopenharmony_ciEXPORT_SYMBOL(__ucmpdi2); 24