summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/ChangeLog186
-rw-r--r--include/ansidecl.h40
-rw-r--r--include/bfdlink.h7
-rw-r--r--include/bin-bugs.h3
-rw-r--r--include/coff/ChangeLog16
-rw-r--r--include/coff/arm.h21
-rw-r--r--include/coff/internal.h2
-rw-r--r--include/coff/mipspe.h223
-rw-r--r--include/coff/pe.h14
-rw-r--r--include/coff/sh.h38
-rw-r--r--include/dis-asm.h13
-rw-r--r--include/elf/ChangeLog31
-rw-r--r--include/elf/avr.h58
-rw-r--r--include/elf/common.h15
-rw-r--r--include/elf/i370.h46
-rw-r--r--include/elf/mips.h6
-rw-r--r--include/elf/sh.h27
-rw-r--r--include/hashtab.h128
-rw-r--r--include/hp-symtab.h11
-rw-r--r--include/libiberty.h55
-rw-r--r--include/obstack.h18
-rw-r--r--include/opcode/ChangeLog61
-rw-r--r--include/opcode/cgen.h15
-rw-r--r--include/opcode/d30v.h84
-rw-r--r--include/opcode/i370.h265
-rw-r--r--include/opcode/i386.h150
-rw-r--r--include/opcode/mips.h13
-rw-r--r--include/partition.h81
-rw-r--r--include/remote-sim.h52
-rw-r--r--include/splay-tree.h9
-rw-r--r--include/symcat.h4
-rw-r--r--include/wait.h63
32 files changed, 249 insertions, 1506 deletions
diff --git a/include/ChangeLog b/include/ChangeLog
index cb15edca0..386ad16e3 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,73 +1,3 @@
-2000-03-27 Denis Chertykov <denisc@overta.ru>
-
- * dis-asm.h (print_insn_avr): Declare.
-
-2000-03-14 Bernd Schmidt <bernds@cygnus.co.uk>
-
- * hashtab.h (htab_trav): Modify type so that first arg is of type
- void **.
- (htab_find_with_hash, htab_find_slot_with_hash): Declare new
- functions.
-
-2000-03-09 Alex Samuel <samuel@codesourcery.com>
-
- * partition.h: New file.
-
-2000-03-09 Zack Weinberg <zack@wolery.cumb.org>
-
- * hashtab.h (struct htab): Add del_f.
- (htab_del): New type.
- (htab_create): Add fourth argument.
-
-2000-03-08 Zack Weinberg <zack@wolery.cumb.org>
-
- * hashtab.h (hash_table_t): Rename to htab_t.
- (struct hash_table): Rename to struct htab. Shorten element
- names. Reorder elements by size.
- (htab_hash, htab_eq, htab_trav): New typedefs for the callback
- function pointers.
- (hash_table_entry_t): Discard; just use void * for element
- type.
-
-2000-03-01 H.J. Lu <hjl@gnu.org>
-
- * bfdlink.h (bfd_link_callbacks): Add a boolean arg to
- the undefined_symbol callback.
-
-2000-02-23 Linas Vepstas <linas@linas.org>
-
- * dis-asm.h (print_insn_i370): Declare.
-
-2000-02-22 Chandra Chavva <cchavva@cygnus.com>
-
- * opcode/d30v.h (FLAG_NOT_WITH_ADDSUBppp): Redefined as operation
- cannot be combined in parallel with ADD/SUBppp.
-
-Tue Feb 22 15:19:54 2000 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote-sim.h (sim_trace): Document return values.
- (sim_set_trace): Declare. Deprecate.
-
-2000-02-21 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * dis-asm.h (struct disassemble_info): Change `length' param of
- read_memory_func to unsigned. Change type of `buffer_length' and
- `octets_per_byte' to unsigned.
- (buffer_read_memory): Change `length' param to unsigned.
-
-2000-02-16 Nick Clifton <nickc@cygnus.com>
-
- * dis-asm.h: Add prototypes for ARM register name functions.
-
-Wed Feb 9 18:45:49 2000 Andrew Cagney <cagney@b1.cygnus.com>
-
- * wait.h: Delete. No longer used by GDB.
-
-Tue Feb 8 17:01:13 2000 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote-sim.h (sim_resume): Clarify use of SIGGNAL.
- (sim_stop_reason): Clarify meaning of sim_signalled.
-
2000-02-03 Timothy Wall <twall@redhat.com>
* dis-asm.h (struct disassemble_info): Added octets_per_byte
@@ -77,113 +7,25 @@ Tue Feb 8 17:01:13 2000 Andrew Cagney <cagney@b1.cygnus.com>
* dis-asm.h: Add prototype for disassembler_usage().
Add prototype for arm_disassembler_options().
- Remove prototype for arm_toggle_regnames().
+ Remvoe prototype for arm_toggle_regnames().
Add prototype for parse_arm_disassembler_option().
-Sat Jan 1 19:06:52 2000 Hans-Peter Nilsson <hp@bitrange.com>
-
- * symcat.h (STRINGX) [!__STDC__ || ALMOST_STDC]: Change "?" to "s"
- to stringify argument s.
-
-Wed Dec 15 11:22:56 1999 Jeffrey A Law (law@cygnus.com)
-
- * hp-symtab.h (HP_LANGUAGE_FORTRAN): New enumeration constant.
- (HP_LANGUAGE_F77): Define using HP_LANGUAGE_FORTRAN.
-
1999-12-15 Doug Evans <dje@transmeta.com>
* dis-asm.h: Enclose in extern "C" ifdef __cplusplus.
-1999-12-05 Mark Mitchell <mark@codesourcery.com>
-
- * splay-tree.h (struct splay_tree_node): Rename to ...
- (struct splay_tree_node_s): ... this.
- (struct splay_tree): Rename to ...
- (struct splay_tree_s): ... this.
-
-1999-11-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * ansidecl.h (ATTRIBUTE_MALLOC): New macro.
-
- * libiberty.h (buildargv, dupargv, concat, choose_temp_base,
- make_temp_file, xmalloc, xcalloc, xstrdup, xmemdup): Add
- ATTRIBUTE_MALLOC.
- (xatexit): Remove __GNUC__ check, add ATTRIBUTE_NORETURN.
-
-1999-11-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * libiberty.h: Include stdarg.h when ANSI_PROTOTYPES is defined.
- (asprintf, vasprintf): Provide declarations.
-
-Wed Nov 10 12:43:21 1999 Philippe De Muyter <phdm@macqel.be>
- Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * ansidecl.h: Define and test `GCC_VERSION', not `HAVE_GCC_VERSION'.
-
-1999-11-04 Jimmy Guo <guo@cup.hp.com>
-
- * hp-symtab.h (dntt_type_fparam): Add doc_ranges, misc_kind
- fields, change location type to CORE_ADDR from int.
- (dntt_type_const): Name the 5th field location_type.
-
Sun Oct 24 19:11:32 1999 Andrew Cagney <cagney@b1.cygnus.com>
* sim-d10v.h (SIM_D10V_TS2_DMAP_REGNUM): Define.
-1999-10-23 08:51 -0700 Zack Weinberg <zack@bitmover.com>
-
- * hashtab.h: Give hash_table_t a struct tag. Add prototypes
- for clear_hash_table_slot and traverse_hash_table. Correct
- prototype of all_hash_table_collisions.
-
Sat Oct 23 19:00:13 1999 Andrew Cagney <cagney@b1.cygnus.com>
* sim-d10v.h: New file.
-Fri Oct 15 01:47:51 1999 Vladimir Makarov <vmakarov@loony.cygnus.com>
-
- * hashtab.h: New file.
-
-1999-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * ansidecl.h (HAVE_GCC_VERSION): New macro. Use it instead of
- explicitly testing __GNUC__ and __GNUC_MINOR__.
-
- (ATTRIBUTE_PRINTF): Use `__format__', not `format'.
-
-1999-09-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * libiberty.h (make_temp_file): Add a prototype.
-
-Tue Sep 14 00:35:02 1999 Marc Espie <espie@cvs.openbsd.org>
-
- * libiberty.h (basename): OpenBSD has a correct prototype.
- (xrealloc): Remove outdated comment.
-
-1999-09-07 Jeff Garzik <jgarzik@pobox.com>
-
- * libiberty.h (xmemdup): Add prototype for new function.
-
1999-09-04 Steve Chamberlain <sac@pobox.com>
* dis-asm.h (print_insn_pj): Declare.
-1999-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * obstack.h (obstack_grow, obstack_grow0): Move (char*) casts
- in calls to `_obstack_memcpy' from here ...
-
- (_obstack_memcpy): ... to here, except in the __STDC__ case which
- doesn't need it.
-
-1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * libiberty.h (getpwd): Prototype.
-
-1999-08-01 Mark Mitchell <mark@codesourcery.com>
-
- * splay-tree.h (splay_tree_insert): Return the new node.
-
1999-07-11 Ian Lance Taylor <ian@zembu.com>
* ansidecl.h: Copy attribute support macros from egcs.
@@ -265,18 +107,18 @@ Tue Dec 8 00:30:31 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
from FILE* to void*, for use with gdb's new type GDB_FILE.
(fprintf_ftype): change FILE* parameter type to void*.
- * demangle.h: (DMGL_EDG): new macro for Kuck and Associates
- (DMGL_STYLE_MASK): modify to include Kuck and Assoc style
- (demangling_styles): add new edg_demangling style
- (EDG_DEMANGLING_STYLE_STRING): new macro
- (EDG_DEMANGLING): new macro
+ * demangle.h: (DMGL_EDG): new macro for Kuck and Associates
+ (DMGL_STYLE_MASK): modify to include Kuck and Assoc style
+ (demangling_styles): add new edg_demangling style
+ (EDG_DEMANGLING_STYLE_STRING): new macro
+ (EDG_DEMANGLING): new macro
- * demangle.h (DMGL_HP): new macro, for HP/aCC compiler.
- (DMGL_STYLE_MASK): modify to include new HP's style.
- (demangling_styles): add new hp_demangling value.
- (HP_DEMANGLING_STYLE_STRING): new macro.
- (ARM_DEMANGLING): coerce to int.
- (HP_DEMANGLING): new macro.
+ * demangle.h (DMGL_HP): new macro, for HP/aCC compiler.
+ (DMGL_STYLE_MASK): modify to include new HP's style.
+ (demangling_styles): add new hp_demangling value.
+ (HP_DEMANGLING_STYLE_STRING): new macro.
+ (ARM_DEMANGLING): coerce to int.
+ (HP_DEMANGLING): new macro.
* hp-symtab.h: rewritten, from HP.
(quick_procedure): change type of language field to unsigned int
@@ -1000,8 +842,8 @@ Thu Apr 28 19:06:50 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
Fri Apr 1 00:38:17 1994 Jim Wilson (wilson@mole.gnu.ai.mit.edu)
- * obstack.h: Delete use of IN_GCC to control whether
- stddef.h or gstddef.h is included.
+ * obstack.h: Delete use of IN_GCC to control whether
+ stddef.h or gstddef.h is included.
Tue Mar 22 13:06:02 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
diff --git a/include/ansidecl.h b/include/ansidecl.h
index 10308676f..989dd6778 100644
--- a/include/ansidecl.h
+++ b/include/ansidecl.h
@@ -160,48 +160,20 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#endif /* ANSI C. */
-/* Using MACRO(x,y) in cpp #if conditionals does not work with some
- older preprocessors. Thus we can't define something like this:
-
-#define HAVE_GCC_VERSION(MAJOR, MINOR) \
- (__GNUC__ > (MAJOR) || (__GNUC__ == (MAJOR) && __GNUC_MINOR__ >= (MINOR)))
-
-and then test "#if HAVE_GCC_VERSION(2,7)".
-
-So instead we use the macro below and test it against specific values. */
-
-/* This macro simplifies testing whether we are using gcc, and if it
- is of a particular minimum version. (Both major & minor numbers are
- significant.) This macro will evaluate to 0 if we are not using
- gcc at all. */
-#ifndef GCC_VERSION
-#define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
-#endif /* GCC_VERSION */
-
/* Define macros for some gcc attributes. This permits us to use the
macros freely, and know that they will come into play for the
version of gcc in which they are supported. */
-#if (GCC_VERSION < 2007)
+#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
# define __attribute__(x)
#endif
-/* Attribute __malloc__ on functions was valid as of gcc 2.96. */
-#ifndef ATTRIBUTE_MALLOC
-# if (GCC_VERSION >= 2096)
-# define ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
-# else
-# define ATTRIBUTE_MALLOC
-# endif /* GNUC >= 2.96 */
-#endif /* ATTRIBUTE_MALLOC */
-
-/* Attributes on labels were valid as of gcc 2.93. */
#ifndef ATTRIBUTE_UNUSED_LABEL
-# if (GCC_VERSION >= 2093)
-# define ATTRIBUTE_UNUSED_LABEL ATTRIBUTE_UNUSED
-# else
+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 93)
# define ATTRIBUTE_UNUSED_LABEL
-# endif /* GNUC >= 2.93 */
+# else
+# define ATTRIBUTE_UNUSED_LABEL ATTRIBUTE_UNUSED
+# endif /* GNUC < 2.93 */
#endif /* ATTRIBUTE_UNUSED_LABEL */
#ifndef ATTRIBUTE_UNUSED
@@ -213,7 +185,7 @@ So instead we use the macro below and test it against specific values. */
#endif /* ATTRIBUTE_NORETURN */
#ifndef ATTRIBUTE_PRINTF
-#define ATTRIBUTE_PRINTF(m, n) __attribute__ ((__format__ (__printf__, m, n)))
+#define ATTRIBUTE_PRINTF(m, n) __attribute__ ((format (__printf__, m, n)))
#define ATTRIBUTE_PRINTF_1 ATTRIBUTE_PRINTF(1, 2)
#define ATTRIBUTE_PRINTF_2 ATTRIBUTE_PRINTF(2, 3)
#define ATTRIBUTE_PRINTF_3 ATTRIBUTE_PRINTF(3, 4)
diff --git a/include/bfdlink.h b/include/bfdlink.h
index bb827a35f..f7f113c37 100644
--- a/include/bfdlink.h
+++ b/include/bfdlink.h
@@ -329,13 +329,10 @@ struct bfd_link_callbacks
/* A function which is called when a relocation is attempted against
an undefined symbol. NAME is the symbol which is undefined.
ABFD, SECTION and ADDRESS identify the location from which the
- reference is made. FATAL indicates whether an undefined symbol is
- a fatal error or not. In some cases SECTION may be NULL. */
+ reference is made. In some cases SECTION may be NULL. */
boolean (*undefined_symbol) PARAMS ((struct bfd_link_info *,
const char *name, bfd *abfd,
- asection *section,
- bfd_vma address,
- boolean fatal));
+ asection *section, bfd_vma address));
/* A function which is called when a reloc overflow occurs. NAME is
the name of the symbol or section the reloc is against,
RELOC_NAME is the name of the relocation, and ADDEND is any
diff --git a/include/bin-bugs.h b/include/bin-bugs.h
deleted file mode 100644
index cb14a66bf..000000000
--- a/include/bin-bugs.h
+++ /dev/null
@@ -1,3 +0,0 @@
-#ifndef REPORT_BUGS_TO
-#define REPORT_BUGS_TO "bug-gnu-utils@gnu.org"
-#endif
diff --git a/include/coff/ChangeLog b/include/coff/ChangeLog
index 76b52c023..7d5b236da 100644
--- a/include/coff/ChangeLog
+++ b/include/coff/ChangeLog
@@ -1,19 +1,3 @@
-2000-03-15 Kazu Hirata <kazu@hxi.com>
-
- * internal.h: Fix a typo in the comment for R_MOVL2.
-
-2000-02-28 Nick Clifton <nickc@cygnus.com>
-
- * mipspe.h (MIPS_PE_MAGIC): Define.
- * sh.h (SH_PE_MAGIC): Define.
-
-2000-02-22 Nick Clifton <nickc@cygnus.com> DJ Delorie <dj@cygnus.com>
-
- * sh.h: Add Windows CE definitions.
- * arm.h: Add Windows CE definitions.
- * mipspe.h: New file: Windows CE definitions for MIPS.
- * pe.h: Add constants for ILF support.
-
2000-01-05 Nick Clifton <nickc@cygnus.com>
* pe.h: Fix formatting of comments.
diff --git a/include/coff/arm.h b/include/coff/arm.h
index 7ca93299a..d5163f822 100644
--- a/include/coff/arm.h
+++ b/include/coff/arm.h
@@ -85,16 +85,10 @@ struct external_filehdr
* XXX - NC 5/6/97
*/
-#define ARMMAGIC 0xa00 /* I just made this up */
+#define ARMMAGIC 0xa00 /* I just made this up */
#define ARMBADMAG(x) (((x).f_magic != ARMMAGIC))
-#define ARMPEMAGIC 0x1c0
-#define THUMBPEMAGIC 0x1c2
-
-#undef ARMBADMAG
-#define ARMBADMAG(x) (((x).f_magic != ARMMAGIC) && ((x).f_magic != ARMPEMAGIC) && ((x).f_magic != THUMBPEMAGIC))
-
#define FILHDR struct external_filehdr
#define FILHSZ 20
@@ -278,18 +272,6 @@ union external_auxent
#define _ETEXT "etext"
/********************** RELOCATION DIRECTIVES **********************/
-#ifdef ARM_WINCE
-struct external_reloc
-{
- char r_vaddr[4];
- char r_symndx[4];
- char r_type[2];
-};
-
-#define RELOC struct external_reloc
-#define RELSZ 10
-
-#else
struct external_reloc
{
char r_vaddr[4];
@@ -300,4 +282,3 @@ struct external_reloc
#define RELOC struct external_reloc
#define RELSZ 14
-#endif
diff --git a/include/coff/internal.h b/include/coff/internal.h
index e89b52875..86c24bd90 100644
--- a/include/coff/internal.h
+++ b/include/coff/internal.h
@@ -671,7 +671,7 @@ struct internal_reloc
#define R_MOVL1 0x4c
/* This reloc identifies mov.[wl] insns which formerlly had
- a 32/24bit absolute address and now have a 16bit absolute address. */
+ a 32/24bit absolute address and how have a 16bit absolute address. */
#define R_MOVL2 0x4d
/* This reloc identifies a bCC:8 which will have it's condition
diff --git a/include/coff/mipspe.h b/include/coff/mipspe.h
deleted file mode 100644
index 1927d991d..000000000
--- a/include/coff/mipspe.h
+++ /dev/null
@@ -1,223 +0,0 @@
-/*** coff information for Windows CE with MIPS VR4111 */
-
-/********************** FILE HEADER **********************/
-
-struct external_filehdr {
- char f_magic[2]; /* magic number */
- char f_nscns[2]; /* number of sections */
- char f_timdat[4]; /* time & date stamp */
- char f_symptr[4]; /* file pointer to symtab */
- char f_nsyms[4]; /* number of symtab entries */
- char f_opthdr[2]; /* sizeof(optional hdr) */
- char f_flags[2]; /* flags */
-};
-
-
-
-#define MIPS_ARCH_MAGIC_WINCE 0x0166 /* Windows CE - little endian */
-#define MIPS_PE_MAGIC 0x010b
-
-#define MIPSBADMAG(x) \
- ((x).f_magic!=MIPS_ARCH_MAGIC_WINCE)
-
-#define FILHDR struct external_filehdr
-#define FILHSZ 20
-
-
-/********************** AOUT "OPTIONAL HEADER" **********************/
-
-
-typedef struct
-{
- char magic[2]; /* type of file */
- char vstamp[2]; /* version stamp */
- char tsize[4]; /* text size in bytes, padded to FW bdry*/
- char dsize[4]; /* initialized data " " */
- char bsize[4]; /* uninitialized data " " */
- char entry[4]; /* entry pt. */
- char text_start[4]; /* base of text used for this file */
- char data_start[4]; /* base of data used for this file */
-}
-AOUTHDR;
-
-
-#define AOUTHDRSZ 28
-#define AOUTSZ 28
-
-
-
-
-/* define some NT default values */
-/* #define NT_IMAGE_BASE 0x400000 moved to internal.h */
-#define NT_SECTION_ALIGNMENT 0x1000
-#define NT_FILE_ALIGNMENT 0x200
-#define NT_DEF_RESERVE 0x100000
-#define NT_DEF_COMMIT 0x1000
-
-/********************** SECTION HEADER **********************/
-
-
-struct external_scnhdr {
- char s_name[8]; /* section name */
- char s_paddr[4]; /* physical address, aliased s_nlib */
- char s_vaddr[4]; /* virtual address */
- char s_size[4]; /* section size */
- char s_scnptr[4]; /* file ptr to raw data for section */
- char s_relptr[4]; /* file ptr to relocation */
- char s_lnnoptr[4]; /* file ptr to line numbers */
- char s_nreloc[2]; /* number of relocation entries */
- char s_nlnno[2]; /* number of line number entries*/
- char s_flags[4]; /* flags */
-};
-
-/*
- * names of "special" sections
- */
-#define _TEXT ".text"
-#define _DATA ".data"
-#define _BSS ".bss"
-
-
-#define SCNHDR struct external_scnhdr
-#define SCNHSZ 40
-
-
-/********************** LINE NUMBERS **********************/
-
-/* 1 line number entry for every "breakpointable" source line in a section.
- * Line numbers are grouped on a per function basis; first entry in a function
- * grouping will have l_lnno = 0 and in place of physical address will be the
- * symbol table index of the function name.
- */
-struct external_lineno {
- union {
- char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/
- char l_paddr[4]; /* (physical) address of line number */
- } l_addr;
- char l_lnno[2]; /* line number */
-};
-
-#define GET_LINENO_LNNO(abfd, ext) bfd_h_get_16(abfd, (bfd_byte *) (ext->l_lnno));
-#define PUT_LINENO_LNNO(abfd,val, ext) bfd_h_put_16(abfd,val, (bfd_byte *) (ext->l_lnno));
-
-#define LINENO struct external_lineno
-#define LINESZ 6
-
-
-/********************** SYMBOLS **********************/
-
-#define E_SYMNMLEN 8 /* # characters in a symbol name */
-#define E_FILNMLEN 14 /* # characters in a file name */
-#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
-
-struct external_syment
-{
- union {
- char e_name[E_SYMNMLEN];
- struct {
- char e_zeroes[4];
- char e_offset[4];
- } e;
- } e;
- char e_value[4];
- char e_scnum[2];
- char e_type[2];
- char e_sclass[1];
- char e_numaux[1];
-};
-
-
-
-#define N_BTMASK (017)
-#define N_TMASK (060)
-#define N_BTSHFT (4)
-#define N_TSHIFT (2)
-
-
-union external_auxent {
- struct {
- char x_tagndx[4]; /* str, un, or enum tag indx */
- union {
- struct {
- char x_lnno[2]; /* declaration line number */
- char x_size[2]; /* str/union/array size */
- } x_lnsz;
- char x_fsize[4]; /* size of function */
- } x_misc;
- union {
- struct { /* if ISFCN, tag, or .bb */
- char x_lnnoptr[4]; /* ptr to fcn line # */
- char x_endndx[4]; /* entry ndx past block end */
- } x_fcn;
- struct { /* if ISARY, up to 4 dimen. */
- char x_dimen[E_DIMNUM][2];
- } x_ary;
- } x_fcnary;
- char x_tvndx[2]; /* tv index */
- } x_sym;
-
- union {
- char x_fname[E_FILNMLEN];
- struct {
- char x_zeroes[4];
- char x_offset[4];
- } x_n;
- } x_file;
-
- struct {
- char x_scnlen[4]; /* section length */
- char x_nreloc[2]; /* # relocation entries */
- char x_nlinno[2]; /* # line numbers */
- char x_checksum[4]; /* section COMDAT checksum */
- char x_associated[2]; /* COMDAT associated section index */
- char x_comdat[1]; /* COMDAT selection number */
- } x_scn;
-
- struct {
- char x_tvfill[4]; /* tv fill value */
- char x_tvlen[2]; /* length of .tv */
- char x_tvran[2][2]; /* tv range */
- } x_tv; /* info about .tv section (in auxent of symbol .tv)) */
-
-
-};
-
-#define SYMENT struct external_syment
-#define SYMESZ 18
-#define AUXENT union external_auxent
-#define AUXESZ 18
-
-
-
-/********************** RELOCATION DIRECTIVES **********************/
-
-/* The external reloc has an offset field, because some of the reloc
- types on the h8 don't have room in the instruction for the entire
- offset - eg the strange jump and high page addressing modes */
-
-struct external_reloc {
- char r_vaddr[4];
- char r_symndx[4];
- char r_type[2];
-};
-
-
-#define RELOC struct external_reloc
-#define RELSZ 10
-
-/* MIPS PE relocation types. */
-
-#define MIPS_R_ABSOLUTE 0 /* ignored */
-#define MIPS_R_REFHALF 1
-#define MIPS_R_REFWORD 2
-#define MIPS_R_JMPADDR 3
-#define MIPS_R_REFHI 4 /* PAIR follows */
-#define MIPS_R_REFLO 5
-#define MIPS_R_GPREL 6
-#define MIPS_R_LITERAL 7 /* same as GPREL */
-#define MIPS_R_SECTION 10
-#define MIPS_R_SECREL 11
-#define MIPS_R_SECRELLO 12
-#define MIPS_R_SECRELHI 13 /* PAIR follows */
-#define MIPS_R_RVA 34 /* 0x22 */
-#define MIPS_R_PAIR 37 /* 0x25 - symndx is really a signed 16-bit addend */
diff --git a/include/coff/pe.h b/include/coff/pe.h
index 6932ee87b..6a1954ca6 100644
--- a/include/coff/pe.h
+++ b/include/coff/pe.h
@@ -183,16 +183,4 @@ typedef struct
#undef E_FILNMLEN
#define E_FILNMLEN 18 /* # characters in a file name */
-
-/* Import Tyoes fot ILF format object files.. */
-#define IMPORT_CODE 0
-#define IMPORT_DATA 1
-#define IMPORT_CONST 2
-
-/* Import Name Tyoes for ILF format object files. */
-#define IMPORT_ORDINAL 0
-#define IMPORT_NAME 1
-#define IMPORT_NAME_NOPREFIX 2
-#define IMPORT_NAME_UNDECORATE 3
-
-#endif /* _PE_H */
+#endif
diff --git a/include/coff/sh.h b/include/coff/sh.h
index f7271f210..41957df7f 100644
--- a/include/coff/sh.h
+++ b/include/coff/sh.h
@@ -16,13 +16,10 @@ struct external_filehdr {
#define SH_ARCH_MAGIC_BIG 0x0500
#define SH_ARCH_MAGIC_LITTLE 0x0550 /* Little endian SH */
-#define SH_ARCH_MAGIC_WINCE 0x01a2 /* Windows CE - little endian */
-#define SH_PE_MAGIC 0x010b
#define SHBADMAG(x) \
(((x).f_magic!=SH_ARCH_MAGIC_BIG) && \
- ((x).f_magic!=SH_ARCH_MAGIC_WINCE) && \
((x).f_magic!=SH_ARCH_MAGIC_LITTLE))
#define FILHDR struct external_filehdr
@@ -51,12 +48,6 @@ AOUTHDR;
-/* Define some NT default values. */
-/* #define NT_IMAGE_BASE 0x400000 moved to internal.h */
-#define NT_SECTION_ALIGNMENT 0x1000
-#define NT_FILE_ALIGNMENT 0x200
-#define NT_DEF_RESERVE 0x100000
-#define NT_DEF_COMMIT 0x1000
/********************** SECTION HEADER **********************/
@@ -98,26 +89,14 @@ struct external_lineno {
char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/
char l_paddr[4]; /* (physical) address of line number */
} l_addr;
-#ifdef COFF_WITH_PE
- char l_lnno[2]; /* line number */
-#else
char l_lnno[4]; /* line number */
-#endif
};
#define GET_LINENO_LNNO(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) (ext->l_lnno));
#define PUT_LINENO_LNNO(abfd,val, ext) bfd_h_put_32(abfd,val, (bfd_byte *) (ext->l_lnno));
#define LINENO struct external_lineno
-#ifdef COFF_WITH_PE
-#define LINESZ 6
-#undef GET_LINENO_LNNO
-#define GET_LINENO_LNNO(abfd, ext) bfd_h_get_16(abfd, (bfd_byte *) (ext->l_lnno));
-#undef PUT_LINENO_LNNO
-#define PUT_LINENO_LNNO(abfd,val, ext) bfd_h_put_16(abfd,val, (bfd_byte *) (ext->l_lnno));
-#else
#define LINESZ 8
-#endif
/********************** SYMBOLS **********************/
@@ -184,9 +163,6 @@ union external_auxent {
char x_scnlen[4]; /* section length */
char x_nreloc[2]; /* # relocation entries */
char x_nlinno[2]; /* # line numbers */
- char x_checksum[4]; /* section COMDAT checksum */
- char x_associated[2]; /* COMDAT associated section index */
- char x_comdat[1]; /* COMDAT selection number */
} x_scn;
struct {
@@ -211,7 +187,6 @@ union external_auxent {
types on the h8 don't have room in the instruction for the entire
offset - eg the strange jump and high page addressing modes */
-#ifndef COFF_WITH_PE
struct external_reloc {
char r_vaddr[4];
char r_symndx[4];
@@ -219,26 +194,14 @@ struct external_reloc {
char r_type[2];
char r_stuff[2];
};
-#else
-struct external_reloc {
- char r_vaddr[4];
- char r_symndx[4];
- char r_type[2];
-};
-#endif
#define RELOC struct external_reloc
-#ifdef COFF_WITH_PE
-#define RELSZ 10
-#else
#define RELSZ 16
-#endif
/* SH relocation types. Not all of these are actually used. */
#define R_SH_UNUSED 0 /* only used internally */
-#define R_SH_IMM32CE 2 /* 32 bit immediate for WinCE */
#define R_SH_PCREL8 3 /* 8 bit pcrel */
#define R_SH_PCREL16 4 /* 16 bit pcrel */
#define R_SH_HIGH8 5 /* high 8 bits of 24 bit address */
@@ -250,7 +213,6 @@ struct external_reloc {
#define R_SH_PCDISP 12 /* 12 bit branch */
#define R_SH_IMM32 14 /* 32 bit immediate */
#define R_SH_IMM8 16 /* 8 bit immediate */
-#define R_SH_IMAGEBASE 16 /* Windows CE */
#define R_SH_IMM8BY2 17 /* 8 bit immediate *2 */
#define R_SH_IMM8BY4 18 /* 8 bit immediate *4 */
#define R_SH_IMM4 19 /* 4 bit immediate */
diff --git a/include/dis-asm.h b/include/dis-asm.h
index 6e6c04b53..8dc9b712e 100644
--- a/include/dis-asm.h
+++ b/include/dis-asm.h
@@ -78,7 +78,7 @@ typedef struct disassemble_info {
INFO is a pointer to this struct.
Returns an errno value or 0 for success. */
int (*read_memory_func)
- PARAMS ((bfd_vma memaddr, bfd_byte *myaddr, unsigned int length,
+ PARAMS ((bfd_vma memaddr, bfd_byte *myaddr, int length,
struct disassemble_info *info));
/* Function which should be called if we get an error that we can't
@@ -105,7 +105,7 @@ typedef struct disassemble_info {
/* These are for buffer_read_memory. */
bfd_byte *buffer;
bfd_vma buffer_vma;
- unsigned int buffer_length;
+ int buffer_length;
/* This variable may be set by the instruction decoder. It suggests
the number of bytes objdump should display on a single line. If
@@ -124,7 +124,7 @@ typedef struct disassemble_info {
/* Number of octets per incremented target address
Normally one, but some DSPs have byte sizes of 16 or 32 bits
*/
- unsigned int octets_per_byte;
+ int octets_per_byte;
/* Results from instruction decoders. Not all decoders yet support
this information. This info is set each time an instruction is
@@ -157,7 +157,6 @@ extern int print_insn_big_mips PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_little_mips PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_i386_att PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_i386_intel PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_i370 PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_m68k PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_z8001 PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_z8002 PARAMS ((bfd_vma, disassemble_info*));
@@ -194,13 +193,9 @@ extern int print_insn_tic30 PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_vax PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_tic80 PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_pj PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_avr PARAMS ((bfd_vma, disassemble_info*));
extern void print_arm_disassembler_options PARAMS ((FILE *));
extern void parse_arm_disassembler_option PARAMS ((char *));
-extern int get_arm_regname_num_options PARAMS ((void));
-extern int set_arm_regname_option PARAMS ((int));
-extern int get_arm_regnames PARAMS ((int, const char **, const char **, const char ***));
/* Fetch the disassembler for a given BFD, if that support is available. */
extern disassembler_ftype disassembler PARAMS ((bfd *));
@@ -215,7 +210,7 @@ extern void disassembler_usage PARAMS ((FILE *));
/* Here is a function which callers may wish to use for read_memory_func.
It gets bytes from a buffer. */
extern int buffer_read_memory
- PARAMS ((bfd_vma, bfd_byte *, unsigned int, struct disassemble_info *));
+ PARAMS ((bfd_vma, bfd_byte *, int, struct disassemble_info *));
/* This function goes with buffer_read_memory.
It prints a message using info->fprintf_func and info->stream. */
diff --git a/include/elf/ChangeLog b/include/elf/ChangeLog
index e1f68c39b..bac124d0a 100644
--- a/include/elf/ChangeLog
+++ b/include/elf/ChangeLog
@@ -1,34 +1,3 @@
-2000-03-27 Denis Chertykov <denisc@overta.ru>
-
- * avr.h: New file. AVR ELF support for BFD.
- * common.h: Add AVR magic number.
-
-2000-03-10 Geoffrey Keating <geoffk@cygnus.com>
-
- * mips.h: Add R_MIPS_GNU_REL_HI16, R_MIPS_GNU_REL_LO16,
- R_MIPS_GNU_REL16_S2, R_MIPS_PC64 and R_MIPS_PC32 relocation
- numbers.
-
-2000-02-23 Linas Vepstas <linas@linas.org>
-
- * i370.h: New file.
-
-2000-02-22 Nick Clifton <nickc@cygnus.com>
-
- * common.h (ELF_ST_OTHER): Remove definition.
- (ELF32_ST_OTHER): Remove definition.
- (ELF64_ST_OTHER): Remove definition.
-
-2000-02-22 H.J. Lu <hjl@gnu.org>
-
- * common.h (ELFOSABI_LINUX): Define.
-
-Thu Feb 17 00:18:33 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * sh.h: (EF_SH_MACH_MASK, EF_SH_UNKNOWN, EF_SH1, EF_SH2): New macros.
- (EF_SH3, EF_SH_HAS_DSP, EF_SH_DSP, EF_SH3_DSP): Likewise.
- (EF_SH_HAS_FP, EF_SH3E, EF_SH4, EF_SH_MERGE_MACH): Likewise.
-
2000-02-03 H.J. Lu <hjl@gnu.org>
* arm-oabi.h: Duplicate changes made to arm.h on Jan. 27,
diff --git a/include/elf/avr.h b/include/elf/avr.h
deleted file mode 100644
index 152745599..000000000
--- a/include/elf/avr.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/* AVR ELF support for BFD.
- Copyright (C) 1999, 2000 Free Software Foundation, Inc.
- Contributed by Denis Chertykov <denisc@overta.ru>
-
-This file is part of BFD, the Binary File Descriptor library.
-
-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.,
-59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#ifndef _ELF_AVR_H
-#define _ELF_AVR_H
-
-#include "elf/reloc-macros.h"
-
-/* Processor specific flags for the ELF header e_flags field. */
-#define EF_AVR_MACH 0xf
-
-#define E_AVR_MACH_AVR1 1
-#define E_AVR_MACH_AVR2 2
-#define E_AVR_MACH_AVR3 3
-#define E_AVR_MACH_AVR4 4
-
-/* Relocations. */
-START_RELOC_NUMBERS (elf_avr_reloc_type)
- RELOC_NUMBER (R_AVR_NONE, 0)
- RELOC_NUMBER (R_AVR_32, 1)
- RELOC_NUMBER (R_AVR_7_PCREL, 2)
- RELOC_NUMBER (R_AVR_13_PCREL, 3)
- RELOC_NUMBER (R_AVR_16, 4)
- RELOC_NUMBER (R_AVR_16_PM, 5)
- RELOC_NUMBER (R_AVR_LO8_LDI, 6)
- RELOC_NUMBER (R_AVR_HI8_LDI, 7)
- RELOC_NUMBER (R_AVR_HH8_LDI, 8)
- RELOC_NUMBER (R_AVR_LO8_LDI_NEG, 9)
- RELOC_NUMBER (R_AVR_HI8_LDI_NEG, 10)
- RELOC_NUMBER (R_AVR_HH8_LDI_NEG, 11)
- RELOC_NUMBER (R_AVR_LO8_LDI_PM, 12)
- RELOC_NUMBER (R_AVR_HI8_LDI_PM, 13)
- RELOC_NUMBER (R_AVR_HH8_LDI_PM, 14)
- RELOC_NUMBER (R_AVR_LO8_LDI_PM_NEG, 15)
- RELOC_NUMBER (R_AVR_HI8_LDI_PM_NEG, 16)
- RELOC_NUMBER (R_AVR_HH8_LDI_PM_NEG, 17)
- RELOC_NUMBER (R_AVR_CALL, 18)
- EMPTY_RELOC (R_AVR_max)
-END_RELOC_NUMBERS
-
-#endif /* _ELF_AVR_H */
diff --git a/include/elf/common.h b/include/elf/common.h
index fe8c2169d..8b976cc82 100644
--- a/include/elf/common.h
+++ b/include/elf/common.h
@@ -1,6 +1,5 @@
/* ELF support for BFD.
- Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000
- Free Software Foundation, Inc.
+ Copyright (C) 1991,92,93,94,95,96,97,98,1999 Free Software Foundation, Inc.
Written by Fred Fish @ Cygnus Support, from information published
in "UNIX System V Release 4, Programmers Guide: ANSI C and
@@ -60,7 +59,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define EI_OSABI 7 /* Operating System/ABI indication */
#define ELFOSABI_SYSV 0 /* UNIX System V ABI */
#define ELFOSABI_HPUX 1 /* HP-UX operating system */
-#define ELFOSABI_LINUX 3 /* GNU/Linux */
#define ELFOSABI_STANDALONE 255 /* Standalone (embedded) application */
#define ELFOSABI_ARM 97 /* ARM */
@@ -189,10 +187,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* FR30 magic number - no EABI available. */
#define EM_CYGNUS_FR30 0x3330
-/* AVR magic number
- Written in the absense of an ABI. */
-#define EM_AVR 0x1057
-
/* See the above comment before you add a new EM_* value here. */
/* Values for e_version */
@@ -317,15 +311,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define ELF64_ST_TYPE ELF_ST_TYPE
#define ELF64_ST_INFO ELF_ST_INFO
-/* This macro disassembles and assembles a symbol's visibility into
+/* These two macros disassemble and assemble a symbol's visibility into
the st_other field. The STV_ defines specificy the actual visibility. */
#define ELF_ST_VISIBILITY(v) ((v) & 0x3)
-/* The remaining bits in the st_other field are not currently used.
- They should be set to zero. */
+#define ELF_ST_OTHER(o) ((o) & ~0x3)
#define ELF32_ST_VISIBILITY ELF_ST_VISIBILITY
+#define ELF32_ST_OTHER ELF_ST_OTHER
#define ELF64_ST_VISIBILITY ELF_ST_VISIBILITY
+#define ELF64_ST_OTHER ELF_ST_OTHER
#define STN_UNDEF 0 /* undefined symbol index */
diff --git a/include/elf/i370.h b/include/elf/i370.h
deleted file mode 100644
index 9c021f00e..000000000
--- a/include/elf/i370.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* i370 ELF support for BFD.
- Copyright (C) 1995, 2000 Free Software Foundation, Inc.
-
-This file is part of BFD, the Binary File Descriptor library.
-
-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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-/* This file holds definitions specific to the i370 ELF ABI. Note
- that most of this is not actually implemented by BFD. */
-
-#ifndef _ELF_I370_H
-#define _ELF_I370_H
-
-/* Processor specific section headers, sh_type field */
-
-#define SHT_ORDERED SHT_HIPROC /* Link editor is to sort the \
- entries in this section \
- based on the address \
- specified in the associated \
- symbol table entry. */
-
-#define EF_I370_RELOCATABLE 0x00010000 /* i370 -mrelocatable flag */
-#define EF_I370_RELOCATABLE_LIB 0x00008000 /* i370 -mrelocatable-lib flag */
-/* Processor specific section flags, sh_flags field */
-
-#define SHF_EXCLUDE 0x80000000 /* Link editor is to exclude \
- this section from executable \
- and shared objects that it \
- builds when those objects \
- are not to be furhter \
- relocated. */
-#endif /* _ELF_I370_H */
-
-
diff --git a/include/elf/mips.h b/include/elf/mips.h
index 1e2a9f99a..06f836ca0 100644
--- a/include/elf/mips.h
+++ b/include/elf/mips.h
@@ -75,12 +75,6 @@ START_RELOC_NUMBERS (elf_mips_reloc_type)
/* These relocs are used for the mips16. */
RELOC_NUMBER (R_MIPS16_26, 100)
RELOC_NUMBER (R_MIPS16_GPREL, 101)
- /* These are GNU extensions to handle embedded-pic. */
- RELOC_NUMBER (R_MIPS_PC32, 248)
- RELOC_NUMBER (R_MIPS_PC64, 249)
- RELOC_NUMBER (R_MIPS_GNU_REL16_S2, 250)
- RELOC_NUMBER (R_MIPS_GNU_REL_LO16, 251)
- RELOC_NUMBER (R_MIPS_GNU_REL_HI16, 252)
/* These are GNU extensions to enable C++ vtable garbage collection. */
RELOC_NUMBER (R_MIPS_GNU_VTINHERIT, 253)
RELOC_NUMBER (R_MIPS_GNU_VTENTRY, 254)
diff --git a/include/elf/sh.h b/include/elf/sh.h
index faee50994..4a476679a 100644
--- a/include/elf/sh.h
+++ b/include/elf/sh.h
@@ -20,33 +20,6 @@
#ifndef _ELF_SH_H
#define _ELF_SH_H
-/* Processor specific flags for the ELF header e_flags field. */
-
-#define EF_SH_MACH_MASK 0x1f
-#define EF_SH_UNKNOWN 0 /* For backwards compatibility. */
-#define EF_SH1 1
-#define EF_SH2 2
-#define EF_SH3 3
-#define EF_SH_HAS_DSP(flags) ((flags) & 4)
-#define EF_SH_DSP 4
-#define EF_SH3_DSP 5
-#define EF_SH_HAS_FP(flags) ((flags) & 8)
-#define EF_SH3E 8
-#define EF_SH4 9
-
-#define EF_SH_MERGE_MACH(mach1, mach2) \
- (((((mach1) == EF_SH3 || (mach1) == EF_SH_UNKNOWN) && (mach2) == EF_SH_DSP) \
- || ((mach1) == EF_SH_DSP \
- && ((mach2) == EF_SH3 || (mach2) == EF_SH_UNKNOWN))) \
- ? EF_SH3_DSP \
- : (((mach1) < EF_SH3 && (mach2) == EF_SH_UNKNOWN) \
- || ((mach2) < EF_SH3 && (mach1) == EF_SH_UNKNOWN)) \
- ? EF_SH3 \
- : (((mach1) == EF_SH3E && (mach2) == EF_SH_UNKNOWN) \
- || ((mach2) == EF_SH3E && (mach1) == EF_SH_UNKNOWN)) \
- ? EF_SH4 \
- : ((mach1) > (mach2) ? (mach1) : (mach2)))
-
#include "elf/reloc-macros.h"
/* Relocations. */
diff --git a/include/hashtab.h b/include/hashtab.h
deleted file mode 100644
index 5fe239391..000000000
--- a/include/hashtab.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/* An expandable hash tables datatype.
- Copyright (C) 1999 Free Software Foundation, Inc.
- Contributed by Vladimir Makarov (vmakarov@cygnus.com).
-
-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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-/* This package implements basic hash table functionality. It is possible
- to search for an entry, create an entry and destroy an entry.
-
- Elements in the table are generic pointers.
-
- The size of the table is not fixed; if the occupancy of the table
- grows too high the hash table will be expanded.
-
- The abstract data implementation is based on generalized Algorithm D
- from Knuth's book "The art of computer programming". Hash table is
- expanded by creation of new hash table and transferring elements from
- the old table to the new table. */
-
-#ifndef __HASHTAB_H__
-#define __HASHTAB_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#include <ansidecl.h>
-
-/* Callback function pointer types. */
-
-/* Calculate hash of a table entry. */
-typedef unsigned int (*htab_hash) PARAMS ((const void *));
-
-/* Compare a table entry with a possible entry. The entry already in
- the table always comes first, so the second element can be of a
- different type (but in this case htab_find and htab_find_slot
- cannot be used; instead the variants that accept a hash value
- must be used). */
-typedef int (*htab_eq) PARAMS ((const void *, const void *));
-
-/* Cleanup function called whenever a live element is removed from
- the hash table. */
-typedef void (*htab_del) PARAMS ((void *));
-
-/* Function called by htab_traverse for each live element. The first
- arg is the slot of the element (which can be passed to htab_clear_slot
- if desired), the second arg is the auxiliary pointer handed to
- htab_traverse. Return 1 to continue scan, 0 to stop. */
-typedef int (*htab_trav) PARAMS ((void **, void *));
-
-/* Hash tables are of the following type. The structure
- (implementation) of this type is not needed for using the hash
- tables. All work with hash table should be executed only through
- functions mentioned below. */
-
-struct htab
-{
- /* Pointer to hash function. */
- htab_hash hash_f;
-
- /* Pointer to comparison function. */
- htab_eq eq_f;
-
- /* Pointer to cleanup function. */
- htab_del del_f;
-
- /* Table itself. */
- void **entries;
-
- /* Current size (in entries) of the hash table */
- size_t size;
-
- /* Current number of elements including also deleted elements */
- size_t n_elements;
-
- /* Current number of deleted elements in the table */
- size_t n_deleted;
-
- /* The following member is used for debugging. Its value is number
- of all calls of `htab_find_slot' for the hash table. */
- unsigned int searches;
-
- /* The following member is used for debugging. Its value is number
- of collisions fixed for time of work with the hash table. */
- unsigned int collisions;
-};
-
-typedef struct htab *htab_t;
-
-/* The prototypes of the package functions. */
-
-extern htab_t htab_create PARAMS ((size_t, htab_hash,
- htab_eq, htab_del));
-extern void htab_delete PARAMS ((htab_t));
-extern void htab_empty PARAMS ((htab_t));
-
-extern void *htab_find PARAMS ((htab_t, const void *));
-extern void **htab_find_slot PARAMS ((htab_t, const void *, int));
-extern void *htab_find_with_hash PARAMS ((htab_t, const void *,
- unsigned int));
-extern void **htab_find_slot_with_hash PARAMS ((htab_t, const void *,
- unsigned int, int));
-extern void htab_clear_slot PARAMS ((htab_t, void **));
-extern void htab_remove_elt PARAMS ((htab_t, void *));
-
-extern void htab_traverse PARAMS ((htab_t, htab_trav, void *));
-
-extern size_t htab_size PARAMS ((htab_t));
-extern size_t htab_elements PARAMS ((htab_t));
-extern double htab_collisions PARAMS ((htab_t));
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __HASHTAB_H */
diff --git a/include/hp-symtab.h b/include/hp-symtab.h
index cf626c073..fff56688e 100644
--- a/include/hp-symtab.h
+++ b/include/hp-symtab.h
@@ -88,8 +88,7 @@ enum hp_language
{
HP_LANGUAGE_UNKNOWN,
HP_LANGUAGE_C,
- HP_LANGUAGE_FORTRAN,
- HP_LANGUAGE_F77 = HP_LANGUAGE_FORTRAN,
+ HP_LANGUAGE_F77,
HP_LANGUAGE_PASCAL,
HP_LANGUAGE_MODCAL,
HP_LANGUAGE_COBOL,
@@ -486,11 +485,9 @@ struct dntt_type_fparam
unsigned int longaddr: 1;
unsigned int copyparam: 1;
unsigned int dflt: 1;
- unsigned int doc_ranges: 1;
- unsigned int misc_kind: 1;
- unsigned int unused: 14;
+ unsigned int unused: 16;
vtpointer name;
- CORE_ADDR location;
+ int location;
dnttpointer type;
dnttpointer nextparam;
int misc;
@@ -598,7 +595,7 @@ struct dntt_type_const
unsigned int kind: 10;
unsigned int global: 1;
unsigned int indirect: 1;
- unsigned int location_type: 3;
+ unsigned int: 3;
unsigned int classmem: 1;
unsigned int unused: 15;
vtpointer name;
diff --git a/include/libiberty.h b/include/libiberty.h
index 9a536a4a1..cf313662e 100644
--- a/include/libiberty.h
+++ b/include/libiberty.h
@@ -19,7 +19,7 @@ extern "C" {
/* Build an argument vector from a string. Allocates memory using
malloc. Use freeargv to free the vector. */
-extern char **buildargv PARAMS ((char *)) ATTRIBUTE_MALLOC;
+extern char **buildargv PARAMS ((char *));
/* Free a vector returned by buildargv. */
@@ -28,7 +28,7 @@ extern void freeargv PARAMS ((char **));
/* Duplicate an argument vector. Allocates memory using malloc. Use
freeargv to free the vector. */
-extern char **dupargv PARAMS ((char **)) ATTRIBUTE_MALLOC;
+extern char **dupargv PARAMS ((char **));
/* Return the last component of a path name. Note that we can't use a
@@ -36,7 +36,7 @@ extern char **dupargv PARAMS ((char **)) ATTRIBUTE_MALLOC;
across different systems, sometimes as "char *" and sometimes as
"const char *" */
-#if defined (__GNU_LIBRARY__ ) || defined (__linux__) || defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__CYGWIN__) || defined (__CYGWIN32__)
+#if defined (__GNU_LIBRARY__ ) || defined (__linux__) || defined (__FreeBSD__) || defined (__CYGWIN__) || defined (__CYGWIN32__)
extern char *basename PARAMS ((const char *));
#else
extern char *basename ();
@@ -45,28 +45,19 @@ extern char *basename ();
/* Concatenate an arbitrary number of strings, up to (char *) NULL.
Allocates memory using xmalloc. */
-extern char *concat PARAMS ((const char *, ...)) ATTRIBUTE_MALLOC;
+extern char *concat PARAMS ((const char *, ...));
/* Check whether two file descriptors refer to the same file. */
extern int fdmatch PARAMS ((int fd1, int fd2));
-/* Get the working directory. The result is cached, so don't call
- chdir() between calls to getpwd(). */
-
-extern char * getpwd PARAMS ((void));
-
/* Get the amount of time the process has run, in microseconds. */
extern long get_run_time PARAMS ((void));
/* Choose a temporary directory to use for scratch files. */
-extern char *choose_temp_base PARAMS ((void)) ATTRIBUTE_MALLOC;
-
-/* Return a temporary file name or NULL if unable to create one. */
-
-extern char *make_temp_file PARAMS ((const char *)) ATTRIBUTE_MALLOC;
+extern char *choose_temp_base PARAMS ((void));
/* Allocate memory filled with spaces. Allocates using malloc. */
@@ -117,7 +108,11 @@ extern int xatexit PARAMS ((void (*fn) (void)));
/* Exit, calling all the functions registered with xatexit. */
-extern void xexit PARAMS ((int status)) ATTRIBUTE_NORETURN;
+#ifndef __GNUC__
+extern void xexit PARAMS ((int status));
+#else
+void xexit PARAMS ((int status)) __attribute__ ((noreturn));
+#endif
/* Set the program name used by xmalloc. */
@@ -130,29 +125,24 @@ extern void xmalloc_set_program_name PARAMS ((const char *));
#ifdef ANSI_PROTOTYPES
/* Get a definition for size_t. */
#include <stddef.h>
-/* Get a definition for va_list. */
-#include <stdarg.h>
#endif
-extern PTR xmalloc PARAMS ((size_t)) ATTRIBUTE_MALLOC;
+extern PTR xmalloc PARAMS ((size_t));
+
+/* Reallocate memory without fail. This works like xmalloc.
-/* Reallocate memory without fail. This works like xmalloc. Note,
- realloc type functions are not suitable for attribute malloc since
- they may return the same address across multiple calls. */
+ FIXME: We do not declare the parameter types for the same reason as
+ xmalloc. */
extern PTR xrealloc PARAMS ((PTR, size_t));
/* Allocate memory without fail and set it to zero. This works like
xmalloc. */
-extern PTR xcalloc PARAMS ((size_t, size_t)) ATTRIBUTE_MALLOC;
+extern PTR xcalloc PARAMS ((size_t, size_t));
/* Copy a string into a memory buffer without fail. */
-extern char *xstrdup PARAMS ((const char *)) ATTRIBUTE_MALLOC;
-
-/* Copy an existing memory buffer to a new memory buffer without fail. */
-
-extern PTR xmemdup PARAMS ((const PTR, size_t, size_t)) ATTRIBUTE_MALLOC;
+extern char *xstrdup PARAMS ((const char *));
/* hex character manipulation routines */
@@ -182,17 +172,6 @@ extern int pexecute PARAMS ((const char *, char * const *, const char *,
extern int pwait PARAMS ((int, int *, int));
-/* Like sprintf but provides a pointer to malloc'd storage, which must
- be freed by the caller. */
-
-extern int asprintf PARAMS ((char **, const char *, ...)) ATTRIBUTE_PRINTF_2;
-
-/* Like vsprintf but provides a pointer to malloc'd storage, which
- must be freed by the caller. */
-
-extern int vasprintf PARAMS ((char **, const char *, va_list))
- ATTRIBUTE_PRINTF(2,0);
-
#ifdef __cplusplus
}
#endif
diff --git a/include/obstack.h b/include/obstack.h
index a20ab5596..38e967776 100644
--- a/include/obstack.h
+++ b/include/obstack.h
@@ -143,16 +143,12 @@ extern "C" {
#if defined _LIBC || defined HAVE_STRING_H
# include <string.h>
-# if defined __STDC__ && __STDC__
-# define _obstack_memcpy(To, From, N) memcpy ((To), (From), (N))
-# else
-# define _obstack_memcpy(To, From, N) memcpy ((To), (char *)(From), (N))
-# endif
+# define _obstack_memcpy(To, From, N) memcpy ((To), (From), (N))
#else
# ifdef memcpy
-# define _obstack_memcpy(To, From, N) memcpy ((To), (char *)(From), (N))
+# define _obstack_memcpy(To, From, N) memcpy ((To), (From), (N))
# else
-# define _obstack_memcpy(To, From, N) bcopy ((char *)(From), (To), (N))
+# define _obstack_memcpy(To, From, N) bcopy ((From), (To), (N))
# endif
#endif
@@ -389,7 +385,7 @@ __extension__ \
int __len = (length); \
if (__o->next_free + __len > __o->chunk_limit) \
_obstack_newchunk (__o, __len); \
- _obstack_memcpy (__o->next_free, (where), __len); \
+ _obstack_memcpy (__o->next_free, (char *) (where), __len); \
__o->next_free += __len; \
(void) 0; })
@@ -399,7 +395,7 @@ __extension__ \
int __len = (length); \
if (__o->next_free + __len + 1 > __o->chunk_limit) \
_obstack_newchunk (__o, __len + 1); \
- _obstack_memcpy (__o->next_free, (where), __len); \
+ _obstack_memcpy (__o->next_free, (char *) (where), __len); \
__o->next_free += __len; \
*(__o->next_free)++ = 0; \
(void) 0; })
@@ -514,14 +510,14 @@ __extension__ \
( (h)->temp = (length), \
(((h)->next_free + (h)->temp > (h)->chunk_limit) \
? (_obstack_newchunk ((h), (h)->temp), 0) : 0), \
- _obstack_memcpy ((h)->next_free, (where), (h)->temp), \
+ _obstack_memcpy ((h)->next_free, (char *) (where), (h)->temp), \
(h)->next_free += (h)->temp)
# define obstack_grow0(h,where,length) \
( (h)->temp = (length), \
(((h)->next_free + (h)->temp + 1 > (h)->chunk_limit) \
? (_obstack_newchunk ((h), (h)->temp + 1), 0) : 0), \
- _obstack_memcpy ((h)->next_free, (where), (h)->temp), \
+ _obstack_memcpy ((h)->next_free, (char *) (where), (h)->temp), \
(h)->next_free += (h)->temp, \
*((h)->next_free)++ = 0)
diff --git a/include/opcode/ChangeLog b/include/opcode/ChangeLog
index 7452c2bea..2be7ead39 100644
--- a/include/opcode/ChangeLog
+++ b/include/opcode/ChangeLog
@@ -1,64 +1,3 @@
-2000-03-27 Nick Clifton <nickc@cygnus.com>
-
- * d30v.h (SHORT_A1): Fix value.
- (SHORT_AR): Renumber so that it is at the end of the list of short
- instructions, not the end of the list of long instructions.
-
-2000-03-26 Alan Modra <alan@linuxcare.com>
-
- * i386.h: (UNIXWARE_COMPAT): Rename to SYSV386_COMPAT as the
- problem isn't really specific to Unixware.
- (OLDGCC_COMPAT): Define.
- (i386_optab): If !OLDGCC_COMPAT, don't handle fsubp etc. with
- destination %st(0).
- Fix lots of comments.
-
-2000-03-02 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * d30v.h:
- (SHORT_B2r, SHORT_B3, SHORT_B3r, SHORT_B3b, SHORT_B3br): Updated.
- (SHORT_D1r, SHORT_D2, SHORT_D2r, SHORT_D2Br, SHORT_U): Updated.
- (SHORT_F, SHORT_AF, SHORT_T, SHORT_A5, SHORT_CMP, SHORT_CMPU): Updated.
- (SHORT_A1, SHORT_AA, SHORT_RA, SHORT_MODINC, SHORT_MODDEC): Updated.
- (SHORT_C1, SHORT_C2, SHORT_UF, SHORT_A2, SHORT_NONE, LONG): Updated.
- (LONG_U, LONG_Ur, LONG_CMP, LONG_M, LONG_M2, LONG_2, LONG_2r): Updated.
- (LONG_2b, LONG_2br, LONG_D, LONG_Dr, LONG_Dbr): Updated.
-
-2000-02-25 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * i386.h (fild, fistp): Change intel d_Suf form to fildd and
- fistpd without suffix.
-
-2000-02-24 Nick Clifton <nickc@cygnus.com>
-
- * cgen.h (cgen_cpu_desc): Rename field 'flags' to
- 'signed_overflow_ok_p'.
- Delete prototypes for cgen_set_flags() and cgen_get_flags().
-
-2000-02-24 Andrew Haley <aph@cygnus.com>
-
- * cgen.h (CGEN_INSN_MACH_HAS_P): New macro.
- (CGEN_CPU_TABLE): flags: new field.
- Add prototypes for new functions.
-
-2000-02-24 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * i386.h: Add some more UNIXWARE_COMPAT comments.
-
-2000-02-23 Linas Vepstas <linas@linas.org>
-
- * i370.h: New file.
-
-2000-02-22 Andrew Haley <aph@cygnus.com>
-
- * mips.h: (OPCODE_IS_MEMBER): Add comment.
-
-1999-12-30 Andrew Haley <aph@cygnus.com>
-
- * mips.h (OPCODE_IS_MEMBER): Add gp32 arg, which determines
- whether synthetic opcodes (e.g. move) generate 32-bit or 64-bit
- insns.
-
2000-01-15 Alan Modra <alan@spri.levels.unisa.edu.au>
* i386.h: Qualify intel mode far call and jmp with x_Suf.
diff --git a/include/opcode/cgen.h b/include/opcode/cgen.h
index 0cff7c826..2a5fd0da8 100644
--- a/include/opcode/cgen.h
+++ b/include/opcode/cgen.h
@@ -1,6 +1,6 @@
/* Header file for targets using CGEN: Cpu tools GENerator.
-Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of GDB, the GNU debugger, and the GNU Binutils.
@@ -1281,10 +1281,6 @@ typedef struct cgen_cpu_desc
/* Disassembler instruction hash table. */
CGEN_INSN_LIST **dis_hash_table;
CGEN_INSN_LIST *dis_hash_table_entries;
-
- /* This field could be turned into a bitfield if room for other flags is needed. */
- unsigned int signed_overflow_ok_p;
-
} CGEN_CPU_TABLE;
/* wip */
@@ -1387,13 +1383,4 @@ extern void cgen_put_insn_value
extern const char * cgen_read_cpu_file
PARAMS ((CGEN_CPU_DESC, const char * filename_));
-/* Allow signed overflow of instruction fields. */
-extern void cgen_set_signed_overflow_ok PARAMS ((CGEN_CPU_DESC));
-
-/* Generate an error message if a signed field in an instruction overflows. */
-extern void cgen_clear_signed_overflow_ok PARAMS ((CGEN_CPU_DESC));
-
-/* Will an error message be generated if a signed field in an instruction overflows ? */
-extern unsigned int cgen_signed_overflow_ok_p PARAMS ((CGEN_CPU_DESC));
-
#endif /* CGEN_H */
diff --git a/include/opcode/d30v.h b/include/opcode/d30v.h
index f90b7a420..64c7c3634 100644
--- a/include/opcode/d30v.h
+++ b/include/opcode/d30v.h
@@ -1,5 +1,5 @@
/* d30v.h -- Header file for D30V opcode table
- Copyright (C) 1997, 2000 Free Software Foundation, Inc.
+ Copyright 1997 Free Software Foundation, Inc.
Written by Martin Hunt (hunt@cygnus.com), Cygnus Solutions
This file is part of GDB, GAS, and the GNU binutils.
@@ -85,46 +85,40 @@ struct d30v_opcode
#define SHORT_A 9
#define SHORT_B1 11
#define SHORT_B2 12
-#define SHORT_B2r 13
-#define SHORT_B3 14
-#define SHORT_B3r 16
-#define SHORT_B3b 18
-#define SHORT_B3br 20
-#define SHORT_D1r 22
-#define SHORT_D2 24
-#define SHORT_D2r 26
-#define SHORT_D2Br 28
-#define SHORT_U 30 /* unary SHORT_A. ABS for example */
-#define SHORT_F 31 /* SHORT_A with flag registers */
-#define SHORT_AF 33 /* SHORT_A with only the first register a flag register */
-#define SHORT_T 35 /* for trap instruction */
-#define SHORT_A5 36 /* SHORT_A with a 5-bit immediate instead of 6 */
-#define SHORT_CMP 38 /* special form for CMPcc */
-#define SHORT_CMPU 40 /* special form for CMPUcc */
-#define SHORT_A1 42 /* special form of SHORT_A for MACa opcodes where a=1 */
-#define SHORT_AA 44 /* SHORT_A with the first register an accumulator */
-#define SHORT_RA 46 /* SHORT_A with the second register an accumulator */
-#define SHORT_MODINC 48
-#define SHORT_MODDEC 49
-#define SHORT_C1 50
-#define SHORT_C2 51
-#define SHORT_UF 52
-#define SHORT_A2 53
-#define SHORT_NONE 55 /* no operands */
-#define SHORT_AR 56 /* like SHORT_AA but only accept register as third parameter */
-#define LONG 57
-#define LONG_U 58 /* unary LONG */
-#define LONG_Ur 59 /* LONG pc-relative */
-#define LONG_CMP 60 /* special form for CMPcc and CMPUcc */
-#define LONG_M 61 /* Memory long for ldb, stb */
-#define LONG_M2 62 /* Memory long for ld2w, st2w */
-#define LONG_2 63 /* LONG with 2 operands; jmptnz */
-#define LONG_2r 64 /* LONG with 2 operands; bratnz */
-#define LONG_2b 65 /* LONG_2 with modifier of 3 */
-#define LONG_2br 66 /* LONG_2r with modifier of 3 */
-#define LONG_D 67 /* for DJMPI */
-#define LONG_Dr 68 /* for DBRAI */
-#define LONG_Dbr 69 /* for repeati */
+#define SHORT_B3 13
+#define SHORT_B3b 15
+#define SHORT_D1 17
+#define SHORT_D2 19
+#define SHORT_D2B 21
+#define SHORT_U 23 /* unary SHORT_A. ABS for example */
+#define SHORT_F 25 /* SHORT_A with flag registers */
+#define SHORT_AF 27 /* SHORT_A with only the first register a flag register */
+#define SHORT_T 29 /* for trap instruction */
+#define SHORT_A5 30 /* SHORT_A with a 5-bit immediate instead of 6 */
+#define SHORT_CMP 32 /* special form for CMPcc */
+#define SHORT_CMPU 34 /* special form for CMPUcc */
+#define SHORT_A1 36 /* special form of SHORT_A for MACa opcodes where a=1 */
+#define SHORT_AA 38 /* SHORT_A with the first register an accumulator */
+#define SHORT_RA 40 /* SHORT_A with the second register an accumulator */
+#define SHORT_MODINC 42
+#define SHORT_MODDEC 43
+#define SHORT_C1 44
+#define SHORT_C2 45
+#define SHORT_UF 46
+#define SHORT_A2 47
+#define SHORT_A5S 49
+#define SHORT_NONE 51 /* no operands */
+#define LONG 52
+#define LONG_U 53 /* unary LONG */
+#define LONG_AF 54 /* LONG with the first register a flag register */
+#define LONG_CMP 55 /* special form for CMPcc and CMPUcc */
+#define LONG_M 56 /* Memory long for ldb, stb */
+#define LONG_M2 57 /* Memory long for ld2w, st2w */
+#define LONG_2 58 /* LONG with 2 operands; bratnz */
+#define LONG_2b 59 /* LONG_2 with modifier of 3 */
+#define LONG_D 60 /* for DBRAI*/
+#define LONG_Db 61 /* for repeati*/
+#define SHORT_AR 62 /* like SHORT_AA but only accept register as third parameter */
/* the execution unit(s) used */
int unit;
@@ -153,9 +147,7 @@ struct d30v_opcode
#define FLAG_JMP (1L<<13) /* instruction is a branch */
#define FLAG_JSR (1L<<14) /* subroutine call. must be aligned */
#define FLAG_MEM (1L<<15) /* reads/writes memory */
-#define FLAG_NOT_WITH_ADDSUBppp (1L<<16) /* Old meaning: a 2 word 4 byter operation
- New meaning: operation cannot be
- combined in parallel with ADD/SUBppp. */
+#define FLAG_2WORD (1L<<16) /* 2 word/4 byte operation */
#define FLAG_MUL16 (1L<<17) /* 16 bit multiply */
#define FLAG_MUL32 (1L<<18) /* 32 bit multiply */
#define FLAG_ADDSUBppp (1L<<19) /* ADDppp or SUBppp */
@@ -255,10 +247,6 @@ extern const struct d30v_operand d30v_operand_table[];
/* let the optimizer know that two registers are affected */
#define OPERAND_2REG (0x10000)
-/* This operand is pc-relative. Note that repeati can have two immediate
- operands, one of which is pcrel, the other (the IMM6U one) is not. */
-#define OPERAND_PCREL (0x20000)
-
/* The format table is an array of struct d30v_format. */
struct d30v_format
{
diff --git a/include/opcode/i370.h b/include/opcode/i370.h
deleted file mode 100644
index f2049e741..000000000
--- a/include/opcode/i370.h
+++ /dev/null
@@ -1,265 +0,0 @@
-/* i370.h -- Header file for S/390 opcode table
- Copyright 1994, 95, 98, 99, 2000 Free Software Foundation, Inc.
- PowerPC version written by Ian Lance Taylor, Cygnus Support
- Rewritten for i370 ESA/390 support, Linas Vepstas <linas@linas.org>
-
-This file is part of GDB, GAS, and the GNU binutils.
-
-GDB, GAS, and the GNU binutils are free software; you can redistribute
-them and/or modify them under the terms of the GNU General Public
-License as published by the Free Software Foundation; either version
-1, or (at your option) any later version.
-
-GDB, GAS, and the GNU binutils are distributed in the hope that they
-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 file; see the file COPYING. If not, write to the Free
-Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#ifndef I370_H
-#define I370_H
-
-/* The opcode table is an array of struct i370_opcode. */
-typedef union
-{
- unsigned int i[2];
- unsigned short s[4];
- unsigned char b[8];
-} i370_insn_t;
-
-struct i370_opcode
-{
- /* The opcode name. */
- const char *name;
-
- /* the length of the instruction */
- char len;
-
- /* The opcode itself. Those bits which will be filled in with
- operands are zeroes. */
- i370_insn_t opcode;
-
- /* The opcode mask. This is used by the disassembler. This is a
- mask containing ones indicating those bits which must match the
- opcode field, and zeroes indicating those bits which need not
- match (and are presumably filled in by operands). */
- i370_insn_t mask;
-
- /* One bit flags for the opcode. These are used to indicate which
- specific processors support the instructions. The defined values
- are listed below. */
- unsigned long flags;
-
- /* An array of operand codes. Each code is an index into the
- operand table. They appear in the order which the operands must
- appear in assembly code, and are terminated by a zero. */
- unsigned char operands[8];
-};
-
-/* The table itself is sorted by major opcode number, and is otherwise
- in the order in which the disassembler should consider
- instructions. */
-extern const struct i370_opcode i370_opcodes[];
-extern const int i370_num_opcodes;
-
-/* Values defined for the flags field of a struct i370_opcode. */
-
-/* Opcode is defined for the original 360 architecture. */
-#define I370_OPCODE_360 (0x01)
-
-/* Opcode is defined for the 370 architecture. */
-#define I370_OPCODE_370 (0x02)
-
-/* Opcode is defined for the 370-XA architecture. */
-#define I370_OPCODE_370_XA (0x04)
-
-/* Opcode is defined for the ESA/370 architecture. */
-#define I370_OPCODE_ESA370 (0x08)
-
-/* Opcode is defined for the ESA/390 architecture. */
-#define I370_OPCODE_ESA390 (0x10)
-
-/* Opcode is defined for the ESA/390 w/ BFP facility. */
-#define I370_OPCODE_ESA390_BF (0x20)
-
-/* Opcode is defined for the ESA/390 w/ branch & set authority facility. */
-#define I370_OPCODE_ESA390_BS (0x40)
-
-/* Opcode is defined for the ESA/390 w/ checksum facility. */
-#define I370_OPCODE_ESA390_CK (0x80)
-
-/* Opcode is defined for the ESA/390 w/ compare & move extended facility. */
-#define I370_OPCODE_ESA390_CM (0x100)
-
-/* Opcode is defined for the ESA/390 w/ flt.pt. support extensions facility. */
-#define I370_OPCODE_ESA390_FX (0x200)
-
-/* Opcode is defined for the ESA/390 w/ HFP facility. */
-#define I370_OPCODE_ESA390_HX (0x400)
-
-/* Opcode is defined for the ESA/390 w/ immediate & relative facility. */
-#define I370_OPCODE_ESA390_IR (0x800)
-
-/* Opcode is defined for the ESA/390 w/ move-inverse facility. */
-#define I370_OPCODE_ESA390_MI (0x1000)
-
-/* Opcode is defined for the ESA/390 w/ program-call-fast facility. */
-#define I370_OPCODE_ESA390_PC (0x2000)
-
-/* Opcode is defined for the ESA/390 w/ perform-locked-op facility. */
-#define I370_OPCODE_ESA390_PL (0x4000)
-
-/* Opcode is defined for the ESA/390 w/ square-root facility. */
-#define I370_OPCODE_ESA390_QR (0x8000)
-
-/* Opcode is defined for the ESA/390 w/ resume-program facility. */
-#define I370_OPCODE_ESA390_RP (0x10000)
-
-/* Opcode is defined for the ESA/390 w/ set-address-space-fast facility. */
-#define I370_OPCODE_ESA390_SA (0x20000)
-
-/* Opcode is defined for the ESA/390 w/ subspace group facility. */
-#define I370_OPCODE_ESA390_SG (0x40000)
-
-/* Opcode is defined for the ESA/390 w/ string facility. */
-#define I370_OPCODE_ESA390_SR (0x80000)
-
-/* Opcode is defined for the ESA/390 w/ trap facility. */
-#define I370_OPCODE_ESA390_TR (0x100000)
-
-#define I370_OPCODE_ESA390_SUPERSET (0x1fffff)
-
-
-/* The operands table is an array of struct i370_operand. */
-
-struct i370_operand
-{
- /* The number of bits in the operand. */
- int bits;
-
- /* How far the operand is left shifted in the instruction. */
- int shift;
-
- /* Insertion function. This is used by the assembler. To insert an
- operand value into an instruction, check this field.
-
- If it is NULL, execute
- i |= (op & ((1 << o->bits) - 1)) << o->shift;
- (i is the instruction which we are filling in, o is a pointer to
- this structure, and op is the opcode value; this assumes twos
- complement arithmetic).
-
- If this field is not NULL, then simply call it with the
- instruction and the operand value. It will return the new value
- of the instruction. If the ERRMSG argument is not NULL, then if
- the operand value is illegal, *ERRMSG will be set to a warning
- string (the operand will be inserted in any case). If the
- operand value is legal, *ERRMSG will be unchanged (most operands
- can accept any value). */
- i370_insn_t (*insert) PARAMS ((i370_insn_t instruction, long op,
- const char **errmsg));
-
- /* Extraction function. This is used by the disassembler. To
- extract this operand type from an instruction, check this field.
-
- If it is NULL, compute
- op = ((i) >> o->shift) & ((1 << o->bits) - 1);
- if ((o->flags & I370_OPERAND_SIGNED) != 0
- && (op & (1 << (o->bits - 1))) != 0)
- op -= 1 << o->bits;
- (i is the instruction, o is a pointer to this structure, and op
- is the result; this assumes twos complement arithmetic).
-
- If this field is not NULL, then simply call it with the
- instruction value. It will return the value of the operand. If
- the INVALID argument is not NULL, *INVALID will be set to
- non-zero if this operand type can not actually be extracted from
- this operand (i.e., the instruction does not match). If the
- operand is valid, *INVALID will not be changed. */
- long (*extract) PARAMS ((i370_insn_t instruction, int *invalid));
-
- /* One bit syntax flags. */
- unsigned long flags;
-
- /* name -- handy for debugging, otherwise pointless */
- char * name;
-};
-
-/* Elements in the table are retrieved by indexing with values from
- the operands field of the i370_opcodes table. */
-
-extern const struct i370_operand i370_operands[];
-
-/* Values defined for the flags field of a struct i370_operand. */
-
-/* This operand should be wrapped in parentheses rather than
- separated from the previous by a comma. This is used for S, RS and
- SS form instructions which want their operands to look like
- reg,displacement(basereg) */
-#define I370_OPERAND_SBASE (0x01)
-
-/* This operand is a base register. It may or may not appear next
- to an index register, i.e. either of the two forms
- reg,displacement(basereg)
- reg,displacement(index,basereg) */
-#define I370_OPERAND_BASE (0x02)
-
-/* This pair of operands should be wrapped in parentheses rather than
- separated from the last by a comma. This is used for the RX form
- instructions which want their operands to look like
- reg,displacement(index,basereg) */
-#define I370_OPERAND_INDEX (0x04)
-
-/* This operand names a register. The disassembler uses this to print
- register names with a leading 'r'. */
-#define I370_OPERAND_GPR (0x08)
-
-/* This operand names a floating point register. The disassembler
- prints these with a leading 'f'. */
-#define I370_OPERAND_FPR (0x10)
-
-/* This operand is a displacement. */
-#define I370_OPERAND_RELATIVE (0x20)
-
-/* This operand is a length, such as that in SS form instructions. */
-#define I370_OPERAND_LENGTH (0x40)
-
-/* This operand is optional, and is zero if omitted. This is used for
- the optional B2 field in the shift-left, shift-right instructions. The
- assembler must count the number of operands remaining on the line,
- and the number of operands remaining for the opcode, and decide
- whether this operand is present or not. The disassembler should
- print this operand out only if it is not zero. */
-#define I370_OPERAND_OPTIONAL (0x80)
-
-
-/* Define some misc macros. We keep them with the operands table
- for simplicity. The macro table is an array of struct i370_macro. */
-
-struct i370_macro
-{
- /* The macro name. */
- const char *name;
-
- /* The number of operands the macro takes. */
- unsigned int operands;
-
- /* One bit flags for the opcode. These are used to indicate which
- specific processors support the instructions. The values are the
- same as those for the struct i370_opcode flags field. */
- unsigned long flags;
-
- /* A format string to turn the macro into a normal instruction.
- Each %N in the string is replaced with operand number N (zero
- based). */
- const char *format;
-};
-
-extern const struct i370_macro i370_macros[];
-extern const int i370_num_macros;
-
-
-#endif /* I370_H */
diff --git a/include/opcode/i386.h b/include/opcode/i386.h
index d399f4eb2..7bddbed4e 100644
--- a/include/opcode/i386.h
+++ b/include/opcode/i386.h
@@ -17,35 +17,28 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-/* The SystemV/386 SVR3.2 assembler, and probably all AT&T derived
- ix86 Unix assemblers, generate floating point instructions with
- reversed source and destination registers in certain cases.
- Unfortunately, gcc and possibly many other programs use this
- reversed syntax, so we're stuck with it.
+/* The UnixWare assembler, and probably other AT&T derived ix86 Unix
+ assemblers, generate floating point instructions with reversed
+ source and destination registers in certain cases. Unfortunately,
+ gcc and possibly many other programs use this reversed syntax, so
+ we're stuck with it.
- eg. `fsub %st(3),%st' results in st = st - st(3) as expected, but
- `fsub %st,%st(3)' results in st(3) = st - st(3), rather than
- the expected st(3) = st(3) - st
+ eg. `fsub %st(3),%st' results in st <- st - st(3) as expected, but
+ `fsub %st,%st(3)' results in st(3) <- st - st(3), rather than
+ the expected st(3) <- st(3) - st !
This happens with all the non-commutative arithmetic floating point
operations with two register operands, where the source register is
- %st, and destination register is %st(i). See FloatDR below.
+ %st, and destination register is %st(i). Look for FloatDR below. */
- The affected opcode map is dceX, dcfX, deeX, defX. */
-
-#ifndef SYSV386_COMPAT
+#ifndef UNIXWARE_COMPAT
/* Set non-zero for broken, compatible instructions. Set to zero for
- non-broken opcodes at your peril. gcc generates SystemV/386
+ non-broken opcodes at your peril. gcc generates UnixWare
compatible instructions. */
-#define SYSV386_COMPAT 1
-#endif
-#ifndef OLDGCC_COMPAT
-/* Set non-zero to cater for old (<= 2.8.1) versions of gcc that could
- generate nonsense fsubp, fsubrp, fdivp and fdivrp with operands
- reversed. */
-#define OLDGCC_COMPAT SYSV386_COMPAT
+#define UNIXWARE_COMPAT 1
#endif
+
static const template i386_optab[] = {
#define X None
@@ -70,16 +63,13 @@ static const template i386_optab[] = {
#define sl_FP (sl_Suf|IgnoreSize)
#define sld_FP (sld_Suf|IgnoreSize)
#define sldx_FP (sldx_Suf|IgnoreSize)
-#if SYSV386_COMPAT
-/* Someone forgot that the FloatR bit reverses the operation when not
- equal to the FloatD bit. ie. Changing only FloatD results in the
- destination being swapped *and* the direction being reversed. */
+#if UNIXWARE_COMPAT
#define FloatDR FloatD
#else
#define FloatDR (FloatD|FloatR)
#endif
-/* Move instructions. */
+/* move instructions */
#define MOV_AX_DISP32 0xa0
{ "mov", 2, 0xa0, X, bwl_Suf|D|W, { Disp16|Disp32, Acc, 0 } },
{ "mov", 2, 0x88, X, bwl_Suf|D|W|Modrm, { Reg, Reg|AnyMem, 0 } },
@@ -92,12 +82,12 @@ static const template i386_optab[] = {
the implementation defined value is zero). */
{ "mov", 2, 0x8c, X, wl_Suf|Modrm, { SReg3|SReg2, WordReg|WordMem, 0 } },
{ "mov", 2, 0x8e, X, wl_Suf|Modrm|IgnoreSize, { WordReg|WordMem, SReg3|SReg2, 0 } },
-/* Move to/from control debug registers. */
+/* move to/from control debug registers */
{ "mov", 2, 0x0f20, X, l_Suf|D|Modrm|IgnoreSize, { Control, Reg32|InvMem, 0} },
{ "mov", 2, 0x0f21, X, l_Suf|D|Modrm|IgnoreSize, { Debug, Reg32|InvMem, 0} },
{ "mov", 2, 0x0f24, X, l_Suf|D|Modrm|IgnoreSize, { Test, Reg32|InvMem, 0} },
-/* Move with sign extend. */
+/* move with sign extend */
/* "movsbl" & "movsbw" must not be unified into "movsb" to avoid
conflict with the "movs" string move instruction. */
{"movsbl", 2, 0x0fbe, X, NoSuf|Modrm, { Reg8|ByteMem, Reg32, 0} },
@@ -107,38 +97,40 @@ static const template i386_optab[] = {
{"movsx", 2, 0x0fbf, X, w_Suf|Modrm|IgnoreSize, { Reg16|ShortMem, Reg32, 0} },
{"movsx", 2, 0x0fbe, X, b_Suf|Modrm, { Reg8|ByteMem, WordReg, 0} },
-/* Move with zero extend. */
+/* move with zero extend */
{"movzb", 2, 0x0fb6, X, wl_Suf|Modrm, { Reg8|ByteMem, WordReg, 0} },
{"movzwl", 2, 0x0fb7, X, NoSuf|Modrm, { Reg16|ShortMem, Reg32, 0} },
/* Intel Syntax */
{"movzx", 2, 0x0fb7, X, w_Suf|Modrm|IgnoreSize, { Reg16|ShortMem, Reg32, 0} },
{"movzx", 2, 0x0fb6, X, b_Suf|Modrm, { Reg8|ByteMem, WordReg, 0} },
-/* Push instructions. */
+/* push instructions */
{"push", 1, 0x50, X, wl_Suf|ShortForm|DefaultSize, { WordReg, 0, 0 } },
{"push", 1, 0xff, 6, wl_Suf|Modrm|DefaultSize, { WordReg|WordMem, 0, 0 } },
{"push", 1, 0x6a, X, wl_Suf|DefaultSize, { Imm8S, 0, 0} },
{"push", 1, 0x68, X, wl_Suf|DefaultSize, { Imm16|Imm32, 0, 0} },
{"push", 1, 0x06, X, wl_Suf|Seg2ShortForm|DefaultSize, { SReg2, 0, 0 } },
{"push", 1, 0x0fa0, X, wl_Suf|Seg3ShortForm|DefaultSize, { SReg3, 0, 0 } },
+/* push all */
{"pusha", 0, 0x60, X, wl_Suf|DefaultSize, { 0, 0, 0 } },
-/* Pop instructions. */
+/* pop instructions */
{"pop", 1, 0x58, X, wl_Suf|ShortForm|DefaultSize, { WordReg, 0, 0 } },
{"pop", 1, 0x8f, 0, wl_Suf|Modrm|DefaultSize, { WordReg|WordMem, 0, 0 } },
#define POP_SEG_SHORT 0x07
{"pop", 1, 0x07, X, wl_Suf|Seg2ShortForm|DefaultSize, { SReg2, 0, 0 } },
{"pop", 1, 0x0fa1, X, wl_Suf|Seg3ShortForm|DefaultSize, { SReg3, 0, 0 } },
+/* pop all */
{"popa", 0, 0x61, X, wl_Suf|DefaultSize, { 0, 0, 0 } },
-/* Exchange instructions.
- xchg commutes: we allow both operand orders. */
+/* xchg exchange instructions
+ xchg commutes: we allow both operand orders */
{"xchg", 2, 0x90, X, wl_Suf|ShortForm, { WordReg, Acc, 0 } },
{"xchg", 2, 0x90, X, wl_Suf|ShortForm, { Acc, WordReg, 0 } },
{"xchg", 2, 0x86, X, bwl_Suf|W|Modrm, { Reg, Reg|AnyMem, 0 } },
{"xchg", 2, 0x86, X, bwl_Suf|W|Modrm, { Reg|AnyMem, Reg, 0 } },
-/* In/out from ports. */
+/* in/out from ports */
{"in", 2, 0xe4, X, bwl_Suf|W, { Imm8, Acc, 0 } },
{"in", 2, 0xec, X, bwl_Suf|W, { InOutPortReg, Acc, 0 } },
{"in", 1, 0xe4, X, bwl_Suf|W, { Imm8, 0, 0 } },
@@ -148,17 +140,17 @@ static const template i386_optab[] = {
{"out", 1, 0xe6, X, bwl_Suf|W, { Imm8, 0, 0 } },
{"out", 1, 0xee, X, bwl_Suf|W, { InOutPortReg, 0, 0 } },
-/* Load effective address. */
+/* load effective address */
{"lea", 2, 0x8d, X, wl_Suf|Modrm, { WordMem, WordReg, 0 } },
-/* Load segment registers from memory. */
+/* load segment registers from memory */
{"lds", 2, 0xc5, X, wl_Suf|Modrm, { WordMem, WordReg, 0} },
{"les", 2, 0xc4, X, wl_Suf|Modrm, { WordMem, WordReg, 0} },
{"lfs", 2, 0x0fb4, X, wl_Suf|Modrm, { WordMem, WordReg, 0} },
{"lgs", 2, 0x0fb5, X, wl_Suf|Modrm, { WordMem, WordReg, 0} },
{"lss", 2, 0x0fb2, X, wl_Suf|Modrm, { WordMem, WordReg, 0} },
-/* Flags register instructions. */
+/* flags register instructions */
{"clc", 0, 0xf8, X, NoSuf, { 0, 0, 0} },
{"cld", 0, 0xfc, X, NoSuf, { 0, 0, 0} },
{"cli", 0, 0xfa, X, NoSuf, { 0, 0, 0} },
@@ -172,7 +164,7 @@ static const template i386_optab[] = {
{"std", 0, 0xfd, X, NoSuf, { 0, 0, 0} },
{"sti", 0, 0xfb, X, NoSuf, { 0, 0, 0} },
-/* Arithmetic. */
+/* arithmetic */
{"add", 2, 0x00, X, bwl_Suf|D|W|Modrm, { Reg, Reg|AnyMem, 0} },
{"add", 2, 0x83, 0, wl_Suf|Modrm, { Imm8S, WordReg|WordMem, 0} },
{"add", 2, 0x04, X, bwl_Suf|W, { Imm, Acc, 0} },
@@ -219,7 +211,7 @@ static const template i386_optab[] = {
{"xor", 2, 0x34, X, bwl_Suf|W, { Imm, Acc, 0} },
{"xor", 2, 0x80, 6, bwl_Suf|W|Modrm, { Imm, Reg|AnyMem, 0} },
-/* iclr with 1 operand is really xor with 2 operands. */
+/* iclr with 1 operand is really xor with 2 operands. */
{"clr", 1, 0x30, X, bwl_Suf|W|Modrm|regKludge, { Reg, 0, 0 } },
{"adc", 2, 0x10, X, bwl_Suf|D|W|Modrm, { Reg, Reg|AnyMem, 0} },
@@ -239,13 +231,13 @@ static const template i386_optab[] = {
{"aam", 0, 0xd40a, X, NoSuf, { 0, 0, 0} },
{"aam", 1, 0xd4, X, NoSuf, { Imm8S, 0, 0} },
-/* Conversion insns. */
-/* Intel naming */
+/* conversion insns */
+/* conversion: intel naming */
{"cbw", 0, 0x98, X, NoSuf|Size16, { 0, 0, 0} },
{"cwde", 0, 0x98, X, NoSuf|Size32, { 0, 0, 0} },
{"cwd", 0, 0x99, X, NoSuf|Size16, { 0, 0, 0} },
{"cdq", 0, 0x99, X, NoSuf|Size32, { 0, 0, 0} },
-/* AT&T naming */
+/* att naming */
{"cbtw", 0, 0x98, X, NoSuf|Size16, { 0, 0, 0} },
{"cwtl", 0, 0x98, X, NoSuf|Size32, { 0, 0, 0} },
{"cwtd", 0, 0x99, X, NoSuf|Size16, { 0, 0, 0} },
@@ -318,7 +310,7 @@ static const template i386_optab[] = {
{"sar", 2, 0xd2, 7, bwl_Suf|W|Modrm, { ShiftCount, Reg|AnyMem, 0} },
{"sar", 1, 0xd0, 7, bwl_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
-/* Control transfer instructions. */
+/* control transfer instructions */
{"call", 1, 0xe8, X, wl_Suf|JumpDword|DefaultSize, { Disp16|Disp32, 0, 0} },
{"call", 1, 0xff, 2, wl_Suf|Modrm|DefaultSize, { WordReg|WordMem|JumpAbsolute, 0, 0} },
/* Intel Syntax */
@@ -345,7 +337,7 @@ static const template i386_optab[] = {
{"enter", 2, 0xc8, X, wl_Suf|DefaultSize, { Imm16, Imm8, 0} },
{"leave", 0, 0xc9, X, wl_Suf|DefaultSize, { 0, 0, 0} },
-/* Conditional jumps. */
+/* conditional jumps */
{"jo", 1, 0x70, X, NoSuf|Jump, { Disp, 0, 0} },
{"jno", 1, 0x71, X, NoSuf|Jump, { Disp, 0, 0} },
{"jb", 1, 0x72, X, NoSuf|Jump, { Disp, 0, 0} },
@@ -391,7 +383,7 @@ static const template i386_optab[] = {
{"loopnz", 1, 0xe0, X, wl_Suf|JumpByte, { Disp, 0, 0} },
{"loopne", 1, 0xe0, X, wl_Suf|JumpByte, { Disp, 0, 0} },
-/* Set byte on flag instructions. */
+/* set byte on flag instructions */
{"seto", 1, 0x0f90, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
{"setno", 1, 0x0f91, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
{"setb", 1, 0x0f92, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
@@ -423,7 +415,7 @@ static const template i386_optab[] = {
{"setnle", 1, 0x0f9f, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
{"setg", 1, 0x0f9f, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-/* String manipulation. */
+/* string manipulation */
{"cmps", 0, 0xa6, X, bwld_Suf|W|IsString, { 0, 0, 0} },
{"cmps", 2, 0xa6, X, bwld_Suf|W|IsString, { AnyMem|EsSeg, AnyMem, 0} },
{"scmp", 0, 0xa6, X, bwld_Suf|W|IsString, { 0, 0, 0} },
@@ -457,7 +449,7 @@ static const template i386_optab[] = {
{"xlat", 0, 0xd7, X, b_Suf|IsString, { 0, 0, 0} },
{"xlat", 1, 0xd7, X, b_Suf|IsString, { AnyMem, 0, 0} },
-/* Bit manipulation. */
+/* bit manipulation */
{"bsf", 2, 0x0fbc, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
{"bsr", 2, 0x0fbd, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
{"bt", 2, 0x0fa3, X, wl_Suf|Modrm, { WordReg, WordReg|WordMem, 0} },
@@ -469,25 +461,25 @@ static const template i386_optab[] = {
{"bts", 2, 0x0fab, X, wl_Suf|Modrm, { WordReg, WordReg|WordMem, 0} },
{"bts", 2, 0x0fba, 5, wl_Suf|Modrm, { Imm8, WordReg|WordMem, 0} },
-/* Interrupts & op. sys insns. */
+/* interrupts & op. sys insns */
/* See gas/config/tc-i386.c for conversion of 'int $3' into the special
- int 3 insn. */
+ int 3 insn. */
#define INT_OPCODE 0xcd
#define INT3_OPCODE 0xcc
{"int", 1, 0xcd, X, NoSuf, { Imm8, 0, 0} },
{"int3", 0, 0xcc, X, NoSuf, { 0, 0, 0} },
{"into", 0, 0xce, X, NoSuf, { 0, 0, 0} },
{"iret", 0, 0xcf, X, wl_Suf, { 0, 0, 0} },
-/* i386sl, i486sl, later 486, and Pentium. */
+/* i386sl, i486sl, later 486, and Pentium */
{"rsm", 0, 0x0faa, X, NoSuf, { 0, 0, 0} },
{"bound", 2, 0x62, X, wl_Suf|Modrm, { WordReg, WordMem, 0} },
{"hlt", 0, 0xf4, X, NoSuf, { 0, 0, 0} },
-/* nop is actually 'xchgl %eax, %eax'. */
+/* nop is actually 'xchgl %eax, %eax' */
{"nop", 0, 0x90, X, NoSuf, { 0, 0, 0} },
-/* Protection control. */
+/* protection control */
{"arpl", 2, 0x63, X, w_Suf|Modrm|IgnoreSize,{ Reg16, Reg16|ShortMem, 0} },
{"lar", 2, 0x0f02, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
{"lgdt", 1, 0x0f01, 2, wl_Suf|Modrm, { WordMem, 0, 0} },
@@ -506,7 +498,7 @@ static const template i386_optab[] = {
{"verr", 1, 0x0f00, 4, w_Suf|Modrm|IgnoreSize,{ Reg16|ShortMem, 0, 0} },
{"verw", 1, 0x0f00, 5, w_Suf|Modrm|IgnoreSize,{ Reg16|ShortMem, 0, 0} },
-/* Floating point instructions. */
+/* floating point instructions */
/* load */
{"fld", 1, 0xd9c0, X, FP|ShortForm, { FloatReg, 0, 0} }, /* register */
@@ -516,7 +508,7 @@ static const template i386_optab[] = {
{"fld", 1, 0xdb, 5, x_FP|Modrm, { LLongMem, 0, 0} }, /* %st0 <-- mem efloat */
{"fild", 1, 0xdf, 0, sl_Suf|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} }, /* %st0 <-- mem word(16)/dword(32) */
/* Intel Syntax */
-{"fildd", 1, 0xdf, 5, FP|Modrm, { LLongMem, 0, 0} }, /* %st0 <-- mem qword (64) */
+{"fild", 1, 0xdf, 5, d_Suf|IgnoreSize|Modrm,{ LLongMem, 0, 0} }, /* %st0 <-- mem qword (64) */
{"fildq", 1, 0xdf, 5, FP|Modrm, { LLongMem, 0, 0} }, /* %st0 <-- mem qword (64) */
{"fildll", 1, 0xdf, 5, FP|Modrm, { LLongMem, 0, 0} }, /* %st0 <-- mem qword (64) */
{"fldt", 1, 0xdb, 5, FP|Modrm, { LLongMem, 0, 0} }, /* %st0 <-- mem efloat */
@@ -536,7 +528,7 @@ static const template i386_optab[] = {
{"fstp", 1, 0xdb, 7, x_FP|Modrm, { LLongMem, 0, 0} }, /* %st0 --> mem efloat */
{"fistp", 1, 0xdf, 3, sl_FP|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} }, /* %st0 --> mem word(16)/dword(32) */
/* Intel Syntax */
-{"fistpd", 1, 0xdf, 7, FP|Modrm, { LLongMem, 0, 0} }, /* %st0 --> mem qword (64) */
+{"fistp", 1, 0xdf, 7, d_FP|Modrm, { LLongMem, 0, 0} }, /* %st0 --> mem qword (64) */
{"fistpq", 1, 0xdf, 7, FP|Modrm, { LLongMem, 0, 0} }, /* %st0 --> mem qword (64) */
{"fistpll",1, 0xdf, 7, FP|Modrm, { LLongMem, 0, 0} }, /* %st0 --> mem qword (64) */
{"fstpt", 1, 0xdb, 7, FP|Modrm, { LLongMem, 0, 0} }, /* %st0 --> mem efloat */
@@ -585,7 +577,7 @@ static const template i386_optab[] = {
/* add */
{"fadd", 2, 0xd8c0, X, FP|ShortForm|FloatD, { FloatReg, FloatAcc, 0} },
{"fadd", 1, 0xd8c0, X, FP|ShortForm, { FloatReg, 0, 0} }, /* alias for fadd %st(i), %st */
-#if SYSV386_COMPAT
+#if UNIXWARE_COMPAT
{"fadd", 0, 0xdec1, X, FP|Ugh, { 0, 0, 0} }, /* alias for faddp */
#endif
{"fadd", 1, 0xd8, 0, sld_FP|FloatMF|Modrm, { LongMem|LLongMem, 0, 0} },
@@ -599,19 +591,17 @@ static const template i386_optab[] = {
/* subtract */
{"fsub", 2, 0xd8e0, X, FP|ShortForm|FloatDR, { FloatReg, FloatAcc, 0} },
{"fsub", 1, 0xd8e0, X, FP|ShortForm, { FloatReg, 0, 0} },
-#if SYSV386_COMPAT
+#if UNIXWARE_COMPAT
{"fsub", 0, 0xdee1, X, FP|Ugh, { 0, 0, 0} }, /* alias for fsubp */
#endif
{"fsub", 1, 0xd8, 4, sld_FP|FloatMF|Modrm, { LongMem|LLongMem, 0, 0} },
{"fisub", 1, 0xde, 4, sl_FP|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} },
-#if SYSV386_COMPAT
+#if UNIXWARE_COMPAT
{"fsubp", 2, 0xdee0, X, FP|ShortForm, { FloatAcc, FloatReg, 0} },
{"fsubp", 1, 0xdee0, X, FP|ShortForm, { FloatReg, 0, 0} },
{"fsubp", 0, 0xdee1, X, FP, { 0, 0, 0} },
-#if OLDGCC_COMPAT
{"fsubp", 2, 0xdee0, X, FP|ShortForm|Ugh, { FloatReg, FloatAcc, 0} },
-#endif
#else
{"fsubp", 2, 0xdee8, X, FP|ShortForm, { FloatAcc, FloatReg, 0} },
{"fsubp", 1, 0xdee8, X, FP|ShortForm, { FloatReg, 0, 0} },
@@ -621,19 +611,17 @@ static const template i386_optab[] = {
/* subtract reverse */
{"fsubr", 2, 0xd8e8, X, FP|ShortForm|FloatDR, { FloatReg, FloatAcc, 0} },
{"fsubr", 1, 0xd8e8, X, FP|ShortForm, { FloatReg, 0, 0} },
-#if SYSV386_COMPAT
+#if UNIXWARE_COMPAT
{"fsubr", 0, 0xdee9, X, FP|Ugh, { 0, 0, 0} }, /* alias for fsubrp */
#endif
{"fsubr", 1, 0xd8, 5, sld_FP|FloatMF|Modrm, { LongMem|LLongMem, 0, 0} },
{"fisubr", 1, 0xde, 5, sl_FP|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} },
-#if SYSV386_COMPAT
+#if UNIXWARE_COMPAT
{"fsubrp", 2, 0xdee8, X, FP|ShortForm, { FloatAcc, FloatReg, 0} },
{"fsubrp", 1, 0xdee8, X, FP|ShortForm, { FloatReg, 0, 0} },
{"fsubrp", 0, 0xdee9, X, FP, { 0, 0, 0} },
-#if OLDGCC_COMPAT
{"fsubrp", 2, 0xdee8, X, FP|ShortForm|Ugh, { FloatReg, FloatAcc, 0} },
-#endif
#else
{"fsubrp", 2, 0xdee0, X, FP|ShortForm, { FloatAcc, FloatReg, 0} },
{"fsubrp", 1, 0xdee0, X, FP|ShortForm, { FloatReg, 0, 0} },
@@ -643,7 +631,7 @@ static const template i386_optab[] = {
/* multiply */
{"fmul", 2, 0xd8c8, X, FP|ShortForm|FloatD, { FloatReg, FloatAcc, 0} },
{"fmul", 1, 0xd8c8, X, FP|ShortForm, { FloatReg, 0, 0} },
-#if SYSV386_COMPAT
+#if UNIXWARE_COMPAT
{"fmul", 0, 0xdec9, X, FP|Ugh, { 0, 0, 0} }, /* alias for fmulp */
#endif
{"fmul", 1, 0xd8, 1, sld_FP|FloatMF|Modrm, { LongMem|LLongMem, 0, 0} },
@@ -657,19 +645,17 @@ static const template i386_optab[] = {
/* divide */
{"fdiv", 2, 0xd8f0, X, FP|ShortForm|FloatDR, { FloatReg, FloatAcc, 0} },
{"fdiv", 1, 0xd8f0, X, FP|ShortForm, { FloatReg, 0, 0} },
-#if SYSV386_COMPAT
+#if UNIXWARE_COMPAT
{"fdiv", 0, 0xdef1, X, FP|Ugh, { 0, 0, 0} }, /* alias for fdivp */
#endif
{"fdiv", 1, 0xd8, 6, sld_FP|FloatMF|Modrm, { LongMem|LLongMem, 0, 0} },
{"fidiv", 1, 0xde, 6, sld_FP|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} },
-#if SYSV386_COMPAT
+#if UNIXWARE_COMPAT
{"fdivp", 2, 0xdef0, X, FP|ShortForm, { FloatAcc, FloatReg, 0} },
{"fdivp", 1, 0xdef0, X, FP|ShortForm, { FloatReg, 0, 0} },
{"fdivp", 0, 0xdef1, X, FP, { 0, 0, 0} },
-#if OLDGCC_COMPAT
{"fdivp", 2, 0xdef0, X, FP|ShortForm|Ugh, { FloatReg, FloatAcc, 0} },
-#endif
#else
{"fdivp", 2, 0xdef8, X, FP|ShortForm, { FloatAcc, FloatReg, 0} },
{"fdivp", 1, 0xdef8, X, FP|ShortForm, { FloatReg, 0, 0} },
@@ -679,19 +665,17 @@ static const template i386_optab[] = {
/* divide reverse */
{"fdivr", 2, 0xd8f8, X, FP|ShortForm|FloatDR, { FloatReg, FloatAcc, 0} },
{"fdivr", 1, 0xd8f8, X, FP|ShortForm, { FloatReg, 0, 0} },
-#if SYSV386_COMPAT
+#if UNIXWARE_COMPAT
{"fdivr", 0, 0xdef9, X, FP|Ugh, { 0, 0, 0} }, /* alias for fdivrp */
#endif
{"fdivr", 1, 0xd8, 7, sld_FP|FloatMF|Modrm, { LongMem|LLongMem, 0, 0} },
{"fidivr", 1, 0xde, 7, sl_FP|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} },
-#if SYSV386_COMPAT
+#if UNIXWARE_COMPAT
{"fdivrp", 2, 0xdef8, X, FP|ShortForm, { FloatAcc, FloatReg, 0} },
{"fdivrp", 1, 0xdef8, X, FP|ShortForm, { FloatReg, 0, 0} },
{"fdivrp", 0, 0xdef9, X, FP, { 0, 0, 0} },
-#if OLDGCC_COMPAT
{"fdivrp", 2, 0xdef8, X, FP|ShortForm|Ugh, { FloatReg, FloatAcc, 0} },
-#endif
#else
{"fdivrp", 2, 0xdef0, X, FP|ShortForm, { FloatAcc, FloatReg, 0} },
{"fdivrp", 1, 0xdef0, X, FP|ShortForm, { FloatReg, 0, 0} },
@@ -731,7 +715,8 @@ static const template i386_optab[] = {
{"fstsw", 0, 0xdfe0, X, FP|FWait, { 0, 0, 0} },
{"fnclex", 0, 0xdbe2, X, FP, { 0, 0, 0} },
{"fclex", 0, 0xdbe2, X, FP|FWait, { 0, 0, 0} },
-/* Short forms of fldenv, fstenv use data size prefix. */
+/* Short forms of fldenv, fstenv use data size prefix.
+ FIXME: Are these the right suffixes? */
{"fnstenv",1, 0xd9, 6, sl_Suf|Modrm, { LLongMem, 0, 0} },
{"fstenv", 1, 0xd9, 6, sl_Suf|FWait|Modrm, { LLongMem, 0, 0} },
{"fldenv", 1, 0xd9, 4, sl_Suf|Modrm, { LLongMem, 0, 0} },
@@ -746,8 +731,9 @@ static const template i386_optab[] = {
#define FWAIT_OPCODE 0x9b
{"fwait", 0, 0x9b, X, FP, { 0, 0, 0} },
-/* Opcode prefixes; we allow them as separate insns too. */
-
+/*
+ opcode prefixes; we allow them as seperate insns too
+*/
#define ADDR_PREFIX_OPCODE 0x67
{"addr16", 0, 0x67, X, NoSuf|IsPrefix|Size16|IgnoreSize, { 0, 0, 0} },
{"addr32", 0, 0x67, X, NoSuf|IsPrefix|Size32|IgnoreSize, { 0, 0, 0} },
@@ -781,7 +767,7 @@ static const template i386_optab[] = {
{"repne", 0, 0xf2, X, NoSuf|IsPrefix, { 0, 0, 0} },
{"repnz", 0, 0xf2, X, NoSuf|IsPrefix, { 0, 0, 0} },
-/* 486 extensions. */
+/* 486 extensions */
{"bswap", 1, 0x0fc8, X, l_Suf|ShortForm, { Reg32, 0, 0 } },
{"xadd", 2, 0x0fc0, X, bwl_Suf|W|Modrm, { Reg, Reg|AnyMem, 0 } },
@@ -790,10 +776,10 @@ static const template i386_optab[] = {
{"wbinvd", 0, 0x0f09, X, NoSuf, { 0, 0, 0} },
{"invlpg", 1, 0x0f01, 7, NoSuf|Modrm, { AnyMem, 0, 0} },
-/* 586 and late 486 extensions. */
+/* 586 and late 486 extensions */
{"cpuid", 0, 0x0fa2, X, NoSuf, { 0, 0, 0} },
-/* Pentium extensions. */
+/* Pentium extensions */
{"wrmsr", 0, 0x0f30, X, NoSuf, { 0, 0, 0} },
{"rdtsc", 0, 0x0f31, X, NoSuf, { 0, 0, 0} },
{"rdmsr", 0, 0x0f32, X, NoSuf, { 0, 0, 0} },
@@ -803,7 +789,7 @@ static const template i386_optab[] = {
{"fxsave", 1, 0x0fae, 0, FP|Modrm, { LLongMem, 0, 0} },
{"fxrstor", 1, 0x0fae, 1, FP|Modrm, { LLongMem, 0, 0} },
-/* Pentium Pro extensions. */
+/* Pentium Pro extensions */
{"rdpmc", 0, 0x0f33, X, NoSuf, { 0, 0, 0} },
{"ud2", 0, 0x0f0b, X, NoSuf, { 0, 0, 0} }, /* official undefined instr. */
@@ -928,7 +914,7 @@ static const template i386_optab[] = {
{"pxor", 2, 0x0fef, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-/* PIII Katmai New Instructions / SIMD instructions. */
+/* PIII Katmai New Instructions / SIMD instructions */
{"addps", 2, 0x0f58, X, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
{"addss", 2, 0xf30f58, X, FP|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
@@ -1017,7 +1003,7 @@ static const template i386_optab[] = {
{"unpcklps", 2, 0x0f14, X, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
{"xorps", 2, 0x0f57, X, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-/* AMD 3DNow! instructions. */
+/* AMD 3DNow! instructions */
{"prefetch", 1, 0x0f0d, 0, FP|Modrm, { ByteMem, 0, 0 } },
{"prefetchw",1, 0x0f0d, 1, FP|Modrm, { ByteMem, 0, 0 } },
@@ -1075,7 +1061,7 @@ static const template i386_optab[] = {
#define MAX_MNEM_SIZE 16 /* for parsing insn mnemonics from input */
-/* 386 register table. */
+/* 386 register table */
static const reg_entry i386_regtab[] = {
/* make %st first as we test for it */
diff --git a/include/opcode/mips.h b/include/opcode/mips.h
index 68fe57a8a..8c93d1bd7 100644
--- a/include/opcode/mips.h
+++ b/include/opcode/mips.h
@@ -320,21 +320,14 @@ struct mips_opcode
/* Toshiba R3900 instruction. */
#define INSN_3900 0x00000080
-/* 32-bit code running on a ISA3+ CPU. */
-#define INSN_GP32 0x00001000
-
/* Test for membership in an ISA including chip specific ISAs.
INSN is pointer to an element of the opcode table; ISA is the
specified ISA to test against; and CPU is the CPU specific ISA
- to test, or zero if no CPU specific ISA test is desired.
- The gp32 arg is set when you need to force 32-bit register usage on
- a machine with 64-bit registers; see the documentation under -mgp32
- in the MIPS gas docs. */
+ to test, or zero if no CPU specific ISA test is desired. */
-#define OPCODE_IS_MEMBER(insn,isa,cpu,gp32) \
+#define OPCODE_IS_MEMBER(insn,isa,cpu) \
((((insn)->membership & INSN_ISA) != 0 \
- && ((insn)->membership & INSN_ISA) <= isa \
- && ((insn)->membership & INSN_GP32 ? gp32 : 1)) \
+ && ((insn)->membership & INSN_ISA) <= isa) \
|| (cpu == 4650 \
&& ((insn)->membership & INSN_4650) != 0) \
|| (cpu == 4010 \
diff --git a/include/partition.h b/include/partition.h
deleted file mode 100644
index f49d67a8c..000000000
--- a/include/partition.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/* List implentation of a partition of consecutive integers.
- Copyright (C) 2000 Free Software Foundation, Inc.
- Contributed by CodeSourcery, LLC.
-
- This file is part of GNU CC.
-
- GNU CC 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, or (at your option)
- any later version.
-
- GNU CC 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 GNU CC; see the file COPYING. If not, write to
- the Free Software Foundation, 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/* This package implements a partition of consecutive integers. The
- elements are partitioned into classes. Each class is represented
- by one of its elements, the canonical element, which is chosen
- arbitrarily from elements in the class. The principal operations
- on a partition are FIND, which takes an element, determines its
- class, and returns the canonical element for that class, and UNION,
- which unites the two classes that contain two given elements into a
- single class.
-
- The list implementation used here provides constant-time finds. By
- storing the size of each class with the class's canonical element,
- it is able to perform unions over all the classes in the partition
- in O (N log N) time. */
-
-#ifndef _PARTITION_H
-#define _PARTITION_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#include <ansidecl.h>
-#include <stdio.h>
-
-struct partition_elem
-{
- /* The canonical element that represents the class containing this
- element. */
- int class_element;
- /* The next element in this class. Elements in each class form a
- circular list. */
- struct partition_elem* next;
- /* The number of elements in this class. Valid only if this is the
- canonical element for its class. */
- unsigned class_count;
-};
-
-typedef struct partition_def
-{
- /* The number of elements in this partition. */
- int num_elements;
- /* The elements in the partition. */
- struct partition_elem elements[1];
-} *partition;
-
-extern partition partition_new PARAMS((int));
-extern void partition_delete PARAMS((partition));
-extern int partition_union PARAMS((partition,
- int,
- int));
-extern void partition_print PARAMS((partition,
- FILE*));
-
-/* Returns the canonical element corresponding to the class containing
- ELEMENT__ in PARTITION__. */
-
-#define partition_find(partition__, element__) \
- ((partition__)->elements[(element__)].class_element)
-
-#endif /* _PARTITION_H */
diff --git a/include/remote-sim.h b/include/remote-sim.h
index b32f93fdd..a4480b49c 100644
--- a/include/remote-sim.h
+++ b/include/remote-sim.h
@@ -211,27 +211,7 @@ int sim_store_register PARAMS ((SIM_DESC sd, int regno, unsigned char *buf, int
void sim_info PARAMS ((SIM_DESC sd, int verbose));
-/* Run (or resume) the simulated program.
-
- STEP, when non-zero indicates that only a single simulator cycle
- should be emulated.
-
- SIGGNAL, if non-zero is a (HOST) SIGRC value indicating the type of
- event (hardware interrupt, signal) to be delivered to the simulated
- program.
-
- Hardware simulator: If the SIGRC value returned by
- sim_stop_reason() is passed back to the simulator via SIGGNAL then
- the hardware simulator shall correctly deliver the hardware event
- indicated by that signal. If a value of zero is passed in then the
- simulation will continue as if there were no outstanding signal.
- The effect of any other SIGGNAL value is is implementation
- dependant.
-
- Process simulator: If SIGRC is non-zero then the corresponding
- signal is delivered to the simulated program and execution is then
- continued. A zero SIGRC value indicates that the program should
- continue as normal. */
+/* Run (or resume) the simulated program. */
void sim_resume PARAMS ((SIM_DESC sd, int step, int siggnal));
@@ -254,13 +234,13 @@ int sim_stop PARAMS ((SIM_DESC sd));
(SIGTRAP); a completed single step (SIGTRAP); an internal error
condition (SIGABRT); an illegal instruction (SIGILL); Access to an
undefined memory region (SIGSEGV); Mis-aligned memory access
- (SIGBUS). For some signals information in addition to the signal
- number may be retained by the simulator (e.g. offending address),
- that information is not directly accessable via this interface.
+ (SIGBUS).
- SIM_SIGNALLED: The program has been terminated by a signal. The
- simulator has encountered target code that causes the the program
- to exit with signal SIGRC.
+ SIM_SIGNALLED: The program has stopped. The simulator has
+ encountered target code that requires the (HOST) signal SIGRC to be
+ delivered to the simulated program. Ex: `kill (getpid (),
+ TARGET_SIGxxx)'. Where TARGET_SIGxxx has been translated into a
+ host signal. FIXME: This is not always possible..
SIM_RUNNING, SIM_POLLING: The return of one of these values
indicates a problem internal to the simulator. */
@@ -308,27 +288,15 @@ void sim_set_callbacks PARAMS ((struct host_callback_struct *));
void sim_size PARAMS ((int i));
-/* Single-step simulator with tracing enabled.
+/* Run a simulation with tracing enabled.
THIS PROCEDURE IS DEPRECIATED.
- THIS PROCEDURE IS EVEN MORE DEPRECATED THAN SIM_SET_TRACE
GDB and NRUN do not use this interface.
- This procedure returns: ``0'' indicating that the simulator should
- be continued using sim_trace() calls; ``1'' indicating that the
- simulation has finished. */
+ This procedure does not take a SIM_DESC argument as it is
+ used before sim_open. */
int sim_trace PARAMS ((SIM_DESC sd));
-/* Enable tracing.
- THIS PROCEDURE IS DEPRECIATED.
- GDB and NRUN do not use this interface.
- This procedure returns: ``0'' indicating that the simulator should
- be continued using sim_trace() calls; ``1'' indicating that the
- simulation has finished. */
-
-void sim_set_trace PARAMS ((void));
-
-
/* Configure the size of the profile buffer.
THIS PROCEDURE IS DEPRECIATED.
GDB and NRUN do not use this interface.
diff --git a/include/splay-tree.h b/include/splay-tree.h
index 6d70c8d90..e828fe7e9 100644
--- a/include/splay-tree.h
+++ b/include/splay-tree.h
@@ -44,7 +44,7 @@ typedef unsigned long int splay_tree_key;
typedef unsigned long int splay_tree_value;
/* Forward declaration for a node in the tree. */
-typedef struct splay_tree_node_s *splay_tree_node;
+typedef struct splay_tree_node *splay_tree_node;
/* The type of a function which compares two splay-tree keys. The
function should return values as for qsort. */
@@ -62,7 +62,7 @@ typedef void (*splay_tree_delete_value_fn) PARAMS((splay_tree_value));
typedef int (*splay_tree_foreach_fn) PARAMS((splay_tree_node, void*));
/* The nodes in the splay tree. */
-struct splay_tree_node_s
+struct splay_tree_node
{
/* The key. */
splay_tree_key key;
@@ -76,7 +76,7 @@ struct splay_tree_node_s
};
/* The splay tree itself. */
-typedef struct splay_tree_s
+typedef struct splay_tree
{
/* The root of the tree. */
splay_tree_node root;
@@ -95,8 +95,7 @@ extern splay_tree splay_tree_new PARAMS((splay_tree_compare_fn,
splay_tree_delete_key_fn,
splay_tree_delete_value_fn));
extern void splay_tree_delete PARAMS((splay_tree));
-extern splay_tree_node splay_tree_insert
- PARAMS((splay_tree,
+extern void splay_tree_insert PARAMS((splay_tree,
splay_tree_key,
splay_tree_value));
extern splay_tree_node splay_tree_lookup
diff --git a/include/symcat.h b/include/symcat.h
index 3e27162b2..01efada26 100644
--- a/include/symcat.h
+++ b/include/symcat.h
@@ -1,6 +1,6 @@
/* Symbol concatenation utilities.
- Copyright (C) 1998, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1998, Free Software Foundation, Inc.
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
@@ -28,7 +28,7 @@
#define CONCAT2(a,b) a/**/b
#define CONCAT3(a,b,c) a/**/b/**/c
#define CONCAT4(a,b,c,d) a/**/b/**/c/**/d
-#define STRINGX(s) "s"
+#define STRINGX(s) "?"
#endif
#define XCONCAT2(a,b) CONCAT2(a,b)
diff --git a/include/wait.h b/include/wait.h
new file mode 100644
index 000000000..fa3c9ccb1
--- /dev/null
+++ b/include/wait.h
@@ -0,0 +1,63 @@
+/* Define how to access the int that the wait system call stores.
+ This has been compatible in all Unix systems since time immemorial,
+ but various well-meaning people have defined various different
+ words for the same old bits in the same old int (sometimes claimed
+ to be a struct). We just know it's an int and we use these macros
+ to access the bits. */
+
+/* The following macros are defined equivalently to their definitions
+ in POSIX.1. We fail to define WNOHANG and WUNTRACED, which POSIX.1
+ <sys/wait.h> defines, since our code does not use waitpid(). We
+ also fail to declare wait() and waitpid(). */
+
+#ifndef WIFEXITED
+#define WIFEXITED(w) (((w)&0377) == 0)
+#endif
+
+#ifndef WIFSIGNALED
+#define WIFSIGNALED(w) (((w)&0377) != 0177 && ((w)&~0377) == 0)
+#endif
+
+#ifndef WIFSTOPPED
+#ifdef IBM6000
+
+/* Unfortunately, the above comment (about being compatible in all Unix
+ systems) is not quite correct for AIX, sigh. And AIX 3.2 can generate
+ status words like 0x57c (sigtrap received after load), and gdb would
+ choke on it. */
+
+#define WIFSTOPPED(w) ((w)&0x40)
+
+#else
+#define WIFSTOPPED(w) (((w)&0377) == 0177)
+#endif
+#endif
+
+#ifndef WEXITSTATUS
+#define WEXITSTATUS(w) (((w) >> 8) & 0377) /* same as WRETCODE */
+#endif
+
+#ifndef WTERMSIG
+#define WTERMSIG(w) ((w) & 0177)
+#endif
+
+#ifndef WSTOPSIG
+#define WSTOPSIG WEXITSTATUS
+#endif
+
+/* These are not defined in POSIX, but are used by our programs. */
+
+#define WAITTYPE int
+
+#ifndef WCOREDUMP
+#define WCOREDUMP(w) (((w)&0200) != 0)
+#endif
+
+#ifndef WSETEXIT
+#define WSETEXIT(w,status) ((w) = (0 | ((status) << 8)))
+#endif
+
+#ifndef WSETSTOP
+#define WSETSTOP(w,sig) ((w) = (0177 | ((sig) << 8)))
+#endif
+