diff --git a/[refs] b/[refs] index 312e2251f963..7d0980c71621 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 774583f8bcfbdc423e51cb8b924d8c6cea4afbac +refs/heads/master: df6b106bf01a17a157013245c2851dec4d7b5a2b diff --git a/trunk/arch/mips/lib/Makefile b/trunk/arch/mips/lib/Makefile index d7d3b14dcfb2..5dad13efba7e 100644 --- a/trunk/arch/mips/lib/Makefile +++ b/trunk/arch/mips/lib/Makefile @@ -9,4 +9,4 @@ obj-y += iomap.o obj-$(CONFIG_PCI) += iomap-pci.o # libgcc-style stuff needed in the kernel -lib-y += ashldi3.o ashrdi3.o lshrdi3.o +lib-y += ashldi3.o ashrdi3.o lshrdi3.o ucmpdi2.o diff --git a/trunk/arch/mips/lib/ucmpdi2.c b/trunk/arch/mips/lib/ucmpdi2.c new file mode 100644 index 000000000000..e9ff258ef028 --- /dev/null +++ b/trunk/arch/mips/lib/ucmpdi2.c @@ -0,0 +1,19 @@ +#include + +#include "libgcc.h" + +word_type __ucmpdi2 (unsigned long a, unsigned long b) +{ + const DWunion au = {.ll = a}; + const DWunion bu = {.ll = b}; + + if ((unsigned int) au.s.high < (unsigned int) bu.s.high) + return 0; + else if ((unsigned int) au.s.high > (unsigned int) bu.s.high) + return 2; + if ((unsigned int) au.s.low < (unsigned int) bu.s.low) + return 0; + else if ((unsigned int) au.s.low > (unsigned int) bu.s.low) + return 2; + return 1; +}