Implement __aeabi_lcmp and ulcmp

Patch contributed by Andrew Turner.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172366 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/cmpdi2.c b/lib/cmpdi2.c
index c2b1f69..52634d9 100644
--- a/lib/cmpdi2.c
+++ b/lib/cmpdi2.c
@@ -36,3 +36,16 @@
         return 2;
     return 1;
 }
+
+#ifdef __ARM_EABI__
+/* Returns: if (a <  b) returns -1
+*           if (a == b) returns  0
+*           if (a >  b) returns  1
+*/
+COMPILER_RT_ABI si_int
+__aeabi_lcmp(di_int a, di_int b)
+{
+	return __cmpdi2(a, b) - 1;
+}
+#endif
+