/*1* arch/score/lib/cmpdi2.c2*3* This program is free software; you can redistribute it and/or modify4* it under the terms of the GNU General Public License as published by5* the Free Software Foundation; either version 2 of the License, or6* (at your option) any later version.7*8* This program is distributed in the hope that it will be useful,9* but WITHOUT ANY WARRANTY; without even the implied warranty of10* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the11* GNU General Public License for more details.12*13* You should have received a copy of the GNU General Public License14* along with this program; if not, see the file COPYING, or write15* to the Free Software Foundation, Inc.,16* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA17*/1819#include <linux/module.h>20#include "libgcc.h"2122word_type __cmpdi2(long long a, long long b)23{24const DWunion au = {25.ll = a26};27const DWunion bu = {28.ll = b29};3031if (au.s.high < bu.s.high)32return 0;33else if (au.s.high > bu.s.high)34return 2;3536if ((unsigned int) au.s.low < (unsigned int) bu.s.low)37return 0;38else if ((unsigned int) au.s.low > (unsigned int) bu.s.low)39return 2;4041return 1;42}43EXPORT_SYMBOL(__cmpdi2);444546