Back to home page

OSCL-LXR

 
 

    


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