[llvm-commits] [compiler-rt] r172366 - in /compiler-rt/trunk/lib: cmpdi2.c ucmpdi2.c

Tim Northover Tim.Northover at arm.com
Sun Jan 13 11:18:02 PST 2013


Author: tnorthover
Date: Sun Jan 13 13:18:02 2013
New Revision: 172366

URL: http://llvm.org/viewvc/llvm-project?rev=172366&view=rev
Log:
Implement __aeabi_lcmp and ulcmp

Patch contributed by Andrew Turner.

Modified:
    compiler-rt/trunk/lib/cmpdi2.c
    compiler-rt/trunk/lib/ucmpdi2.c

Modified: compiler-rt/trunk/lib/cmpdi2.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/cmpdi2.c?rev=172366&r1=172365&r2=172366&view=diff
==============================================================================
--- compiler-rt/trunk/lib/cmpdi2.c (original)
+++ compiler-rt/trunk/lib/cmpdi2.c Sun Jan 13 13:18:02 2013
@@ -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
+

Modified: compiler-rt/trunk/lib/ucmpdi2.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/ucmpdi2.c?rev=172366&r1=172365&r2=172366&view=diff
==============================================================================
--- compiler-rt/trunk/lib/ucmpdi2.c (original)
+++ compiler-rt/trunk/lib/ucmpdi2.c Sun Jan 13 13:18:02 2013
@@ -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_ulcmp(di_int a, di_int b)
+{
+	return __ucmpdi2(a, b) - 1;
+}
+#endif
+





More information about the llvm-commits mailing list