summaryrefslogtreecommitdiff
path: root/lib/libm
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>2007-06-01 05:50:57 +0000
committerJason Wright <jason@cvs.openbsd.org>2007-06-01 05:50:57 +0000
commit54245b18b82644328732af41d2e2ac2296d950d6 (patch)
tree1895b452c3d9a570199ca167902f69ce857ea38a /lib/libm
parentec42e67e3ece7b764cc447806ce367beb91df444 (diff)
add little endian and big endian shapes for extended and quad float
Diffstat (limited to 'lib/libm')
-rw-r--r--lib/libm/src/math_private.h44
1 files changed, 43 insertions, 1 deletions
diff --git a/lib/libm/src/math_private.h b/lib/libm/src/math_private.h
index df2c618ed93..2d2c7d8f2c3 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.6 2002/02/16 21:27:27 millert Exp $ */
+/* $OpenBSD: math_private.h,v 1.7 2007/06/01 05:50:56 jason Exp $ */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -50,6 +50,27 @@ typedef union
} parts;
} ieee_double_shape_type;
+typedef union
+{
+ long double value;
+ struct {
+ u_int32_t msw;
+ u_int32_t nsw;
+ u_int32_t lsw;
+ } parts;
+} ieee_extended_shape_type;
+
+typedef union
+{
+ long double value;
+ struct {
+ u_int32_t mswhi;
+ u_int32_t mswlo;
+ u_int32_t lswhi;
+ u_int32_t lswlo;
+ } parts;
+} ieee_quad_shape_type;
+
#endif
#if (BYTE_ORDER == LITTLE_ENDIAN) && !defined(arm32)
@@ -64,6 +85,27 @@ typedef union
} parts;
} ieee_double_shape_type;
+typedef union
+{
+ long double value;
+ struct {
+ u_int32_t lswlo;
+ u_int32_t lswhi;
+ u_int32_t mswlo;
+ u_int32_t mswhi;
+ } parts;
+} ieee_quad_shape_type;
+
+typedef union
+{
+ long double value;
+ struct {
+ u_int32_t lsw;
+ u_int32_t nsw;
+ u_int32_t msw;
+ } parts;
+} ieee_extended_shape_type;
+
#endif
/* Get two 32 bit ints from a double. */