Merge tag 'sched-urgent-2020-12-27' of git://git.kernel.org/pub/scm/linux/kernel...
[linux/fpc-iii.git] / arch / microblaze / lib / cmpdi2.c
blobb3f89638518c92c28bcfa83ca928266df2a82f34
1 // SPDX-License-Identifier: GPL-2.0
2 #include <linux/export.h>
4 #include "libgcc.h"
6 word_type __cmpdi2(long long a, long long b)
8 const DWunion au = {
9 .ll = a
11 const DWunion bu = {
12 .ll = b
15 if (au.s.high < bu.s.high)
16 return 0;
17 else if (au.s.high > bu.s.high)
18 return 2;
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;
25 return 1;
27 EXPORT_SYMBOL(__cmpdi2);