/*1* arch/score/lib/ucmpdi2.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 __ucmpdi2(unsigned long long a, unsigned long long b)23{24const DWunion au = {.ll = a};25const DWunion bu = {.ll = b};2627if ((unsigned int) au.s.high < (unsigned int) bu.s.high)28return 0;29else if ((unsigned int) au.s.high > (unsigned int) bu.s.high)30return 2;31if ((unsigned int) au.s.low < (unsigned int) bu.s.low)32return 0;33else if ((unsigned int) au.s.low > (unsigned int) bu.s.low)34return 2;35return 1;36}37EXPORT_SYMBOL(__ucmpdi2);383940