Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0-or-later
0002 /*
0003  */
0004 
0005 #include <linux/module.h>
0006 #include <linux/libgcc.h>
0007 
0008 word_type notrace __ucmpdi2(unsigned long long a, unsigned long long b)
0009 {
0010     const DWunion au = {.ll = a};
0011     const DWunion bu = {.ll = b};
0012 
0013     if ((unsigned int) au.s.high < (unsigned int) bu.s.high)
0014         return 0;
0015     else if ((unsigned int) au.s.high > (unsigned int) bu.s.high)
0016         return 2;
0017     if ((unsigned int) au.s.low < (unsigned int) bu.s.low)
0018         return 0;
0019     else if ((unsigned int) au.s.low > (unsigned int) bu.s.low)
0020         return 2;
0021     return 1;
0022 }
0023 EXPORT_SYMBOL(__ucmpdi2);