source: trunk/src/binutils/libiberty/copysign.c@ 915

Last change on this file since 915 was 610, checked in by bird, 22 years ago

This commit was generated by cvs2svn to compensate for changes in r609,
which included commits to RCS files with non-trunk default branches.

  • Property cvs2svn:cvs-rev set to 1.1.1.2
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 2.6 KB
Line 
1#include <ansidecl.h>
2
3#ifdef __IEEE_BIG_ENDIAN
4
5typedef union
6{
7 double value;
8 struct
9 {
10 unsigned int sign : 1;
11 unsigned int exponent: 11;
12 unsigned int fraction0:4;
13 unsigned int fraction1:16;
14 unsigned int fraction2:16;
15 unsigned int fraction3:16;
16
17 } number;
18 struct
19 {
20 unsigned int sign : 1;
21 unsigned int exponent: 11;
22 unsigned int quiet:1;
23 unsigned int function0:3;
24 unsigned int function1:16;
25 unsigned int function2:16;
26 unsigned int function3:16;
27 } nan;
28 struct
29 {
30 unsigned long msw;
31 unsigned long lsw;
32 } parts;
33 long aslong[2];
34} __ieee_double_shape_type;
35
36#endif
37
38#ifdef __IEEE_LITTLE_ENDIAN
39
40typedef union
41{
42 double value;
43 struct
44 {
45#ifdef __SMALL_BITFIELDS
46 unsigned int fraction3:16;
47 unsigned int fraction2:16;
48 unsigned int fraction1:16;
49 unsigned int fraction0: 4;
50#else
51 unsigned int fraction1:32;
52 unsigned int fraction0:20;
53#endif
54 unsigned int exponent :11;
55 unsigned int sign : 1;
56 } number;
57 struct
58 {
59#ifdef __SMALL_BITFIELDS
60 unsigned int function3:16;
61 unsigned int function2:16;
62 unsigned int function1:16;
63 unsigned int function0:3;
64#else
65 unsigned int function1:32;
66 unsigned int function0:19;
67#endif
68 unsigned int quiet:1;
69 unsigned int exponent: 11;
70 unsigned int sign : 1;
71 } nan;
72 struct
73 {
74 unsigned long lsw;
75 unsigned long msw;
76 } parts;
77
78 long aslong[2];
79
80} __ieee_double_shape_type;
81
82#endif
83
84#ifdef __IEEE_BIG_ENDIAN
85typedef union