diff options
author | andrew <andrew@FreeBSD.org> | 2014-10-22 13:50:38 +0000 |
---|---|---|
committer | andrew <andrew@FreeBSD.org> | 2014-10-22 13:50:38 +0000 |
commit | 58b9da93f03431d6fcab3cd00dd912dbb9b13e20 (patch) | |
tree | 6bd00b106ee88f162bf7d09fc60afd27155dd062 /lib/libc/arm/aeabi/aeabi_double.c | |
parent | eb3582e16fc01e7c3e10471374605153ea6bd1f2 (diff) | |
download | FreeBSD-src-58b9da93f03431d6fcab3cd00dd912dbb9b13e20.zip FreeBSD-src-58b9da93f03431d6fcab3cd00dd912dbb9b13e20.tar.gz |
MFC r273088:
Add support for the __aeabi_c*cmp* functions. These are similar to the
existing functions with the exception they use the condition flags to
store the result.
Diffstat (limited to 'lib/libc/arm/aeabi/aeabi_double.c')
-rw-r--r-- | lib/libc/arm/aeabi/aeabi_double.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/libc/arm/aeabi/aeabi_double.c b/lib/libc/arm/aeabi/aeabi_double.c index 274279d..a69e8a7 100644 --- a/lib/libc/arm/aeabi/aeabi_double.c +++ b/lib/libc/arm/aeabi/aeabi_double.c @@ -74,3 +74,28 @@ float64 AEABI_FUNC2(ddiv, float64, float64_div) float64 AEABI_FUNC2(dmul, float64, float64_mul) float64 AEABI_FUNC2(dsub, float64, float64_sub) +int +__aeabi_cdcmpeq_helper(float64 a, float64 b) +{ + int quiet = 0; + + /* Check if a is a NaN */ + if ((a << 1) > 0xffe0000000000000ull) { + /* If it's a signalling NaN we will always signal */ + if ((a & 0x0008000000000000ull) == 0) + return (0); + + quiet = 1; + } + + /* Check if b is a NaN */ + if ((b << 1) > 0xffe0000000000000ull) { + /* If it's a signalling NaN we will always signal */ + if ((b & 0x0008000000000000ull) == 0) + return (0); + + quiet = 1; + } + + return (quiet); +} |