summaryrefslogtreecommitdiffstats
path: root/lib/libc/softfloat/getf2.c
diff options
context:
space:
mode:
authordas <das@FreeBSD.org>2012-01-20 06:16:14 +0000
committerdas <das@FreeBSD.org>2012-01-20 06:16:14 +0000
commit6003be2b93b55b2c4ddc36327b2368bfbf1cd580 (patch)
treeca7e1949c416c8eaa7e890e6031477d283c8ddb9 /lib/libc/softfloat/getf2.c
parent9386d0d604b43db6adc33e4d48dacd735ccff9fb (diff)
downloadFreeBSD-src-6003be2b93b55b2c4ddc36327b2368bfbf1cd580.zip
FreeBSD-src-6003be2b93b55b2c4ddc36327b2368bfbf1cd580.tar.gz
Merge in the latest SoftFloat changes from NetBSD. (NetBSD isn't the
original vendor, but we're using their heavily modified version.) This brings in functions for long double emulation (both extended and quad formats), which may be useful for testing, and also for replacing libc/sparc64/fpu/.
Diffstat (limited to 'lib/libc/softfloat/getf2.c')
-rw-r--r--lib/libc/softfloat/getf2.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/libc/softfloat/getf2.c b/lib/libc/softfloat/getf2.c
new file mode 100644
index 0000000..8639c4d
--- /dev/null
+++ b/lib/libc/softfloat/getf2.c
@@ -0,0 +1,26 @@
+/* $NetBSD: getf2.c,v 1.1 2011/01/17 10:08:35 matt Exp $ */
+
+/*
+ * Written by Matt Thomas, 2011. This file is in the Public Domain.
+ */
+
+#include "softfloat-for-gcc.h"
+#include "milieu.h"
+#include "softfloat.h"
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#ifdef FLOAT128
+
+flag __getf2(float128, float128);
+
+flag
+__getf2(float128 a, float128 b)
+{
+
+ /* libgcc1.c says (a >= b) - 1 */
+ return float128_le(b, a) - 1;
+}
+
+#endif /* FLOAT128 */
OpenPOWER on IntegriCloud