1*d64af918SMichal Simek #include <linux/export.h> 2eecb2072SMichal Simek 3eecb2072SMichal Simek #include "libgcc.h" 4eecb2072SMichal Simek 5eecb2072SMichal Simek word_type __cmpdi2(long long a, long long b) 6eecb2072SMichal Simek { 7eecb2072SMichal Simek const DWunion au = { 8eecb2072SMichal Simek .ll = a 9eecb2072SMichal Simek }; 10eecb2072SMichal Simek const DWunion bu = { 11eecb2072SMichal Simek .ll = b 12eecb2072SMichal Simek }; 13eecb2072SMichal Simek 14eecb2072SMichal Simek if (au.s.high < bu.s.high) 15eecb2072SMichal Simek return 0; 16eecb2072SMichal Simek else if (au.s.high > bu.s.high) 17eecb2072SMichal Simek return 2; 18eecb2072SMichal Simek 19eecb2072SMichal Simek if ((unsigned int) au.s.low < (unsigned int) bu.s.low) 20eecb2072SMichal Simek return 0; 21eecb2072SMichal Simek else if ((unsigned int) au.s.low > (unsigned int) bu.s.low) 22eecb2072SMichal Simek return 2; 23eecb2072SMichal Simek 24eecb2072SMichal Simek return 1; 25eecb2072SMichal Simek } 26eecb2072SMichal Simek EXPORT_SYMBOL(__cmpdi2); 27