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