aboutsummaryrefslogtreecommitdiff
path: root/lib/cmpdi2.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/cmpdi2.c')
-rw-r--r--lib/cmpdi2.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/cmpdi2.c b/lib/cmpdi2.c
index c2b1f69f4fc2..52634d9c3362 100644
--- a/lib/cmpdi2.c
+++ b/lib/cmpdi2.c
@@ -36,3 +36,16 @@ __cmpdi2(di_int a, di_int b)
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
+