diff options
author | Per Bothner <per@bothner.com> | 1993-03-18 22:00:09 +0000 |
---|---|---|
committer | Per Bothner <per@bothner.com> | 1993-03-18 22:00:09 +0000 |
commit | d7e1be4659dd730664b8948e99a3e8dff707b660 (patch) | |
tree | 48f491d1801259a2401425016d364fcd9fcbb2e4 | |
parent | caba7dbe7f8c5d424c4a91d8a8d55368e32868b5 (diff) | |
download | gdb-d7e1be4659dd730664b8948e99a3e8dff707b660.zip gdb-d7e1be4659dd730664b8948e99a3e8dff707b660.tar.gz gdb-d7e1be4659dd730664b8948e99a3e8dff707b660.tar.bz2 |
* ieee-float.h: Moved from ../gdb.
* dis-asm.h: New file. Interface to dis-assembler.
-rw-r--r-- | include/.Sanitize | 2 | ||||
-rw-r--r-- | include/ChangeLog | 5 | ||||
-rw-r--r-- | include/dis-asm.h | 32 | ||||
-rw-r--r-- | include/ieee-float.h | 65 |
4 files changed, 104 insertions, 0 deletions
diff --git a/include/.Sanitize b/include/.Sanitize index 4415673..a4a3146 100644 --- a/include/.Sanitize +++ b/include/.Sanitize @@ -33,12 +33,14 @@ bfd.h bout.h coff demangle.h +dis-asm.h elf fopen-bin.h fopen-same.h gdbm.h getopt.h ieee.h +ieee-float.h oasys.h obstack.h opcode diff --git a/include/ChangeLog b/include/ChangeLog index 21d7391..c3d40e9 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,8 @@ +Thu Mar 18 13:49:09 1993 Per Bothner (bothner@rtl.cygnus.com) + + * ieee-float.h: Moved from ../gdb. + * dis-asm.h: New file. Interface to dis-assembler. + Thu Mar 11 10:52:57 1993 Fred Fish (fnf@cygnus.com) * demangle.h (DMGL_NO_OPTS): Add define (set to 0) to use diff --git a/include/dis-asm.h b/include/dis-asm.h new file mode 100644 index 0000000..d229924 --- /dev/null +++ b/include/dis-asm.h @@ -0,0 +1,32 @@ +#include <stdio.h> +#include "ansidecl.h" +#include "bfd.h" + +typedef int (*fprintf_ftype) PARAMS((FILE*, const char*, ...)); + +typedef struct disassemble_info { + fprintf_ftype fprintf_func; + FILE *stream; + int flags; +} disassemble_info; + +typedef int (*disassembler_ftype) + PARAMS((bfd_vma, bfd_byte *, disassemble_info *)); + +#define INIT_DISASSEMBLE_INFO(INFO, STREAM) \ + INFO.fprintf_func = (fprintf_ftype)fprintf, \ + INFO.stream = (STREAM) + +#define GDB_INIT_DISASSEMBLE_INFO(INFO, STREAM) \ + INFO.fprintf_func = (fprintf_ftype)fprintf_filtered, \ + INFO.stream = (STREAM) + +/* Standard dis-assemblers. */ + +extern int print_insn_big_mips PARAMS ((bfd_vma, bfd_byte*,disassemble_info*)); +extern int print_insn_little_mips + PARAMS ((bfd_vma,bfd_byte*,disassemble_info*)); +extern int print_insn_i386 PARAMS ((bfd_vma,bfd_byte*,disassemble_info*)); +extern int print_insn_m68k PARAMS ((bfd_vma,bfd_byte*,disassemble_info*)); +extern int print_insn_z8001 PARAMS ((bfd_vma,bfd_byte*,disassemble_info*)); +extern int print_insn_z8002 PARAMS ((bfd_vma,bfd_byte*,disassemble_info*)); diff --git a/include/ieee-float.h b/include/ieee-float.h new file mode 100644 index 0000000..68ef23b --- /dev/null +++ b/include/ieee-float.h @@ -0,0 +1,65 @@ +/* IEEE floating point support declarations, for GDB, the GNU Debugger. + Copyright (C) 1991 Free Software Foundation, Inc. + +This file is part of GDB. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + +#if !defined (IEEE_FLOAT_H) +#define IEEE_FLOAT_H 1 + +#include "ansidecl.h" + +/* Parameters for extended float format: */ + +struct ext_format { + unsigned totalsize; /* Total size of extended number */ + unsigned signbyte; /* Byte number of sign bit */ + unsigned char signmask; /* Mask for sign bit */ + unsigned expbyte_h; /* High byte of exponent */ + unsigned expbyte_l; /* Low byte of exponent */ + unsigned manbyte_h; /* High byte of mantissa */ + unsigned manbyte_l; /* Low byte of mantissa */ +}; + +#define TOTALSIZE ext_format->totalsize +#define SIGNBYTE ext_format->signbyte +#define SIGNMASK ext_format->signmask +#define EXPBYTE_H ext_format->expbyte_h +#define EXPBYTE_L ext_format->expbyte_l +#define MANBYTE_H ext_format->manbyte_h +#define MANBYTE_L ext_format->manbyte_l + +/* Actual ext_format structs for various machines are in the *-tdep.c file + for each machine. */ + +#define EXT_EXP_NAN 0x7FFF /* Exponent value that indicates NaN */ +#define EXT_EXP_BIAS 0x3FFF /* Amount added to "true" exponent for ext */ +#define DBL_EXP_BIAS 0x3FF /* Ditto, for doubles */ + +/* Convert an IEEE extended float to a double. + FROM is the address of the extended float. + Store the double in *TO. */ + +extern void +ieee_extended_to_double PARAMS ((const struct ext_format *, char *, double *)); + +/* The converse: convert the double *FROM to an extended float + and store where TO points. */ + +extern void +double_to_ieee_extended PARAMS ((const struct ext_format *, double *, char *)); + +#endif /* defined (IEEE_FLOAT_H) */ |