Back to home page

OSCL-LXR

 
 

    


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