/[gnats]/gnats/include/floatformat.h
ViewVC logotype

Diff of /gnats/include/floatformat.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1.1.1 by brendan, Thu Nov 5 19:54:17 1998 UTC revision 1.2 by chewie, Sat Nov 13 05:14:17 2004 UTC
# Line 1  Line 1 
1  /* IEEE floating point support declarations, for GDB, the GNU Debugger.  /* IEEE floating point support declarations, for GDB, the GNU Debugger.
2     Copyright (C) 1991 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    
# Line 61  struct floatformat Line 61  struct floatformat
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.  */
# Line 73  struct floatformat Line 77  struct floatformat
77    
78    /* Is the integer bit explicit or implicit?  */    /* Is the integer bit explicit or implicit?  */
79    enum floatformat_intbit intbit;    enum floatformat_intbit intbit;
80    
81      /* Internal name for debugging. */
82      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.  */
# Line 92  extern const struct floatformat floatfor Line 102  extern const struct floatformat floatfor
102  extern const struct floatformat floatformat_m68881_ext;  extern const struct floatformat floatformat_m68881_ext;
103  extern const struct floatformat floatformat_i960_ext;  extern const struct floatformat floatformat_i960_ext;
104  extern const struct floatformat floatformat_m88110_ext;  extern const struct floatformat floatformat_m88110_ext;
105  extern const struct floatformat floatformat_arm_ext;  extern const struct floatformat floatformat_m88110_harris_ext;
106    extern const struct floatformat floatformat_arm_ext_big;
107    extern const struct floatformat floatformat_arm_ext_littlebyte_bigword;
108    /* IA-64 Floating Point register spilt into memory.  */
109    extern const struct floatformat floatformat_ia64_spill_big;
110    extern const struct floatformat floatformat_ia64_spill_little;
111    extern const struct floatformat floatformat_ia64_quad_big;
112    extern const struct floatformat floatformat_ia64_quad_little;
113    
114  /* Convert from FMT to a double.  /* Convert from FMT to a double.
115     FROM is the address of the extended float.     FROM is the address of the extended float.
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) */

Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26