summaryrefslogtreecommitdiffstats
path: root/lib/libc/arm/aeabi/aeabi_double.c
diff options
context:
space:
mode:
authorandrew <andrew@FreeBSD.org>2014-10-22 13:50:38 +0000
committerandrew <andrew@FreeBSD.org>2014-10-22 13:50:38 +0000
commit58b9da93f03431d6fcab3cd00dd912dbb9b13e20 (patch)
tree6bd00b106ee88f162bf7d09fc60afd27155dd062 /lib/libc/arm/aeabi/aeabi_double.c
parenteb3582e16fc01e7c3e10471374605153ea6bd1f2 (diff)
downloadFreeBSD-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.c25
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);
+}
OpenPOWER on IntegriCloud