summaryrefslogtreecommitdiffstats
path: root/lib/libm/src
diff options
context:
space:
mode:
authormartynas <martynas@openbsd.org>2011-07-26 11:43:01 +0000
committermartynas <martynas@openbsd.org>2011-07-26 11:43:01 +0000
commit016765a703b5b1e9f563a6ca67e84b5afc03058e (patch)
treec142610c11b4e80ab25a1874462fbd30181598ca /lib/libm/src
parentsync (diff)
downloadwireguard-openbsd-016765a703b5b1e9f563a6ca67e84b5afc03058e.tar.xz
wireguard-openbsd-016765a703b5b1e9f563a6ca67e84b5afc03058e.zip
At some point we've switched to the VFP floating-point--unlike FPA
it actually stores floats in natural-endian--therefore the existing checks became wrong. Take into account __VFP_FP__, effectively bringing back the old behavior. This way it will work now, and in the future when some of our platforms are switched to FPA, where it's much faster.
Diffstat (limited to 'lib/libm/src')
-rw-r--r--lib/libm/src/math_private.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libm/src/math_private.h b/lib/libm/src/math_private.h
index 2abe14a7c62..522d56c6f7b 100644
--- a/lib/libm/src/math_private.h
+++ b/lib/libm/src/math_private.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: math_private.h,v 1.14 2011/07/26 09:24:52 martynas Exp $ */
+/* $OpenBSD: math_private.h,v 1.15 2011/07/26 11:43:01 martynas Exp $ */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -226,7 +226,7 @@ do { \
* big endian.
*/
-#if (BYTE_ORDER == BIG_ENDIAN) || defined(__arm__)
+#if (BYTE_ORDER == BIG_ENDIAN) || (defined(__arm__) && !defined(__VFP_FP__))
typedef union
{
@@ -240,7 +240,7 @@ typedef union
#endif
-#if (BYTE_ORDER == LITTLE_ENDIAN) && !defined(__arm__)
+#if (BYTE_ORDER == LITTLE_ENDIAN) && !(defined(__arm__) && !defined(__VFP_FP__))
typedef union
{