1 #ifndef CYGONCE_LIBM_SYS_IEEEFP_H
2 #define CYGONCE_LIBM_SYS_IEEEFP_H
3 //===========================================================================
7 // Definitions specific to IEEE-754 floating-point format
9 //===========================================================================
10 //####ECOSGPLCOPYRIGHTBEGIN####
11 // -------------------------------------------
12 // This file is part of eCos, the Embedded Configurable Operating System.
13 // Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
15 // eCos is free software; you can redistribute it and/or modify it under
16 // the terms of the GNU General Public License as published by the Free
17 // Software Foundation; either version 2 or (at your option) any later version.
19 // eCos is distributed in the hope that it will be useful, but WITHOUT ANY
20 // WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
24 // You should have received a copy of the GNU General Public License along
25 // with eCos; if not, write to the Free Software Foundation, Inc.,
26 // 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
28 // As a special exception, if other files instantiate templates or use macros
29 // or inline functions from this file, or you compile this file and link it
30 // with other works to produce a work based on this file, this file does not
31 // by itself cause the resulting work to be covered by the GNU General Public
32 // License. However the source code for this file must still be made available
33 // in accordance with section (3) of the GNU General Public License.
35 // This exception does not invalidate any other reasons why a work based on
36 // this file might be covered by the GNU General Public License.
38 // Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
39 // at http://sources.redhat.com/ecos/ecos-license/
40 // -------------------------------------------
41 //####ECOSGPLCOPYRIGHTEND####
42 //===========================================================================
43 //#####DESCRIPTIONBEGIN####
45 // Author(s): jlarmour
46 // Contributors: jlarmour
49 // Description: Definitions specific to IEEE-754 floating-point format
50 // Usage: #include <sys/ieeefp.h>
52 //####DESCRIPTIONEND####
54 //===========================================================================
58 #include <pkgconf/libm.h> // Configuration header
60 // Include the Math library?
65 #include <cyg/infra/cyg_type.h> // Common type definitions and support
66 // including endian-ness
68 #if (CYG_BYTEORDER == CYG_MSBFIRST) // Big endian
70 // Note: there do not seem to be any current machines which are Big Endian but
71 // have a mixed up double layout.
83 unsigned int sign : 1;
84 unsigned int exponent: 11;
85 unsigned int fraction0:4;
86 unsigned int fraction1:16;
87 unsigned int fraction2:16;
88 unsigned int fraction3:16;
94 unsigned int sign : 1;
95 unsigned int exponent: 11;
97 unsigned int function0:3;
98 unsigned int function1:16;
99 unsigned int function2:16;
100 unsigned int function3:16;
110 } Cyg_libm_ieee_double_shape_type;
121 unsigned int sign : 1;
122 unsigned int exponent: 8;
123 unsigned int fraction0: 7;
124 unsigned int fraction1: 16;
130 unsigned int exponent:8;
131 unsigned int quiet:1;
132 unsigned int function0:6;
133 unsigned int function1:16;
136 } Cyg_libm_ieee_float_shape_type;
139 #else // Little endian
151 #if (CYG_DOUBLE_BYTEORDER == CYG_MSBFIRST) // Big endian
152 unsigned int fraction1:16;
153 unsigned int fraction0: 4;
154 unsigned int exponent :11;
155 unsigned int sign : 1;
156 unsigned int fraction3:16;
157 unsigned int fraction2:16;
159 unsigned int fraction3:16;
160 unsigned int fraction2:16;
161 unsigned int fraction1:16;
162 unsigned int fraction0: 4;
163 unsigned int exponent :11;
164 unsigned int sign : 1;
170 #if (CYG_DOUBLE_BYTEORDER == CYG_MSBFIRST) // Big endian
171 unsigned int function1:16;
172 unsigned int function0:3;
173 unsigned int quiet:1;
174 unsigned int exponent: 11;
175 unsigned int sign : 1;
176 unsigned int function3:16;
177 unsigned int function2:16;
179 unsigned int function3:16;
180 unsigned int function2:16;
181 unsigned int function1:16;
182 unsigned int function0:3;
183 unsigned int quiet:1;
184 unsigned int exponent: 11;
185 unsigned int sign : 1;
191 #if (CYG_DOUBLE_BYTEORDER == CYG_MSBFIRST) // Big endian
200 } Cyg_libm_ieee_double_shape_type;
211 unsigned int fraction0: 7;
212 unsigned int fraction1: 16;
213 unsigned int exponent: 8;
214 unsigned int sign : 1;
219 unsigned int function1:16;
220 unsigned int function0:6;
221 unsigned int quiet:1;
222 unsigned int exponent:8;
226 } Cyg_libm_ieee_float_shape_type;
228 #endif // little-endian
231 #endif // ifdef CYGPKG_LIBM
233 #endif // CYGONCE_LIBM_SYS_IEEEFP_H multiple inclusion protection