]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - arch/mips/lib/cmpdi2.c
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[mirror_ubuntu-bionic-kernel.git] / arch / mips / lib / cmpdi2.c
CommitLineData
b2441318 1// SPDX-License-Identifier: GPL-2.0
527581b9 2#include <linux/export.h>
2704afeb
RB
3
4#include "libgcc.h"
5
aedcfbe0 6word_type notrace __cmpdi2(long long a, long long b)
2704afeb
RB
7{
8 const DWunion au = {
9 .ll = a
10 };
11 const DWunion bu = {
12 .ll = b
13 };
14
15 if (au.s.high < bu.s.high)
16 return 0;
17 else if (au.s.high > bu.s.high)
18 return 2;
19
20 if ((unsigned int) au.s.low < (unsigned int) bu.s.low)
21 return 0;
22 else if ((unsigned int) au.s.low > (unsigned int) bu.s.low)
23 return 2;
24
25 return 1;
26}
27
28EXPORT_SYMBOL(__cmpdi2);