* command.c (shell_escape, make_command, _initialze_command):
[deliverable/binutils-gdb.git] / gdb / ieee-float.h
CommitLineData
dd3b648e
RP
1/* IEEE floating point support declarations, for GDB, the GNU Debugger.
2 Copyright (C) 1991 Free Software Foundation, Inc.
3
4This file is part of GDB.
5
99a7de40 6This program is free software; you can redistribute it and/or modify
dd3b648e 7it under the terms of the GNU General Public License as published by
99a7de40
JG
8the Free Software Foundation; either version 2 of the License, or
9(at your option) any later version.
dd3b648e 10
99a7de40 11This program is distributed in the hope that it will be useful,
dd3b648e
RP
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
99a7de40
JG
17along with this program; if not, write to the Free Software
18Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
dd3b648e 19
088c3a0b
JG
20#if !defined (IEEE_FLOAT_H)
21#define IEEE_FLOAT_H 1
22
dd3b648e
RP
23/* Parameters for extended float format: */
24
25struct ext_format {
26 unsigned totalsize; /* Total size of extended number */
27 unsigned signbyte; /* Byte number of sign bit */
28 unsigned char signmask; /* Mask for sign bit */
29 unsigned expbyte_h; /* High byte of exponent */
30 unsigned expbyte_l; /* Low byte of exponent */
31 unsigned manbyte_h; /* High byte of mantissa */
32 unsigned manbyte_l; /* Low byte of mantissa */
33};
34
35#define TOTALSIZE ext_format->totalsize
36#define SIGNBYTE ext_format->signbyte
37#define SIGNMASK ext_format->signmask
38#define EXPBYTE_H ext_format->expbyte_h
39#define EXPBYTE_L ext_format->expbyte_l
40#define MANBYTE_H ext_format->manbyte_h
41#define MANBYTE_L ext_format->manbyte_l
42
43/* Actual ext_format structs for various machines are in the *-tdep.c file
44 for each machine. */
45
46#define EXT_EXP_NAN 0x7FFF /* Exponent value that indicates NaN */
47#define EXT_EXP_BIAS 0x3FFF /* Amount added to "true" exponent for ext */
48#define DBL_EXP_BIAS 0x3FF /* Ditto, for doubles */
49
50/* Convert an IEEE extended float to a double.
51 FROM is the address of the extended float.
52 Store the double in *TO. */
53
54extern void
088c3a0b 55ieee_extended_to_double PARAMS ((const struct ext_format *, char *, double *));
dd3b648e
RP
56
57/* The converse: convert the double *FROM to an extended float
58 and store where TO points. */
59
088c3a0b
JG
60extern void
61double_to_ieee_extended PARAMS ((const struct ext_format *, double *, char *));
62
63#endif /* defined (IEEE_FLOAT_H) */
This page took 0.077327 seconds and 4 git commands to generate.