1 |
/* IEEE floating point support declarations, for GDB, the GNU Debugger. |
/* IEEE floating point support declarations, for GDB, the GNU Debugger. |
2 |
Copyright 1991, 1994, 1995, 1997, 2000 Free Software Foundation, Inc. |
Copyright 1991, 1994, 1995, 1997, 2000, 2003 Free Software Foundation, Inc. |
3 |
|
|
4 |
This file is part of GDB. |
This file is part of GDB. |
5 |
|
|
61 |
|
|
62 |
unsigned int exp_start; |
unsigned int exp_start; |
63 |
unsigned int exp_len; |
unsigned int exp_len; |
64 |
/* Amount added to "true" exponent. 0x3fff for many IEEE extendeds. */ |
/* Bias added to a "true" exponent to form the biased exponent. It |
65 |
unsigned int exp_bias; |
is intentionally signed as, otherwize, -exp_bias can turn into a |
66 |
|
very large number (e.g., given the exp_bias of 0x3fff and a 64 |
67 |
|
bit long, the equation (long)(1 - exp_bias) evaluates to |
68 |
|
4294950914) instead of -16382). */ |
69 |
|
int exp_bias; |
70 |
/* Exponent value which indicates NaN. This is the actual value stored in |
/* Exponent value which indicates NaN. This is the actual value stored in |
71 |
the float, not adjusted by the exp_bias. This usually consists of all |
the float, not adjusted by the exp_bias. This usually consists of all |
72 |
one bits. */ |
one bits. */ |
80 |
|
|
81 |
/* Internal name for debugging. */ |
/* Internal name for debugging. */ |
82 |
const char *name; |
const char *name; |
83 |
|
|
84 |
|
/* Validator method. */ |
85 |
|
int (*is_valid) PARAMS ((const struct floatformat *fmt, const char *from)); |
86 |
}; |
}; |
87 |
|
|
88 |
/* floatformats for IEEE single and double, big and little endian. */ |
/* floatformats for IEEE single and double, big and little endian. */ |
116 |
Store the double in *TO. */ |
Store the double in *TO. */ |
117 |
|
|
118 |
extern void |
extern void |
119 |
floatformat_to_double PARAMS ((const struct floatformat *, char *, double *)); |
floatformat_to_double PARAMS ((const struct floatformat *, const char *, double *)); |
120 |
|
|
121 |
/* The converse: convert the double *FROM to FMT |
/* The converse: convert the double *FROM to FMT |
122 |
and store where TO points. */ |
and store where TO points. */ |
123 |
|
|
124 |
extern void |
extern void |
125 |
floatformat_from_double PARAMS ((const struct floatformat *, |
floatformat_from_double PARAMS ((const struct floatformat *, |
126 |
double *, char *)); |
const double *, char *)); |
127 |
|
|
128 |
|
/* Return non-zero iff the data at FROM is a valid number in format FMT. */ |
129 |
|
|
130 |
|
extern int |
131 |
|
floatformat_is_valid PARAMS ((const struct floatformat *fmt, const char *from)); |
132 |
|
|
133 |
#endif /* defined (FLOATFORMAT_H) */ |
#endif /* defined (FLOATFORMAT_H) */ |