summaryrefslogtreecommitdiffstats
path: root/sys/libkern
diff options
context:
space:
mode:
authorandrew <andrew@FreeBSD.org>2013-01-23 09:18:18 +0000
committerandrew <andrew@FreeBSD.org>2013-01-23 09:18:18 +0000
commit7603324a00835a4c03d8ecf5bd04c10c972d5d8c (patch)
tree41d304b89d536fa3f70bb534a05dcb9e95205bdc /sys/libkern
parent3a9fce047039421aa47d5899ea0662767b2aa7d3 (diff)
downloadFreeBSD-src-7603324a00835a4c03d8ecf5bd04c10c972d5d8c.zip
FreeBSD-src-7603324a00835a4c03d8ecf5bd04c10c972d5d8c.tar.gz
Add __aeabi_ulcmp to allow building of the LINT kernel.
Diffstat (limited to 'sys/libkern')
-rw-r--r--sys/libkern/quad.h5
-rw-r--r--sys/libkern/ucmpdi2.c12
2 files changed, 17 insertions, 0 deletions
diff --git a/sys/libkern/quad.h b/sys/libkern/quad.h
index 5d4f844..4850d89 100644
--- a/sys/libkern/quad.h
+++ b/sys/libkern/quad.h
@@ -110,4 +110,9 @@ u_quad_t __udivdi3(u_quad_t a, u_quad_t b);
u_quad_t __umoddi3(u_quad_t a, u_quad_t b);
int __ucmpdi2(u_quad_t a, u_quad_t b);
+/* ARM EABI support functions. */
+#ifdef __ARM_EABI__
+int __aeabi_ulcmp(unsigned long long, unsigned long long);
+#endif
+
#endif /* !_LIBKERN_QUAD_H_ */
diff --git a/sys/libkern/ucmpdi2.c b/sys/libkern/ucmpdi2.c
index 376d9c4..cd41c69 100644
--- a/sys/libkern/ucmpdi2.c
+++ b/sys/libkern/ucmpdi2.c
@@ -51,3 +51,15 @@ __ucmpdi2(a, b)
return (aa.ul[H] < bb.ul[H] ? 0 : aa.ul[H] > bb.ul[H] ? 2 :
aa.ul[L] < bb.ul[L] ? 0 : aa.ul[L] > bb.ul[L] ? 2 : 1);
}
+
+#ifdef __ARM_EABI__
+/*
+ * Return -1, 0 or 1 as a <, =, > b respectively.
+ */
+int
+__aeabi_ulcmp(unsigned long long a, unsigned long long b)
+{
+ return __ucmpdi2(a, b) - 1;
+}
+#endif
+
OpenPOWER on IntegriCloud