diff options
author | das <das@FreeBSD.org> | 2012-01-20 06:16:14 +0000 |
---|---|---|
committer | das <das@FreeBSD.org> | 2012-01-20 06:16:14 +0000 |
commit | 6003be2b93b55b2c4ddc36327b2368bfbf1cd580 (patch) | |
tree | ca7e1949c416c8eaa7e890e6031477d283c8ddb9 /lib/libc/softfloat/letf2.c | |
parent | 9386d0d604b43db6adc33e4d48dacd735ccff9fb (diff) | |
download | FreeBSD-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/letf2.c')
-rw-r--r-- | lib/libc/softfloat/letf2.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/libc/softfloat/letf2.c b/lib/libc/softfloat/letf2.c new file mode 100644 index 0000000..e9a18f8 --- /dev/null +++ b/lib/libc/softfloat/letf2.c @@ -0,0 +1,26 @@ +/* $NetBSD: letf2.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 __letf2(float128, float128); + +flag +__letf2(float128 a, float128 b) +{ + + /* libgcc1.c says 1 - (a <= b) */ + return 1 - float128_le(a, b); +} + +#endif /* FLOAT128 */ |