summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/ChangeLog36
-rw-r--r--include/bfdlink.h8
-rw-r--r--include/coff/ChangeLog10
-rw-r--r--include/coff/ecoff.h28
-rw-r--r--include/coff/internal.h1
-rw-r--r--include/coff/mips.h30
-rw-r--r--include/demangle.h2
-rw-r--r--include/dis-asm.h1
-rw-r--r--include/elf/ChangeLog44
-rw-r--r--include/elf/common.h11
-rw-r--r--include/elf/cr16c.h258
-rw-r--r--include/elf/crx.h50
-rw-r--r--include/elf/m32r.h5
-rw-r--r--include/elf/mips.h9
-rw-r--r--include/elf/sh.h72
-rw-r--r--include/gdb/ChangeLog6
-rw-r--r--include/gdb/callback.h11
-rw-r--r--include/hashtab.h17
-rw-r--r--include/mpw/ChangeLog61
-rw-r--r--include/mpw/README1
-rw-r--r--include/mpw/dir.h23
-rw-r--r--include/mpw/dirent.h31
-rw-r--r--include/mpw/fcntl.h124
-rw-r--r--include/mpw/grp.h10
-rw-r--r--include/mpw/mpw.h130
-rw-r--r--include/mpw/pwd.h15
-rw-r--r--include/mpw/spin.h64
-rw-r--r--include/mpw/stat.h75
-rw-r--r--include/mpw/sys/file.h1
-rw-r--r--include/mpw/sys/param.h1
-rw-r--r--include/mpw/sys/resource.h9
-rw-r--r--include/mpw/sys/stat.h44
-rw-r--r--include/mpw/sys/time.h13
-rw-r--r--include/mpw/sys/types.h15
-rw-r--r--include/mpw/utime.h7
-rw-r--r--include/mpw/varargs.h9
-rw-r--r--include/opcode/ChangeLog28
-rw-r--r--include/opcode/crx.h395
-rw-r--r--include/opcode/i386.h3
-rw-r--r--include/opcode/m68k.h63
-rw-r--r--include/splay-tree.h12
41 files changed, 958 insertions, 775 deletions
diff --git a/include/ChangeLog b/include/ChangeLog
index 7f600049a..fd340f056 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,39 @@
+2004-07-07 Tomer Levi <Tomer.Levi@nsc.com>
+
+ * dis-asm.h (print_insn_crx): Declare.
+
+2004-06-24 Alan Modra <amodra@bigpond.net.au>
+
+ * bfdlink.h (struct bfd_link_order): Update comment.
+
+2004-05-11 Jakub Jelinek <jakub@redhat.com>
+
+ * bfdlink.h (struct bfd_link_info): Add relro, relro_start and
+ relro_end fields.
+ * elf/common.h (PT_GNU_EH_FRAME, PT_GNU_STACK): Add comments.
+ (PT_GNU_RELRO): Define.
+
+2004-05-04 Andreas Jaeger <aj@suse.de>
+
+ * demangle.h: Do not use C++ reserved keyword typename as
+ parameter for cplus_demangle_fill_builtin_type.
+
+2004-04-22 Richard Henderson <rth@redhat.com>
+
+ * hashtab.h (struct htab): Add size_prime_index.
+
+2004-04-13 Jeff Law <law@redhat.com>
+
+ * hashtab.h (htab_remove_elt_with_hash): Prototype new function.
+
+2004-03-30 Zack Weinberg <zack@codesourcery.com>
+
+ * hashtab.h, splay-tree.h: Use new shorter form of GTY markers.
+
+2004-03-25 Stan Shebs <shebs@apple.com>
+
+ * mpw/: Remove subdirectory and everything in it.
+
2004-03-23 Alan Modra <amodra@bigpond.net.au>
PR 51.
diff --git a/include/bfdlink.h b/include/bfdlink.h
index cc2043e10..9a57dfe1d 100644
--- a/include/bfdlink.h
+++ b/include/bfdlink.h
@@ -302,6 +302,9 @@ struct bfd_link_info
flags. */
unsigned int noexecstack: 1;
+ /* TRUE if PT_GNU_RELRO segment should be created. */
+ unsigned int relro: 1;
+
/* What to do with unresolved symbols in an object file.
When producing executables the default is GENERATE_ERROR.
When producing shared libraries the default is IGNORE. The
@@ -391,6 +394,9 @@ struct bfd_link_info
/* May be used to set DT_FLAGS_1 for ELF. */
bfd_vma flags_1;
+
+ /* Start and end of RELRO region. */
+ bfd_vma relro_start, relro_end;
};
/* This structures holds a set of callback functions. These are
@@ -550,7 +556,7 @@ struct bfd_link_order
/* Section to include. If this is used, then
section->output_section must be the section the
link_order is attached to, section->output_offset must
- equal the link_order offset field, and section->_raw_size
+ equal the link_order offset field, and section->size
must equal the link_order size field. Maybe these
restrictions should be relaxed someday. */
asection *section;
diff --git a/include/coff/ChangeLog b/include/coff/ChangeLog
index 331638342..d5f9737ae 100644
--- a/include/coff/ChangeLog
+++ b/include/coff/ChangeLog
@@ -1,3 +1,13 @@
+2004-04-23 Chris Demetriou <cgd@broadcom.com>
+
+ * mips.h (MIPS_R_RELHI, MIPS_R_RELLO, MIPS_R_SWITCH): Remove
+ (MIPS_R_PCREL16): Update comment.
+ * ecoff.h (struct ecoff_value_adjust): Remove structure.
+ (struct ecoff_debug_info): Remove 'adjust' member.
+
+2004-04-20 DJ Delorie <dj@redhat.com>
+
+ * internal.h (R_SECREL32): Add.
For older changes see ChangeLog-9103
diff --git a/include/coff/ecoff.h b/include/coff/ecoff.h
index 3a7aa4fbb..1a39fcbd6 100644
--- a/include/coff/ecoff.h
+++ b/include/coff/ecoff.h
@@ -322,34 +322,6 @@ struct ecoff_debug_info
this changes in the future. This is a pointer to an array, not a
single structure. */
FDR *fdr;
-
- /* When relaxing MIPS embedded PIC code, we may need to adjust
- symbol values when they are output. This is a linked list of
- structures indicating how values should be adjusted. There is no
- requirement that the entries be in any order, or that they not
- overlap. This field is normally NULL, in which case no
- adjustments need to be made. */
- struct ecoff_value_adjust *adjust;
-};
-
-/* This structure describes how to adjust symbol values when
- outputting MIPS embedded PIC code. These adjustments only apply to
- the internal symbols, as the external symbol values will come from
- the hash table and have already been adjusted. */
-
-struct ecoff_value_adjust
-{
- /* Next entry on adjustment list. */
- struct ecoff_value_adjust *next;
- /* Starting VMA of adjustment. This is the VMA in the ECOFF file,
- not the offset from the start of the section. Thus it should
- indicate a particular section. */
- bfd_vma start;
- /* Ending VMA of adjustment. */
- bfd_vma end;
- /* Adjustment. This should be added to the value of the symbol, or
- FDR. This is zero for the last entry in the array. */
- long adjust;
};
/* These structures are used by the ECOFF find_nearest_line function. */
diff --git a/include/coff/internal.h b/include/coff/internal.h
index 2d41bf9a5..710e932c7 100644
--- a/include/coff/internal.h
+++ b/include/coff/internal.h
@@ -607,6 +607,7 @@ struct internal_reloc
#define R_REL24 5
#define R_DIR32 6
#define R_IMAGEBASE 7
+#define R_SECREL32 11
#define R_RELBYTE 15
#define R_RELWORD 16
#define R_RELLONG 17
diff --git a/include/coff/mips.h b/include/coff/mips.h
index b9503bd55..bec8da2d3 100644
--- a/include/coff/mips.h
+++ b/include/coff/mips.h
@@ -105,34 +105,10 @@ struct external_reloc
#define MIPS_R_GPREL 6
#define MIPS_R_LITERAL 7
-/* These reloc types are a Cygnus extension used when generating
- position independent code for embedded systems. The numbers are
- taken from Irix 4, but at least for internal relocs Irix 5 does not
- give them the same meaning. For an internal reloc the symbol index
- of RELHI and RELLO is modified as described below for
- MIPS_R_SWITCH. */
+/* FIXME: This relocation is used (internally only) to represent branches
+ when assembling. It should never appear in output files, and
+ be removed. (It used to be used for embedded-PIC support.) */
#define MIPS_R_PCREL16 12
-#define MIPS_R_RELHI 13
-#define MIPS_R_RELLO 14
-
-/* This reloc type is a Cygnus extension used when generating position
- independent code for embedded systems. It is used for an entry in
- a switch table, which looks like this:
- .word $L3-$LS12
- The object file will contain the correct difference, and does not
- require adjustment. However, when the linker is relaxing PC
- relative calls, it is possible for $L3 to move farther away. This
- reloc always appears in the .text section, and is always against
- the .text section. However, the symbol index is not
- RELOC_SECTION_TEXT. It is, instead, the distance between this
- switch table entry and $LS12. Thus, the original value of $L12 is
- vaddr - symndx
- and the original value of $L3 is
- vaddr - symndx + addend
- where addend is the value in the object file. Knowing this, the
- linker can know whether the addend in the object file must be
- adjusted. */
-#define MIPS_R_SWITCH 22
/********************** STABS **********************/
diff --git a/include/demangle.h b/include/demangle.h
index 6e995e481..b3b8c58c5 100644
--- a/include/demangle.h
+++ b/include/demangle.h
@@ -458,7 +458,7 @@ cplus_demangle_fill_name PARAMS ((struct demangle_component *fill,
extern int
cplus_demangle_fill_builtin_type PARAMS ((struct demangle_component *fill,
- const char *typename));
+ const char *type_name));
/* Fill in a DEMANGLE_COMPONENT_OPERATOR, using the name of the
operator and the number of arguments which it takes (the latter is
diff --git a/include/dis-asm.h b/include/dis-asm.h
index 3670c5189..7171c847a 100644
--- a/include/dis-asm.h
+++ b/include/dis-asm.h
@@ -224,6 +224,7 @@ extern int print_insn_mn10200 (bfd_vma, disassemble_info *);
extern int print_insn_mn10300 (bfd_vma, disassemble_info *);
extern int print_insn_msp430 (bfd_vma, disassemble_info *);
extern int print_insn_ns32k (bfd_vma, disassemble_info *);
+extern int print_insn_crx (bfd_vma, disassemble_info *);
extern int print_insn_openrisc (bfd_vma, disassemble_info *);
extern int print_insn_big_or32 (bfd_vma, disassemble_info *);
extern int print_insn_little_or32 (bfd_vma, disassemble_info *);
diff --git a/include/elf/ChangeLog b/include/elf/ChangeLog
index 385b857e3..5563ddbee 100644
--- a/include/elf/ChangeLog
+++ b/include/elf/ChangeLog
@@ -1,3 +1,47 @@
+2004-07-06 Tomer Levi <Tomer.Levi@nsc.com>
+
+ * common.h (EM_CRX): Define.
+ * crx.h: New file.
+
+2004-06-25 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
+
+ * m32r.h: Add defintions of R_M32R_GOTOFF_HI_ULO,
+ R_M32R_GOTOFF_HI_SLO and R_M32R_GOTOFF_LO.
+
+2004-06-19 Alan Modra <amodra@bigpond.net.au>
+
+ * common.h (ELF64_R_INFO): Warning fix.
+
+2004-06-14 Chris Demetriou <cgd@broadcom.com>
+
+ * mips.h (R_MIPS_PC32): Add back (undoing removal on 2004-04-24),
+ with an updated comment.
+
+2004-05-28 Andrew Stubbs <andrew.stubbs@superh.com>
+
+ * sh.h (EF_SH_HAS_DSP): Remove.
+ (EF_SH_HAS_FP): Remove.
+ (EF_SH_MERGE_MACH): Remove.
+ (EF_SH4_NOFPU): Convert to decimal.
+ (EF_SH4A_NOFPU): Likewise.
+ (EF_SH4_NOMMU_NOFPU): Likewise.
+ (EF_SH3_NOMMU): Add new macro.
+ (EF_SH_BFD_TABLE): Likewise.
+ (sh_find_elf_flags): Add prototype.
+ (sh_elf_get_flags_from_mach): Likewise.
+
+2004-04-24 Chris Demetriou <cgd@broadcom.com>
+
+ * mips.h (R_MIPS_PC32, R_MIPS_PC64, R_MIPS_GNU_REL_LO16)
+ (R_MIPS_GNU_REL_HI16): Remove.
+ (R_MIPS_GNU_REL16_S2): Update comment.
+
+2004-30-30 Galit Heller <Galit.Heller@nsc.com>
+ Tomer Levi <Tomer.Levi@nsc.com>
+
+ * common.h (EM_CR): Define.
+ * cr16c.h: New file.
+
2004-03-23 Paul Brook <paul@codesourcery.com>
* arm.h (EF_ERM_BE8, EF_ARM_LE8, EF_ARM_EABI_VER3): Add.
diff --git a/include/elf/common.h b/include/elf/common.h
index bf233f61d..5573fca76 100644
--- a/include/elf/common.h
+++ b/include/elf/common.h
@@ -1,6 +1,6 @@
/* ELF support for BFD.
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003
+ 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
Written by Fred Fish @ Cygnus Support, from information published
@@ -180,7 +180,9 @@
#define EM_ARC_A5 93 /* ARC Cores Tangent-A5 */
#define EM_XTENSA 94 /* Tensilica Xtensa Architecture */
#define EM_IP2K 101 /* Ubicom IP2022 micro controller */
+#define EM_CR 103 /* National Semiconductor CompactRISC */
#define EM_MSP430 105 /* TI msp430 micro controller */
+#define EM_CRX 114 /* National Semiconductor CRX */
/* If it is necessary to assign new unofficial EM_* values, please pick large
random numbers (0x8523, 0xa7f2, etc.) to minimize the chances of collision
@@ -287,8 +289,9 @@
#define PT_LOPROC 0x70000000 /* Processor-specific */
#define PT_HIPROC 0x7FFFFFFF /* Processor-specific */
-#define PT_GNU_EH_FRAME (PT_LOOS + 0x474e550)
-#define PT_GNU_STACK (PT_LOOS + 0x474e551)
+#define PT_GNU_EH_FRAME (PT_LOOS + 0x474e550) /* Frame unwind information */
+#define PT_GNU_STACK (PT_LOOS + 0x474e551) /* Stack flags */
+#define PT_GNU_RELRO (PT_LOOS + 0x474e552) /* Read-only after relocation */
/* Program segment permissions, in program header p_flags field. */
@@ -493,7 +496,7 @@
#define ELF64_R_SYM(i) ((i) >> 32)
#define ELF64_R_TYPE(i) ((i) & 0xffffffff)
-#define ELF64_R_INFO(s,t) (((bfd_vma) (s) << 32) + (bfd_vma) (t))
+#define ELF64_R_INFO(s,t) (((bfd_vma) (s) << 31 << 1) + (bfd_vma) (t))
/* Dynamic section tags. */
diff --git a/include/elf/cr16c.h b/include/elf/cr16c.h
new file mode 100644
index 000000000..1a91afe0f
--- /dev/null
+++ b/include/elf/cr16c.h
@@ -0,0 +1,258 @@
+/* CR16C ELF support for BFD.
+ Copyright 2004 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. */
+
+#ifndef _ELF_CR16C_H
+#define _ELF_CR16C_H
+
+#include "bfd.h"
+#include "elf/reloc-macros.h"
+
+/* Creating indices for reloc_map_index array. */
+START_RELOC_NUMBERS (elf_cr16c_reloc_type)
+ RELOC_NUMBER (RINDEX_16C_NUM08, 0)
+ RELOC_NUMBER (RINDEX_16C_NUM08_C, 1)
+ RELOC_NUMBER (RINDEX_16C_NUM16, 2)
+ RELOC_NUMBER (RINDEX_16C_NUM16_C, 3)
+ RELOC_NUMBER (RINDEX_16C_NUM32, 4)
+ RELOC_NUMBER (RINDEX_16C_NUM32_C, 5)
+ RELOC_NUMBER (RINDEX_16C_DISP04, 6)
+ RELOC_NUMBER (RINDEX_16C_DISP04_C, 7)
+ RELOC_NUMBER (RINDEX_16C_DISP08, 8)
+ RELOC_NUMBER (RINDEX_16C_DISP08_C, 9)
+ RELOC_NUMBER (RINDEX_16C_DISP16, 10)
+ RELOC_NUMBER (RINDEX_16C_DISP16_C, 11)
+ RELOC_NUMBER (RINDEX_16C_DISP24, 12)
+ RELOC_NUMBER (RINDEX_16C_DISP24_C, 13)
+ RELOC_NUMBER (RINDEX_16C_DISP24a, 14)
+ RELOC_NUMBER (RINDEX_16C_DISP24a_C, 15)
+ RELOC_NUMBER (RINDEX_16C_REG04, 16)
+ RELOC_NUMBER (RINDEX_16C_REG04_C, 17)
+ RELOC_NUMBER (RINDEX_16C_REG04a, 18)
+ RELOC_NUMBER (RINDEX_16C_REG04a_C, 19)
+ RELOC_NUMBER (RINDEX_16C_REG14, 20)
+ RELOC_NUMBER (RINDEX_16C_REG14_C, 21)
+ RELOC_NUMBER (RINDEX_16C_REG16, 22)
+ RELOC_NUMBER (RINDEX_16C_REG16_C, 23)
+ RELOC_NUMBER (RINDEX_16C_REG20, 24)
+ RELOC_NUMBER (RINDEX_16C_REG20_C, 25)
+ RELOC_NUMBER (RINDEX_16C_ABS20, 26)
+ RELOC_NUMBER (RINDEX_16C_ABS20_C, 27)
+ RELOC_NUMBER (RINDEX_16C_ABS24, 28)
+ RELOC_NUMBER (RINDEX_16C_ABS24_C, 29)
+ RELOC_NUMBER (RINDEX_16C_IMM04, 30)
+ RELOC_NUMBER (RINDEX_16C_IMM04_C, 31)
+ RELOC_NUMBER (RINDEX_16C_IMM16, 32)
+ RELOC_NUMBER (RINDEX_16C_IMM16_C, 33)
+ RELOC_NUMBER (RINDEX_16C_IMM20, 34)
+ RELOC_NUMBER (RINDEX_16C_IMM20_C, 35)
+ RELOC_NUMBER (RINDEX_16C_IMM24, 36)
+ RELOC_NUMBER (RINDEX_16C_IMM24_C, 37)
+ RELOC_NUMBER (RINDEX_16C_IMM32, 38)
+ RELOC_NUMBER (RINDEX_16C_IMM32_C, 39)
+END_RELOC_NUMBERS (RINDEX_16C_MAX)
+
+/* CR16C Relocation Types ('cr_reloc_type' entry in the reloc_map structure).
+ The relocation constant name is determined as follows :
+
+ R_16C_<format><size>[_C]
+
+ Where :
+
+ <format> is one of the following:
+ NUM - R_NUMBER mnemonic,
+ DISP - R_16C_DISPL mnemonic,
+ REG - R_16C_REGREL mnemonic,
+ ABS - R_16C_ABS mnemonic,
+ IMM - R_16C_IMMED mnemonic,
+ <size> stands for R_S_16C_<size>
+ _C means 'code label' and is only added when R_ADDRTYPE subfield
+ is of type R_CODE_ADDR. */
+
+/* The table below shows what the hex digits in the definition of the
+ relocation type constants correspond to.
+ ------------------------------------------------------------------
+ R_SIZESP R_FORMAT R_RELTO R_ADDRTYPE
+ ------------------------------------------------------------------ */
+/* R_S_16C_08 R_NUMBER R_ABS R_ADDRESS */
+#define R_16C_NUM08 0X0001
+
+/* R_S_16C_08 R_NUMBER R_ABS R_CODE_ADDR */
+#define R_16C_NUM08_C 0X0006
+
+/* R_S_16C_16 R_NUMBER R_ABS R_ADDRESS */
+#define R_16C_NUM16 0X1001
+
+/* R_S_16C_16 R_NUMBER R_ABS R_CODE_ADDR */
+#define R_16C_NUM16_C 0X1006
+
+/* R_S_16C_32 R_NUMBER R_ABS R_ADDRESS */
+#define R_16C_NUM32 0X2001
+
+/* R_S_16C_32 R_NUMBER R_ABS R_CODE_ADDR */
+#define R_16C_NUM32_C 0X2006
+
+/* R_S_16C_04 R_16C_DISPL R_PCREL R_ADDRESS */
+#define R_16C_DISP04 0X5411
+
+/* R_S_16C_04 R_16C_DISPL R_PCREL R_CODE_ADDR */
+#define R_16C_DISP04_C 0X5416
+
+/* R_S_16C_08 R_16C_DISPL R_PCREL R_ADDRESS */
+#define R_16C_DISP08 0X0411
+
+/* R_S_16C_08 R_16C_DISPL R_PCREL R_CODE_ADDR */
+#define R_16C_DISP08_C 0X0416
+
+/* R_S_16C_16 R_16C_DISPL R_PCREL R_ADDRESS */
+#define R_16C_DISP16 0X1411
+
+/* R_S_16C_16 R_16C_DISPL R_PCREL R_CODE_ADDR */
+#define R_16C_DISP16_C 0X1416
+
+/* R_S_16C_24 R_16C_DISPL R_PCREL R_ADDRESS */
+#define R_16C_DISP24 0X7411
+
+/* R_S_16C_24 R_16C_DISPL R_PCREL R_CODE_ADDR */
+#define R_16C_DISP24_C 0X7416
+
+/* R_S_16C_24a R_16C_DISPL R_PCREL R_ADDRESS */
+#define R_16C_DISP24a 0X6411
+
+/* R_S_16C_24a R_16C_DISPL R_PCREL R_CODE_ADDR */
+#define R_16C_DISP24a_C 0X6416
+
+/* R_S_16C_04 R_16C_REGREL R_ABS R_ADDRESS */
+#define R_16C_REG04 0X5201
+
+/* R_S_16C_04 R_16C_REGREL R_ABS R_CODE_ADDR */
+#define R_16C_REG04_C 0X5206
+
+/* R_S_16C_04_a R_16C_REGREL R_ABS R_ADDRESS */
+#define R_16C_REG04a 0X4201
+
+/* R_S_16C_04_a R_16C_REGREL R_ABS R_CODE_ADDR */
+#define R_16C_REG04a_C 0X4206
+
+/* R_S_16C_14 R_16C_REGREL R_ABS R_ADDRESS */
+#define R_16C_REG14 0X3201
+
+/* R_S_16C_14 R_16C_REGREL R_ABS R_CODE_ADDR */
+#define R_16C_REG14_C 0X3206
+
+/* R_S_16C_16 R_16C_REGREL R_ABS R_ADDRESS */
+#define R_16C_REG16 0X1201
+
+/* R_S_16C_16 R_16C_REGREL R_ABS R_CODE_ADDR */
+#define R_16C_REG16_C 0X1206
+
+/* R_S_16C_20 R_16C_REGREL R_ABS R_ADDRESS */
+#define R_16C_REG20 0X8201
+
+/* R_S_16C_20 R_16C_REGREL R_ABS R_CODE_ADDR */
+#define R_16C_REG20_C 0X8206
+
+/* R_S_16C_20 R_16C_ABS R_ABS R_ADDRESS */
+#define R_16C_ABS20 0X8101
+
+/* R_S_16C_20 R_16C_ABS R_ABS R_CODE_ADDR */
+#define R_16C_ABS20_C 0X8106
+
+/* R_S_16C_24 R_16C_ABS R_ABS R_ADDRESS */
+#define R_16C_ABS24 0X7101
+
+/* R_S_16C_24 R_16C_ABS R_ABS R_CODE_ADDR */
+#define R_16C_ABS24_C 0X7106
+
+/* R_S_16C_04 R_16C_IMMED R_ABS R_ADDRESS */
+#define R_16C_IMM04 0X5301
+
+/* R_S_16C_04 R_16C_IMMED R_ABS R_CODE_ADDR */
+#define R_16C_IMM04_C 0X5306
+
+/* R_S_16C_16 R_16C_IMMED R_ABS R_ADDRESS */
+#define R_16C_IMM16 0X1301
+
+/* R_S_16C_16 R_16C_IMMED R_ABS R_CODE_ADDR */
+#define R_16C_IMM16_C 0X1306
+
+/* R_S_16C_20 R_16C_IMMED R_ABS R_ADDRESS */
+#define R_16C_IMM20 0X8301
+
+/* R_S_16C_20 R_16C_IMMED R_ABS R_CODE_ADDR */
+#define R_16C_IMM20_C 0X8306
+
+/* R_S_16C_24 R_16C_IMMED R_ABS R_ADDRESS */
+#define R_16C_IMM24 0X7301
+
+/* R_S_16C_24 R_16C_IMMED R_ABS R_CODE_ADDR */
+#define R_16C_IMM24_C 0X7306
+
+/* R_S_16C_32 R_16C_IMMED R_ABS R_ADDRESS */
+#define R_16C_IMM32 0X2301
+
+/* R_S_16C_32 R_16C_IMMED R_ABS R_CODE_ADDR */
+#define R_16C_IMM32_C 0X2306
+
+
+/* Relocation item type. */
+#define R_ADDRTYPE 0x000f
+#define R_ADDRESS 0x0001 /* Take address of symbol. */
+#define R_CODE_ADDR 0x0006 /* Take address of symbol divided by 2. */
+
+/* Relocation action. */
+#define R_RELTO 0x00f0
+#define R_ABS 0x0000 /* Keep symbol's address as such. */
+#define R_PCREL 0x0010 /* Subtract the pc address of hole. */
+
+/* Relocation item data format. */
+#define R_FORMAT 0x0f00
+#define R_NUMBER 0x0000 /* Retain as two's complement value. */
+#define R_16C_DISPL 0x0400 /* CR16C displacement type. */
+#define R_16C_ABS 0x0100 /* CR16C absolute type. */
+#define R_16C_REGREL 0x0200 /* CR16C register-relative type. */
+#define R_16C_IMMED 0x0300 /* CR16C immediate type. */
+
+/* Relocation item size. */
+#define R_SIZESP 0xf000
+#define R_S_16C_04 0x5000
+#define R_S_16C_04_a 0x4000
+#define R_S_16C_08 0x0000
+#define R_S_16C_14 0x3000
+#define R_S_16C_16 0x1000
+#define R_S_16C_20 0x8000
+#define R_S_16C_24_a 0x6000
+#define R_S_16C_24 0x7000
+#define R_S_16C_32 0x2000
+
+
+/* Processor specific section indices. These sections do not actually
+ exist. Symbols with a st_shndx field corresponding to one of these
+ values have a special meaning. */
+
+/* Far common symbol. */
+#define SHN_CR16C_FCOMMON 0xff00
+#define SHN_CR16C_NCOMMON 0xff01
+
+typedef struct reloc_map
+{
+ unsigned short cr_reloc_type; /* CR relocation type. */
+ bfd_reloc_code_real_type bfd_reloc_enum; /* BFD relocation enum. */
+} RELOC_MAP;
+
+#endif /* _ELF_CR16C_H */
diff --git a/include/elf/crx.h b/include/elf/crx.h
new file mode 100644
index 000000000..755a6109d
--- /dev/null
+++ b/include/elf/crx.h
@@ -0,0 +1,50 @@
+/* CRX ELF support for BFD.
+ Copyright 2004 Free Software Foundation, Inc.
+ Contributed by Tomer Levi, NSC, Israel.
+ Originally written for GAS 2.12 by Tomer Levi, NSC, Israel.
+ Updates, BFDizing, GNUifying and ELF support by Tomer Levi.
+
+ 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_CRX_H
+#define _ELF_CRX_H
+
+#include "elf/reloc-macros.h"
+
+/* Creating indices for reloc_map_index array. */
+START_RELOC_NUMBERS(elf_crx_reloc_type)
+ RELOC_NUMBER (R_CRX_NONE, 0)
+ RELOC_NUMBER (R_CRX_REL4, 1)
+ RELOC_NUMBER (R_CRX_REL8, 2)
+ RELOC_NUMBER (R_CRX_REL8_CMP, 3)
+ RELOC_NUMBER (R_CRX_REL16, 4)
+ RELOC_NUMBER (R_CRX_REL24, 5)
+ RELOC_NUMBER (R_CRX_REL32, 6)
+ RELOC_NUMBER (R_CRX_REGREL12, 7)
+ RELOC_NUMBER (R_CRX_REGREL22, 8)
+ RELOC_NUMBER (R_CRX_REGREL28, 9)
+ RELOC_NUMBER (R_CRX_REGREL32, 10)
+ RELOC_NUMBER (R_CRX_ABS16, 11)
+ RELOC_NUMBER (R_CRX_ABS32, 12)
+ RELOC_NUMBER (R_CRX_NUM8, 13)
+ RELOC_NUMBER (R_CRX_NUM16, 14)
+ RELOC_NUMBER (R_CRX_NUM32, 15)
+ RELOC_NUMBER (R_CRX_IMM16, 16)
+ RELOC_NUMBER (R_CRX_IMM32, 17)
+END_RELOC_NUMBERS(R_CRX_MAX)
+
+#endif /* _ELF_CRX_H */
diff --git a/include/elf/m32r.h b/include/elf/m32r.h
index 709d79234..6441efe27 100644
--- a/include/elf/m32r.h
+++ b/include/elf/m32r.h
@@ -1,5 +1,5 @@
/* M32R ELF support for BFD.
- Copyright 1996, 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998, 1999, 2000, 2003, 2004 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -67,6 +67,9 @@ START_RELOC_NUMBERS (elf_m32r_reloc_type)
RELOC_NUMBER (R_M32R_GOTPC_HI_ULO, 59)
RELOC_NUMBER (R_M32R_GOTPC_HI_SLO, 60)
RELOC_NUMBER (R_M32R_GOTPC_LO, 61)
+ RELOC_NUMBER (R_M32R_GOTOFF_HI_ULO, 62)
+ RELOC_NUMBER (R_M32R_GOTOFF_HI_SLO, 63)
+ RELOC_NUMBER (R_M32R_GOTOFF_LO, 64)
END_RELOC_NUMBERS (R_M32R_max)
/* Processor specific section indices. These sections do not actually
diff --git a/include/elf/mips.h b/include/elf/mips.h
index ce4315812..b7d800a70 100644
--- a/include/elf/mips.h
+++ b/include/elf/mips.h
@@ -76,12 +76,13 @@ 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. */
+ /* This was a GNU extension used by embedded-PIC. It was co-opted by
+ mips-linux for exception-handling data. It is no longer used, but
+ should continue to be supported by the linker for backward
+ compatibility. (GCC stopped using it in May, 2004.) */
RELOC_NUMBER (R_MIPS_PC32, 248)
- RELOC_NUMBER (R_MIPS_PC64, 249)
+ /* FIXME: this relocation is used internally by gas. */
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 c46a5ff14..bab092842 100644
--- a/include/elf/sh.h
+++ b/include/elf/sh.h
@@ -27,57 +27,51 @@
#define EF_SH1 1
#define EF_SH2 2
#define EF_SH3 3
-#define EF_SH_HAS_DSP(flags) (((flags) & EF_SH_MACH_MASK & ~3) == 4)
#define EF_SH_DSP 4
#define EF_SH3_DSP 5
#define EF_SH4AL_DSP 6
-#define EF_SH_HAS_FP(flags) ((flags) & 8)
#define EF_SH3E 8
#define EF_SH4 9
#define EF_SH2E 11
#define EF_SH4A 12
-#define EF_SH4_NOFPU 0x10
-#define EF_SH4A_NOFPU 0x11
-#define EF_SH4_NOMMU_NOFPU 0x12
+#define EF_SH4_NOFPU 16
+#define EF_SH4A_NOFPU 17
+#define EF_SH4_NOMMU_NOFPU 18
+#define EF_SH3_NOMMU 20
/* This one can only mix in objects from other EF_SH5 objects. */
#define EF_SH5 10
-#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_SH2E && EF_SH_HAS_FP (mach2)) \
- ? (mach2) \
- : ((mach2) == EF_SH2E && EF_SH_HAS_FP (mach1)) \
- ? (mach1) \
- : (((mach1) == EF_SH2E && (mach2) == EF_SH_UNKNOWN) \
- || ((mach2) == EF_SH2E && (mach1) == EF_SH_UNKNOWN)) \
- ? EF_SH2E \
- : (((mach1) == EF_SH3E && (mach2) == EF_SH_UNKNOWN) \
- || ((mach2) == EF_SH3E && (mach1) == EF_SH_UNKNOWN)) \
- ? EF_SH4 \
- /* ??? SH4? Why not SH3E? */ \
- : ((((mach1) == EF_SH4_NOFPU || (mach1) == EF_SH4A_NOFPU) \
- && EF_SH_HAS_DSP (mach2)) \
- || (((mach2) == EF_SH4_NOFPU || (mach2) == EF_SH4A_NOFPU) \
- && EF_SH_HAS_DSP (mach1))) \
- ? EF_SH4AL_DSP \
- : ((mach1) == EF_SH4_NOFPU && EF_SH_HAS_FP (mach2)) \
- ? ((mach2) < EF_SH4A) ? EF_SH4 : (mach2) \
- : ((mach2) == EF_SH4_NOFPU && EF_SH_HAS_FP (mach1)) \
- ? ((mach1) < EF_SH4A) ? EF_SH4 : (mach1) \
- : ((mach1) == EF_SH4A_NOFPU && EF_SH_HAS_FP (mach2)) \
- ? ((mach2) <= EF_SH4A) ? EF_SH4A : (mach2) \
- : ((mach2) == EF_SH4A_NOFPU && EF_SH_HAS_FP (mach1)) \
- ? ((mach1) <= EF_SH4A) ? EF_SH4A : (mach1) \
- : (((mach1) == EF_SH2E ? 7 : (mach1)) > ((mach2) == EF_SH2E ? 7 : (mach2)) \
- ? (mach1) : (mach2)))
+/* Define the mapping from ELF to bfd mach numbers.
+ bfd_mach_* are defined in bfd_in2.h (generated from
+ archures.c). */
+#define EF_SH_BFD_TABLE \
+/* EF_SH_UNKNOWN */ bfd_mach_sh3 , \
+/* EF_SH1 */ bfd_mach_sh , \
+/* EF_SH2 */ bfd_mach_sh2 , \
+/* EF_SH3 */ bfd_mach_sh3 , \
+/* EF_SH_DSP */ bfd_mach_sh_dsp , \
+/* EF_SH3_DSP */ bfd_mach_sh3_dsp , \
+/* EF_SHAL_DSP */ bfd_mach_sh4al_dsp , \
+/* 7 */ 0, \
+/* EF_SH3E */ bfd_mach_sh3e , \
+/* EF_SH4 */ bfd_mach_sh4 , \
+/* EF_SH5 */ 0, \
+/* EF_SH2E */ bfd_mach_sh2e , \
+/* EF_SH4A */ bfd_mach_sh4a , \
+/* 13, 14, 15 */ 0, 0, 0, \
+/* EF_SH4_NOFPU */ bfd_mach_sh4_nofpu , \
+/* EF_SH4A_NOFPU */ bfd_mach_sh4a_nofpu , \
+/* EF_SH4_NOMMU_NOFPU */ bfd_mach_sh4_nommu_nofpu, \
+/* 19 */ 0, \
+/* EF_SH3_NOMMU */ bfd_mach_sh3_nommu
+
+/* Convert arch_sh* into EF_SH*. */
+int sh_find_elf_flags (unsigned int arch_set);
+
+/* Convert bfd_mach_* into EF_SH*. */
+int sh_elf_get_flags_from_mach (unsigned long mach);
/* Flags for the st_other symbol field.
Keep away from the STV_ visibility flags (bit 0..1). */
diff --git a/include/gdb/ChangeLog b/include/gdb/ChangeLog
index 3a17b1d79..80a9e0650 100644
--- a/include/gdb/ChangeLog
+++ b/include/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2004-06-25 J"orn Rennecke <joern.rennecke@superh.com>
+
+ * callback.h (host_callback_struct): Replace members fdopen and
+ alwaysopen with fd_buddy.
+ [sim/common: * callback.c: Changed all users. ]
+
2003-10-31 Kevin Buettner <kevin@redhat.com>
* sim-frv.h: New file.
diff --git a/include/gdb/callback.h b/include/gdb/callback.h
index 3fa419143..aa956d05f 100644
--- a/include/gdb/callback.h
+++ b/include/gdb/callback.h
@@ -123,8 +123,15 @@ struct host_callback_struct
int last_errno; /* host format */
int fdmap[MAX_CALLBACK_FDS];
- char fdopen[MAX_CALLBACK_FDS];
- char alwaysopen[MAX_CALLBACK_FDS];
+ /* fd_buddy is used to contruct circular lists of target fds that point to
+ the same host fd. A uniquely mapped fd points to itself; for a closed
+ one, fd_buddy has the value -1. The host file descriptors for stdin /
+ stdout / stderr are never closed by the simulators, so they are put
+ in a special fd_buddy circular list which also has MAX_CALLBACK_FDS
+ as a member. */
+ /* ??? We don't have a callback entry for dup, although it is trival to
+ implement now. */
+ short fd_buddy[MAX_CALLBACK_FDS+1];
/* System call numbers. */
CB_TARGET_DEFS_MAP *syscall_map;
diff --git a/include/hashtab.h b/include/hashtab.h
index f7bd4ae69..de24dedb9 100644
--- a/include/hashtab.h
+++ b/include/hashtab.h
@@ -1,5 +1,5 @@
/* An expandable hash tables datatype.
- Copyright (C) 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
Contributed by Vladimir Makarov (vmakarov@cygnus.com).
This program is free software; you can redistribute it and/or modify
@@ -99,15 +99,15 @@ struct htab GTY(())
htab_del del_f;
/* Table itself. */
- PTR * GTY ((use_param (""), length ("%h.size"))) entries;
+ PTR * GTY ((use_param, length ("%h.size"))) entries;
- /* Current size (in entries) of the hash table */
+ /* Current size (in entries) of the hash table. */
size_t size;
- /* Current number of elements including also deleted elements */
+ /* Current number of elements including also deleted elements. */
size_t n_elements;
- /* Current number of deleted elements in the table */
+ /* Current number of deleted elements in the table. */
size_t n_deleted;
/* The following member is used for debugging. Its value is number
@@ -123,9 +123,13 @@ struct htab GTY(())
htab_free free_f;
/* Alternate allocate/free functions, which take an extra argument. */
- PTR GTY((skip (""))) alloc_arg;
+ PTR GTY((skip)) alloc_arg;
htab_alloc_with_arg alloc_with_arg_f;
htab_free_with_arg free_with_arg_f;
+
+ /* Current size (in entries) of the hash table, as an index into the
+ table of primes. */
+ unsigned int size_prime_index;
};
typedef struct htab *htab_t;
@@ -166,6 +170,7 @@ extern PTR *htab_find_slot_with_hash PARAMS ((htab_t, const void *,
enum insert_option));
extern void htab_clear_slot PARAMS ((htab_t, void **));
extern void htab_remove_elt PARAMS ((htab_t, void *));
+extern void htab_remove_elt_with_hash PARAMS ((htab_t, void *, hashval_t));
extern void htab_traverse PARAMS ((htab_t, htab_trav, void *));
extern void htab_traverse_noresize PARAMS ((htab_t, htab_trav, void *));
diff --git a/include/mpw/ChangeLog b/include/mpw/ChangeLog
deleted file mode 100644
index 8dbad87ea..000000000
--- a/include/mpw/ChangeLog
+++ /dev/null
@@ -1,61 +0,0 @@
-Tue Feb 27 12:23:04 1996 Raymond Jou <rjou@mexican.cygnus.com>
-
- * mpw.h (HAVE_VPRINTF): Add and define to have the value 1.
-
-Fri Dec 29 14:40:46 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw.h (HAVE_STDLIB_H, etc): Define to have the value 1.
- (HAVE_FCNTL_H): Define.
-
-Mon Dec 11 15:39:06 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw.h (open, access): Define as mpw_open and mpw_access.
-
-Thu Nov 9 15:38:37 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw.h: Include unix.h if USE_MW_HEADERS, otherwise include
- various original MPW include files (ioctl.h, etc).
- (EIO): Define if not defined.
- * sys/ioctl.h: Remove, not needed.
-
-Wed Oct 25 12:30:44 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw.h: Don't include errno.h or ioctl.h.
- (ENOENT, EACCES, ENOSYS): Define if not defined.
- (fdopen): Declare if __STDC__.
- (R_OK, W_OK, X_OK): Define if not defined.
-
-Tue Sep 26 14:57:21 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw.h: New file, universally useful MPW host definitions.
- Many of these used to live in bfd/hosts/mpw.h.
- * grp.h: Remove RCS comment.
- * sys/ioctl.h: Add a comment line.
-
-Wed Dec 14 13:12:14 1994 Stan Shebs <shebs@andros.cygnus.com>
-
- * spin.h: New file, cursor spinning for progress.
-
-Thu Jun 30 15:32:07 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * fcntl.h (open): Allow optional third arg.
-
-Thu Apr 14 12:54:51 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * dir.h, dirent.h, fcntl.h, grp.h, pwd.h, stat.h: New files.
- * sys/ioctl.h: New file.
-
-Mon Feb 21 09:44:45 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * sys/stat.h (struct stat): New field st_rsize.
- (S_IFMT, etc): Use different bit positions.
- (fstat): Add parameter names to prototype.
-
-Mon Jan 31 19:30:16 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * README: New file.
- * utime.h, varargs.h: New files, simulated Posix.
- * sys/{file,param,resource,stat,time,types}.h: New files, more
- simulated Posix.
-
-
diff --git a/include/mpw/README b/include/mpw/README
deleted file mode 100644
index 10e92de79..000000000
--- a/include/mpw/README
+++ /dev/null
@@ -1 +0,0 @@
-This is a collection of include files that help imitate Posix in MPW.
diff --git a/include/mpw/dir.h b/include/mpw/dir.h
deleted file mode 100644
index e6ccd2d59..000000000
--- a/include/mpw/dir.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/* The <dir.h> header gives the layout of a directory. */
-
-#pragma once
-
-#ifndef _DIR_H
-#define _DIR_H
-
-#ifndef _TYPES_H /* not quite right */
-#include <sys/types.h>
-#endif
-
-#define DIRBLKSIZ 512 /* size of directory block */
-
-#ifndef DIRSIZ
-#define DIRSIZ 14
-#endif
-
-struct direct {
- ino_t d_ino;
- char d_name[DIRSIZ];
-};
-
-#endif /* _DIR_H */
diff --git a/include/mpw/dirent.h b/include/mpw/dirent.h
deleted file mode 100644
index 38000b2c5..000000000
--- a/include/mpw/dirent.h
+++ /dev/null
@@ -1,31 +0,0 @@
-#ifndef __dirent_h
-#define __dirent_h
-
-#include "sys/dir.h"
-
-struct dirent {
- long d_ino; /* inode number of entry */
- off_t d_off; /* offset of disk directory entry */
- unsigned short d_reclen; /* length of this record */
- char d_name[1]; /* name of file */
-};
-
-/*
-#define DIRENTBASESIZE \
- (((struct dirent *) 0)->d_name - (char *) 0)
-#define DIRENTSIZE(namelen) \
- ((DIRENTBASESIZE + (namelen) + NBPW) & ~(NBPW - 1))
-*/
-
-/* from Mips posix/dirent.h */
-
-/*
-#undef rewinddir
-*/
-
-extern DIR *opendir();
-extern struct dirent *readdir();
-extern void rewinddir();
-extern int closedir();
-
-#endif /* ! __dirent_h */
diff --git a/include/mpw/fcntl.h b/include/mpw/fcntl.h
deleted file mode 100644
index 30999b4b1..000000000
--- a/include/mpw/fcntl.h
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * FCntl.h -- faccess(), fcntl(), and open() mode flags
- *
- * Portions copyright American Telephone & Telegraph
- * Used with permission, Apple Computer Inc. (1985,1988,1990,1992)
- * All rights reserved.
- */
-
-#ifndef __FCNTL__
-#define __FCNTL__
-
-#ifndef __TYPES__
-#include <Types.h>
-#endif
-
-/*
- * For use by lseek():
- */
-
-#ifndef __STDIO__ /* these defns exactly paralled in StdIO.h for fseek() */
-#define SEEK_CUR 1
-#define SEEK_END 2
-#define SEEK_SET 0
-#endif
-
-/*
- * faccess() commands; for general use
- */
- /* 'd' => "directory" ops */
-#define F_DELETE (('d'<<8)|0x01)
-#define F_RENAME (('d'<<8)|0x02)
-
-/*
- * more faccess() commands; for use only by MPW tools
- */
-
-#define F_OPEN (('d'<<8)|0x00) /* reserved for operating system use */
- /* 'e' => "editor" ops */
-#define F_GTABINFO (('e'<<8)|0x00) /* get tab offset for file */
-#define F_STABINFO (('e'<<8)|0x01) /* set " " " " */
-#define F_GFONTINFO (('e'<<8)|0x02) /* get font number and size for file */
-#define F_SFONTINFO (('e'<<8)|0x03) /* set " " " " " " */
-#define F_GPRINTREC (('e'<<8)|0x04) /* get print record for file */
-#define F_SPRINTREC (('e'<<8)|0x05) /* set " " " " */
-#define F_GSELINFO (('e'<<8)|0x06) /* get selection information for file */
-#define F_SSELINFO (('e'<<8)|0x07) /* set " " " " */
-#define F_GWININFO (('e'<<8)|0x08) /* get current window position */
-#define F_SWININFO (('e'<<8)|0x09) /* set " " " */
-#define F_GSCROLLINFO (('e'<<8)|0x0A) /* get scroll information */
-#define F_SSCROLLINFO (('e'<<8)|0x0B) /* set " " */
-#define F_GMARKER (('e'<<8)|0x0D) /* Get Marker */
-#define F_SMARKER (('e'<<8)|0x0C) /* Set " */
-#define F_GSAVEONCLOSE (('e'<<8)|0x0F) /* Get Save on close */
-#define F_SSAVEONCLOSE (('e'<<8)|0x0E) /* Set " " " */
-
-/*
- * argument structures used by various faccess() commands
- */
-
-struct MarkElement {
- int start; /* start position of mark */
- int end; /* end position */
- unsigned char charCount; /* number of chars in mark name */
- char name[64]; /* mark name */
-} ; /* note: marker names may be up to 64 characters long */
-
-#ifndef __cplusplus
-typedef struct MarkElement MarkElement;
-#endif
-
-struct SelectionRecord {
- long startingPos;
- long endingPos;
- long displayTop;
-};
-
-#ifndef __cplusplus
-typedef struct SelectionRecord SelectionRecord;
-#endif
-
-
-/*
- * Mode values accessible to open()
- */
-#define O_RDONLY 0 /* Bits 0 and 1 are used internally */
-#define O_WRONLY 1 /* Values 0..2 are historical */
-#define O_RDWR 2 /* NOTE: it goes 0, 1, 2, *!* 8, 16, 32, ... */
-#define O_APPEND (1<< 3) /* append (writes guaranteed at the end) */
-#define O_RSRC (1<< 4) /* Open the resource fork */
-#define O_ALIAS (1<< 5) /* Open alias file */
-#define O_CREAT (1<< 8) /* Open with file create */
-#define O_TRUNC (1<< 9) /* Open with truncation */
-#define O_EXCL (1<<10) /* w/ O_CREAT: Exclusive "create-only" */
-#define O_BINARY (1<<11) /* Open as a binary stream */
-#define O_NRESOLVE (1<<14) /* Don't resolve any aliases */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * function prototypes
- */
-int close(int);
-int creat(const char*);
-int dup(int filedes); /* OBSOLETE: fcntl(filedes, F_DUPFD, 0) is preferred */
-int faccess(char*, unsigned int, long*);
-int fcntl(int, unsigned int, int);
-long lseek(int, long, int);
-int open(const char*, int, ...);
-int read(int, char*, unsigned);
-int unlink(char*);
-int write(int, const char*, unsigned);
-
-#ifdef __cplusplus
-}
-#endif
-
-/*
- * fcntl() commands
- */
-#define F_DUPFD 0 /* Duplicate files (file descriptor) */
-
-#endif __FCNTL__
diff --git a/include/mpw/grp.h b/include/mpw/grp.h
deleted file mode 100644
index faf2c6a6b..000000000
--- a/include/mpw/grp.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#pragma once
-
-#include "sys/types.h"
-
-struct group {
- char *gr_name;
- gid_t gr_gid;
- char *gr_passwd;
- char **gr_mem;
-};
diff --git a/include/mpw/mpw.h b/include/mpw/mpw.h
deleted file mode 100644
index 58702e725..000000000
--- a/include/mpw/mpw.h
+++ /dev/null
@@ -1,130 +0,0 @@
-/* Mac MPW host-specific definitions. */
-
-#ifndef __INCLUDE_MPW_H
-#define __INCLUDE_MPW_H
-
-#ifndef MPW
-#define MPW
-#endif
-
-/* MPW C is basically ANSI, but doesn't actually enable __STDC__,
- nor does it allow __STDC__ to be #defined. */
-
-#ifndef ALMOST_STDC
-#define ALMOST_STDC
-#endif
-
-#include <stdio.h>
-#include <ctype.h>
-#include <errno.h>
-
-#define HAVE_TIME_T_IN_TIME_H 1
-
-#define HAVE_STDLIB_H 1
-
-#define HAVE_ERRNO_H 1
-
-#define HAVE_STDDEF_H 1
-
-#define HAVE_STRING_H 1
-
-#define HAVE_STDARG_H 1
-
-#define HAVE_VPRINTF 1
-
-#ifdef USE_MW_HEADERS
-
-#include <unix.h>
-
-#else
-
-#include <fcntl.h>
-#include <ioctl.h>
-#include <sys/stat.h>
-
-#define HAVE_FCNTL_H 1
-
-#ifndef O_ACCMODE
-#define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR)
-#endif
-
-#ifndef fileno
-#define fileno(fp) ((fp)->_file)
-#endif
-
-/* stdio.h does not define this if __STDC__, so define here. */
-
-#ifdef __STDC__
-FILE *fdopen(int fildes, const char *mode);
-#endif
-
-#endif /* USE_MW_HEADERS */
-
-/* Add ersatz definitions, for systems that lack them. */
-
-#ifndef EIO
-#define EIO 96
-#endif
-#ifndef ENOENT
-#define ENOENT 97
-#endif
-#ifndef EACCES
-#define EACCES 98
-#endif
-#ifndef ENOSYS
-#define ENOSYS 99
-#endif
-
-#ifndef R_OK
-#define R_OK 4
-#define W_OK 2
-#define X_OK 1
-#endif
-
-/* Binary files have different characteristics; for instance, no cr/nl
- translation. */
-
-#define USE_BINARY_FOPEN
-
-#include <spin.h>
-
-#ifdef MPW_C
-#undef __PTR_TO_INT
-#define __PTR_TO_INT(P) ((int)(P))
-#undef __INT_TO_PTR
-#define __INT_TO_PTR(P) ((char *)(P))
-#endif /* MPW_C */
-
-#define NO_FCNTL
-
-int fstat ();
-
-FILE *mpw_fopen ();
-int mpw_fseek ();
-int mpw_fread ();
-int mpw_fwrite ();
-int mpw_access ();
-int mpw_open ();
-int mpw_creat ();
-void mpw_abort (void);
-
-/* Map these standard functions to improved versions in libiberty. */
-
-#define fopen mpw_fopen
-#define fseek mpw_fseek
-#define fread mpw_fread
-#define fwrite mpw_fwrite
-#define open mpw_open
-#define access mpw_access
-#define creat mpw_creat
-#define abort mpw_abort
-
-#define POSIX_UTIME
-
-#define LOSING_TOTALLY
-
-/* Define this so that files will be closed before being unlinked. */
-
-#define CLOSE_BEFORE_UNLINK
-
-#endif /* __INCLUDE_MPW_H */
diff --git a/include/mpw/pwd.h b/include/mpw/pwd.h
deleted file mode 100644
index 2d4fb7040..000000000
--- a/include/mpw/pwd.h
+++ /dev/null
@@ -1,15 +0,0 @@
-#ifndef __pwd_h
-#define __pwd_h
-
-#include <sys/types.h>
-
-struct passwd {
- char *pw_name;
- uid_t pw_uid;
- gid_t pw_gid;
- char *pw_dir;
- char *pw_shell;
- char *pw_passwd;
-};
-
-#endif /* ! __pwd_h */
diff --git a/include/mpw/spin.h b/include/mpw/spin.h
deleted file mode 100644
index 674b00ac6..000000000
--- a/include/mpw/spin.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* Progress macros that use SpinCursor in MPW.
- Copyright 1994 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
-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 _SPIN_H
-#define _SPIN_H
-
-/* For MPW, progress macros just need to "spin the cursor" frequently,
- preferably several times per second on a 68K Mac. */
-
-/* In order to determine if we're meeting the goal, define this macro
- and information about frequency of spinning will be collected and
- displayed. */
-
-#define SPIN_MEASUREMENT
-
-#include <CursorCtl.h>
-
-/* Programs use this macro to indicate the start of a lengthy
- activity. STR identifies the particular activity, while N
- indicates the expected duration, in unspecified units. If N is
- zero, then the expected time to completion is unknown. */
-
-#undef START_PROGRESS
-#define START_PROGRESS(STR,N) mpw_start_progress (STR, N, __FILE__, __LINE__);
-
-/* Programs use this macro to indicate that progress has been made on a
- lengthy activity. */
-
-#undef PROGRESS
-#ifdef SPIN_MEASUREMENT
-#define PROGRESS(X) mpw_progress_measured (X, __FILE__, __LINE__);
-#else
-#define PROGRESS(X) mpw_progress (X);
-#endif
-
-/* Programs use this macro to indicate the end of a lengthy activity.
- STR must match a STR passed to START_PROGRESS previously. */
-
-#undef END_PROGRESS
-#define END_PROGRESS(STR) mpw_end_progress (STR, __FILE__, __LINE__);
-
-extern void mpw_start_progress (char *, int, char *, int);
-
-extern void mpw_progress (int);
-
-extern void mpw_progress_measured (int, char *, int);
-
-extern void mpw_end_progress (char *, char *, int);
-
-#endif /* _SPIN_H */
diff --git a/include/mpw/stat.h b/include/mpw/stat.h
deleted file mode 100644
index 057b8d531..000000000
--- a/include/mpw/stat.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/* The <sys/stat.h> header defines a struct that is used in the stat() and
- * fstat functions. The information in this struct comes from the i-node of
- * some file. These calls are the only approved way to inspect i-nodes.
- */
-
-#ifndef _STAT_H
-#define _STAT_H
-
-#ifndef _TYPES_H /* not quite right */
-#include <sys/types.h>
-#endif
-
-struct stat {
- dev_t st_dev; /* major/minor device number */
- ino_t st_ino; /* i-node number */
- mode_t st_mode; /* file mode, protection bits, etc. */
- short int st_nlink; /* # links; TEMPORARY HACK: should be nlink_t*/
- uid_t st_uid; /* uid of the file's owner */
- short int st_gid; /* gid; TEMPORARY HACK: should be gid_t */
- dev_t st_rdev;
- off_t st_size; /* file size */
- time_t st_atime; /* time of last access */
- time_t st_mtime; /* time of last data modification */
- time_t st_ctime; /* time of last file status change */
-};
-
-/* Traditional mask definitions for st_mode. */
-#define S_IFMT 0170000 /* type of file */
-#define S_IFREG 0100000 /* regular */
-#define S_IFBLK 0060000 /* block special */
-#define S_IFDIR 0040000 /* directory */
-#define S_IFCHR 0020000 /* character special */
-#define S_IFIFO 0010000 /* this is a FIFO */
-#define S_ISUID 0004000 /* set user id on execution */
-#define S_ISGID 0002000 /* set group id on execution */
- /* next is reserved for future use */
-#define S_ISVTX 01000 /* save swapped text even after use */
-
-/* POSIX masks for st_mode. */
-#define S_IRWXU 00700 /* owner: rwx------ */
-#define S_IRUSR 00400 /* owner: r-------- */
-#define S_IWUSR 00200 /* owner: -w------- */
-#define S_IXUSR 00100 /* owner: --x------ */
-
-#define S_IRWXG 00070 /* group: ---rwx--- */
-#define S_IRGRP 00040 /* group: ---r----- */
-#define S_IWGRP 00020 /* group: ----w---- */
-#define S_IXGRP 00010 /* group: -----x--- */
-
-#define S_IRWXO 00007 /* others: ------rwx */
-#define S_IROTH 00004 /* others: ------r-- */
-#define S_IWOTH 00002 /* others: -------w- */
-#define S_IXOTH 00001 /* others: --------x */
-
-/* The following macros test st_mode (from POSIX Sec. 5.6.1.1. */
-#define S_ISREG(m) ((m & S_IFMT) == S_IFREG) /* is a reg file */
-#define S_ISDIR(m) ((m & S_IFMT) == S_IFDIR) /* is a directory */
-#define S_ISCHR(m) ((m & S_IFMT) == S_IFCHR) /* is a char spec */
-#define S_ISBLK(m) ((m & S_IFMT) == S_IFBLK) /* is a block spec */
-#define S_ISFIFO(m) ((m & S_IFMT) == S_IFIFO) /* is a pipe/FIFO */
-
-
-/* Function Prototypes. */
-#ifndef _ANSI_H
-#include <ansi.h>
-#endif
-
-_PROTOTYPE( int chmod, (const char *_path, int _mode) );
-_PROTOTYPE( int fstat, (int _fildes, struct stat *_buf) );
-_PROTOTYPE( int mkdir, (const char *_path, int _mode) );
-_PROTOTYPE( int mkfifo, (const char *_path, int _mode) );
-_PROTOTYPE( int stat , (const char *_path, struct stat *_buf) );
-_PROTOTYPE( mode_t umask, (int _cmask) );
-
-#endif /* _STAT_H */
diff --git a/include/mpw/sys/file.h b/include/mpw/sys/file.h
deleted file mode 100644
index 40a8c178f..000000000
--- a/include/mpw/sys/file.h
+++ /dev/null
@@ -1 +0,0 @@
-/* empty */
diff --git a/include/mpw/sys/param.h b/include/mpw/sys/param.h
deleted file mode 100644
index 40a8c178f..000000000
--- a/include/mpw/sys/param.h
+++ /dev/null
@@ -1 +0,0 @@
-/* empty */
diff --git a/include/mpw/sys/resource.h b/include/mpw/sys/resource.h
deleted file mode 100644
index d39439d61..000000000
--- a/include/mpw/sys/resource.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef __SYS_RESOURCE_H__
-#define __SYS_RESOURCE_H__
-
-struct rusage {
- struct timeval ru_utime;
- struct timeval ru_stime;
-};
-
-#endif /* __SYS_RESOURCE_H__ */
diff --git a/include/mpw/sys/stat.h b/include/mpw/sys/stat.h
deleted file mode 100644
index b65c72e10..000000000
--- a/include/mpw/sys/stat.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* Imitation sys/stat.h. */
-
-#ifndef __SYS_STAT_H__
-#define __SYS_STAT_H__
-
-#include <sys/types.h>
-#include <time.h>
-
-struct stat {
- dev_t st_dev;
- ino_t st_ino;
- mode_t st_mode;
- short st_nlink;
- uid_t st_uid;
- gid_t st_gid;
- dev_t st_rdev;
- off_t st_size;
- off_t st_rsize;
- time_t st_atime;
- int st_spare1;
- time_t st_mtime;
- int st_spare2;
- time_t st_ctime;
- int st_spare3;
- long st_blksize;
- long st_blocks;
- long st_spare4[2];
-};
-
-#define S_IFMT 0170000L
-#define S_IFDIR 0040000L
-#define S_IFREG 0100000L
-#define S_IREAD 0400
-#define S_IWRITE 0200
-#define S_IEXEC 0100
-
-#define S_IFIFO 010000 /* FIFO special */
-#define S_IFCHR 020000 /* character special */
-#define S_IFBLK 030000 /* block special */
-
-int stat (char *path, struct stat *buf);
-int fstat (int fd, struct stat *buf);
-
-#endif /* __SYS_STAT_H___ */
diff --git a/include/mpw/sys/time.h b/include/mpw/sys/time.h
deleted file mode 100644
index f9e485232..000000000
--- a/include/mpw/sys/time.h
+++ /dev/null
@@ -1,13 +0,0 @@
-/* Imitation sys/time.h. */
-
-#ifndef __SYS_TIME_H__
-#define __SYS_TIME_H__
-
-#include <time.h>
-
-struct timeval {
- long tv_sec;
- long tv_usec;
-};
-
-#endif /* __SYS_TIME_H__ */
diff --git a/include/mpw/sys/types.h b/include/mpw/sys/types.h
deleted file mode 100644
index d7d9c9f44..000000000
--- a/include/mpw/sys/types.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/* Imitation sys/types.h. */
-
-#ifndef __SYS_TYPES_H__
-#define __SYS_TYPES_H__
-
-#include <Types.h>
-
-typedef short dev_t;
-typedef short ino_t;
-typedef unsigned short mode_t;
-typedef unsigned short uid_t;
-typedef unsigned short gid_t;
-typedef long off_t;
-
-#endif /* __SYS_TYPES_H__ */
diff --git a/include/mpw/utime.h b/include/mpw/utime.h
deleted file mode 100644
index e8bf66f2b..000000000
--- a/include/mpw/utime.h
+++ /dev/null
@@ -1,7 +0,0 @@
-
-struct utimbuf {
- time_t actime;
- time_t modtime;
-};
-
-int utime (char *, struct utimbuf *);
diff --git a/include/mpw/varargs.h b/include/mpw/varargs.h
deleted file mode 100644
index acb9e4504..000000000
--- a/include/mpw/varargs.h
+++ /dev/null
@@ -1,9 +0,0 @@
-/* varargs.h. */
-#ifndef __va_list__
-#define __va_list__
-typedef char *va_list;
-#endif
-#define va_dcl int va_alist;
-#define va_start(list) list = (char *) &va_alist
-#define va_end(list)
-#define va_arg(list,mode) ((mode *)(list += sizeof(mode)))[-1]
diff --git a/include/opcode/ChangeLog b/include/opcode/ChangeLog
index ebde6b616..bd6f448dc 100644
--- a/include/opcode/ChangeLog
+++ b/include/opcode/ChangeLog
@@ -1,3 +1,31 @@
+2004-07-09 Andreas Schwab <schwab@suse.de>
+
+ * m68k.h: Fix comment.
+
+2004-07-07 Tomer Levi <Tomer.Levi@nsc.com>
+
+ * crx.h: New file.
+
+2004-06-24 Alan Modra <amodra@bigpond.net.au>
+
+ * i386.h (i386_optab): Remove fildd, fistpd and fisttpd.
+
+2004-05-24 Peter Barada <peter@the-baradas.com>
+
+ * m68k.h: Add 'size' to m68k_opcode.
+
+2004-05-05 Peter Barada <peter@the-baradas.com>
+
+ * m68k.h: Switch from ColdFire chip name to core variant.
+
+2004-04-22 Peter Barada <peter@the-baradas.com>
+
+ * m68k.h: Add mcfmac/mcfemac definitions. Update operand
+ descriptions for new EMAC cases.
+ Remove ColdFire macmw/macml/msacmw/msacmw hacks and properly
+ handle Motorola MAC syntax.
+ Allow disassembly of ColdFire V4e object files.
+
2004-03-16 Alan Modra <amodra@bigpond.net.au>
* ppc.h (PPC_OPERAND_GPR_0): Define. Bump other operand defines.
diff --git a/include/opcode/crx.h b/include/opcode/crx.h
new file mode 100644
index 000000000..1e0d5733a
--- /dev/null
+++ b/include/opcode/crx.h
@@ -0,0 +1,395 @@
+/* crx.h -- Header file for CRX opcode and register tables.
+ Copyright 2004 Free Software Foundation, Inc.
+ Contributed by Tomer Levi, NSC, Israel.
+ Originally written for GAS 2.12 by Tomer Levi, NSC, Israel.
+ Updates, BFDizing, GNUifying and ELF support by Tomer Levi.
+
+ This file is part of GAS, GDB and the GNU binutils.
+
+ GAS, GDB, and GNU binutils 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.
+
+ GAS, GDB, and 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 program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifndef _CRX_H_
+#define _CRX_H_
+
+/* CRX core/debug Registers :
+ The enums are used as indices to CRX registers table (crx_regtab).
+ Therefore, order MUST be preserved. */
+
+typedef enum
+ {
+ /* 32-bit general purpose registers. */
+ r0, r1, r2, r3, r4, r5, r6, r7, r8, r9,
+ r10, r11, r12, r13, r14, r15, ra, sp,
+ /* 32-bit user registers. */
+ u0, u1, u2, u3, u4, u5, u6, u7, u8, u9,
+ u10, u11, u12, u13, u14, u15, ura, usp,
+ /* hi and lo registers. */
+ hi, lo,
+ /* hi and lo user registers. */
+ uhi, ulo,
+ /* Processor Status Register. */
+ psr,
+ /* Configuration Register. */
+ cfg,
+ /* Coprocessor Configuration Register. */
+ cpcfg,
+ /* Cashe Configuration Register. */
+ ccfg,
+ /* Interrupt Base Register. */
+ intbase,
+ /* Interrupt Stack Pointer Register. */
+ isp,
+ /* Coprocessor Enable Register. */
+ cen,
+ /* Program Counter Register. */
+ pc,
+ /* Not a register. */
+ nullregister,
+ MAX_REG
+ }
+reg;
+
+/* CRX Coprocessor registers and special registers :
+ The enums are used as indices to CRX coprocessor registers table
+ (crx_copregtab). Therefore, order MUST be preserved. */
+
+typedef enum
+ {
+ /* Coprocessor registers. */
+ c0 = MAX_REG, c1, c2, c3, c4, c5, c6, c7, c8,
+ c9, c10, c11, c12, c13, c14, c15,
+ /* Coprocessor special registers. */
+ cs0, cs1 ,cs2, cs3, cs4, cs5, cs6, cs7, cs8,
+ cs9, cs10, cs11, cs12, cs13, cs14, cs15,
+ /* Not a Coprocessor register. */
+ nullcopregister,
+ MAX_COPREG
+ }
+copreg;
+
+/* CRX Register types. */
+
+typedef enum
+ {
+ CRX_PC_REGTYPE, /* pc type */
+ CRX_R_REGTYPE, /* r<N> */
+ CRX_U_REGTYPE, /* u<N> */
+ CRX_C_REGTYPE, /* c<N> */
+ CRX_CS_REGTYPE, /* cs<N> */
+ CRX_MTPR_REGTYPE, /* mtpr */
+ CRX_CFG_REGTYPE /* *hi|lo, *cfg, psr */
+ }
+reg_type;
+
+/* CRX argument types :
+ The argument types correspond to instructions operands
+
+ Argument types :
+ r - register
+ c - constant
+ d - displacement
+ ic - immediate
+ icr - index register
+ rbase - register base
+ s - star ('*')
+ copr - coprocessor register
+ copsr - coprocessor special register. */
+
+typedef enum
+ {
+ arg_r, arg_c, arg_cr, arg_dc, arg_dcr, arg_sc,
+ arg_ic, arg_icr, arg_rbase, arg_copr, arg_copsr,
+ /* Not an argument. */
+ nullargs
+ }
+argtype;
+
+/* CRX operand types :
+ The operand types correspond to instructions operands
+
+ Operand Types :
+ cst4 - 4-bit encoded constant
+ iN - N-bit immediate field
+ d, dispsN - N-bit immediate signed displacement
+ dispuN - N-bit immediate unsigned displacement
+ absN - N-bit absolute address
+ rbase - 4-bit genaral-purpose register specifier
+ regr - 4-bit genaral-purpose register specifier
+ regr8 - 8-bit register address space
+ copregr - coprocessor register
+ copsregr - coprocessor special register
+ scl2 - 2-bit scaling factor for memory index
+ ridx - register index. */
+
+typedef enum
+ {
+ dummy, cst4, disps9,
+ i3, i4, i5, i8, i12, i16, i32,
+ d5, d9, d17, d25, d33,
+ abs16, abs32,
+ rbase, rbase_cst4,
+ rbase_dispu8, rbase_dispu12, rbase_dispu16, rbase_dispu28, rbase_dispu32,
+ rbase_ridx_scl2_dispu6, rbase_ridx_scl2_dispu22,
+ regr, regr8, copregr,copregr8,copsregr,
+ /* Not an operand. */
+ nulloperand,
+ /* Maximum supported operand. */
+ MAX_OPRD
+ }
+operand_type;
+
+/* CRX instruction types. */
+
+#define ARITH_INS 1
+#define LD_STOR_INS 2
+#define BRANCH_INS 3
+#define ARITH_BYTE_INS 4
+#define CMPBR_INS 5
+#define SHIFT_INS 6
+#define BRANCH_NEQ_INS 7
+#define LD_STOR_INS_INC 8
+#define STOR_IMM_INS 9
+#define CSTBIT_INS 10
+#define SYS_INS 11
+#define JMP_INS 12
+#define MUL_INS 13
+#define DIV_INS 14
+#define COP_BRANCH_INS 15
+#define COP_REG_INS 16
+#define DCR_BRANCH_INS 17
+#define MMC_INS 18
+#define MMU_INS 19
+
+/* Maximum value supported for instruction types. */
+#define CRX_INS_MAX (1 << 5)
+/* Mask to record an instruction type. */
+#define CRX_INS_MASK (CRX_INS_MAX - 1)
+/* Return instruction type, given instruction's attributes. */
+#define CRX_INS_TYPE(attr) ((attr) & CRX_INS_MASK)
+
+/* Indicates whether this instruction has a register list as parameter. */
+#define REG_LIST CRX_INS_MAX
+/* The operands in binary and assembly are placed in reverse order.
+ load - (REVERSE_MATCH)/store - (! REVERSE_MATCH). */
+#define REVERSE_MATCH (REG_LIST << 1)
+
+/* Kind of displacement map used DISPU[BWD]4. */
+#define DISPUB4 (REVERSE_MATCH << 1)
+#define DISPUW4 (DISPUB4 << 1)
+#define DISPUD4 (DISPUW4 << 1)
+#define CST4MAP (DISPUB4 | DISPUW4 | DISPUD4)
+
+/* Printing formats, where the instruction prefix isn't consecutive. */
+#define FMT_1 (DISPUD4 << 1) /* 0xF0F00000 */
+#define FMT_2 (FMT_1 << 1) /* 0xFFF0FF00 */
+#define FMT_3 (FMT_2 << 1) /* 0xFFF00F00 */
+#define FMT_4 (FMT_3 << 1) /* 0xFFF0F000 */
+#define FMT_5 (FMT_4 << 1) /* 0xFFF0FFF0 */
+#define FMT_CRX (FMT_1 | FMT_2 | FMT_3 | FMT_4 | FMT_5)
+
+#define RELAXABLE (FMT_5 << 1)
+
+/* Maximum operands per instruction. */
+#define MAX_OPERANDS 5
+/* Maximum words per instruction. */
+#define MAX_WORDS 3
+/* Maximum register name length. */
+#define MAX_REGNAME_LEN 10
+/* Maximum instruction length. */
+#define MAX_INST_LEN 256
+
+/* Single operand description. */
+
+typedef struct
+ {
+ /* Operand type. */
+ operand_type op_type;
+ /* Operand location within the opcode. */
+ unsigned int shift;
+ }
+operand_desc;
+
+/* Instruction data structure used in instruction table. */
+
+typedef struct
+ {
+ /* Name. */
+ const char *mnemonic;
+ /* Size (in words). */
+ unsigned int size;
+ /* Constant prefix (matched by the disassembler). */
+ unsigned long match;
+ /* Match size (in bits). */
+ int match_bits;
+ /* Attributes. */
+ unsigned int flags;
+ /* Operands (always last, so unreferenced operands are initialized). */
+ operand_desc operands[MAX_OPERANDS];
+ }
+inst;
+
+/* Data structure for a single instruction's arguments (Operands). */
+
+typedef struct
+ {
+ /* Register or base register. */
+ reg r;
+ /* Index register. */
+ reg i_r;
+ /* Coprocessor register. */
+ copreg cr;
+ /* Constant/immediate/absolute value. */
+ unsigned long int constant;
+ /* Scaled index mode. */
+ unsigned int scale;
+ /* Argument type. */
+ argtype type;
+ /* Size of the argument (in bits) required to represent. */
+ int size;
+ /* Indicates whether a constant is positive or negative. */
+ int signflag;
+ }
+argument;
+
+/* Internal structure to hold the various entities
+ corresponding to the current assembling instruction. */
+
+typedef struct
+ {
+ /* Number of arguments. */
+ int nargs;
+ /* The argument data structure for storing args (operands). */
+ argument arg[MAX_OPERANDS];
+/* The following fields are required only by CRX-assembler. */
+#ifdef TC_CRX
+ /* Expression used for setting the fixups (if any). */
+ expressionS exp;
+ bfd_reloc_code_real_type rtype;
+#endif /* TC_CRX */
+ /* Instruction size (in bytes). */
+ int size;
+ }
+ins;
+
+/* Structure to hold information about predefined operands. */
+
+typedef struct
+ {
+ /* Size (in bits). */
+ unsigned int bit_size;
+ /* Argument type. */
+ argtype arg_type;
+ }
+operand_entry;
+
+/* Structure to hold trap handler information. */
+
+typedef struct
+ {
+ /* Trap name. */
+ char *name;
+ /* Index in dispatch table. */
+ unsigned int entry;
+ }
+trap_entry;
+
+/* Structure to hold information about predefined registers. */
+
+typedef struct
+ {
+ /* Name (string representation). */
+ char *name;
+ /* Value (enum representation). */
+ union
+ {
+ /* Register. */
+ reg reg_val;
+ /* Coprocessor register. */
+ copreg copreg_val;
+ } value;
+ /* Register image. */
+ int image;
+ /* Register type. */
+ reg_type type;
+ }
+reg_entry;
+
+/* Structure to hold a cst4 operand mapping. */
+
+typedef struct
+ {
+ /* The binary value which is written to the object file. */
+ int binary;
+ /* The value which is mapped. */
+ int value;
+ }
+cst4_entry;
+
+/* CRX opcode table. */
+extern const inst crx_instruction[];
+extern const int crx_num_opcodes;
+#define NUMOPCODES crx_num_opcodes
+
+/* CRX operands table. */
+extern const operand_entry crx_optab[];
+
+/* CRX registers table. */
+extern const reg_entry crx_regtab[];
+extern const int crx_num_regs;
+#define NUMREGS crx_num_regs
+
+/* CRX coprocessor registers table. */
+extern const reg_entry crx_copregtab[];
+extern const int crx_num_copregs;
+#define NUMCOPREGS crx_num_copregs
+
+/* CRX trap/interrupt table. */
+extern const trap_entry crx_traps[];
+extern const int crx_num_traps;
+#define NUMTRAPS crx_num_traps
+
+/* cst4 operand mapping. */
+extern const cst4_entry cst4_map[];
+extern const int cst4_maps;
+
+/* Current instruction we're assembling. */
+extern const inst *instruction;
+
+/* A macro for representing the instruction "constant" opcode, that is,
+ the FIXED part of the instruction. The "constant" opcode is represented
+ as a 32-bit unsigned long, where OPC is expanded (by a left SHIFT)
+ over that range. */
+#define BIN(OPC,SHIFT) (OPC << SHIFT)
+
+/* Is the current instruction type is TYPE ? */
+#define IS_INSN_TYPE(TYPE) \
+ (CRX_INS_TYPE(instruction->flags) == TYPE)
+
+/* Is the current instruction mnemonic is MNEMONIC ? */
+#define IS_INSN_MNEMONIC(MNEMONIC) \
+ (strcmp(instruction->mnemonic,MNEMONIC) == 0)
+
+/* Does the current instruction has register list ? */
+#define INST_HAS_REG_LIST \
+ (instruction->flags & REG_LIST)
+
+/* Long long type handling. */
+/* Replace all appearances of 'long long int' with LONGLONG. */
+typedef long long int LONGLONG;
+typedef unsigned long long ULONGLONG;
+/* A mask for the upper 31 bits of a 64 bits type. */
+#define UPPER31_MASK 0xFFFFFFFE00000000LL
+
+#endif /* _CRX_H_ */
diff --git a/include/opcode/i386.h b/include/opcode/i386.h
index 5e3673e2b..28738854e 100644
--- a/include/opcode/i386.h
+++ b/include/opcode/i386.h
@@ -583,7 +583,6 @@ static const template i386_optab[] = {
{"fld", 1, 0xdb, 5, 0, x_FP|Modrm, { LLongMem, 0, 0} },
{"fild", 1, 0xdf, 0, 0, sl_FP|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} },
/* Intel Syntax */
-{"fildd", 1, 0xdf, 5, 0, FP|Modrm, { LLongMem, 0, 0} },
{"fildq", 1, 0xdf, 5, 0, FP|Modrm, { LLongMem, 0, 0} },
{"fildll", 1, 0xdf, 5, 0, FP|Modrm, { LLongMem, 0, 0} },
{"fldt", 1, 0xdb, 5, 0, FP|Modrm, { LLongMem, 0, 0} },
@@ -603,7 +602,6 @@ static const template i386_optab[] = {
{"fstp", 1, 0xdb, 7, 0, x_FP|Modrm, { LLongMem, 0, 0} },
{"fistp", 1, 0xdf, 3, 0, sl_FP|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} },
/* Intel Syntax */
-{"fistpd", 1, 0xdf, 7, 0, FP|Modrm, { LLongMem, 0, 0} },
{"fistpq", 1, 0xdf, 7, 0, FP|Modrm, { LLongMem, 0, 0} },
{"fistpll",1, 0xdf, 7, 0, FP|Modrm, { LLongMem, 0, 0} },
{"fstpt", 1, 0xdb, 7, 0, FP|Modrm, { LLongMem, 0, 0} },
@@ -1308,7 +1306,6 @@ static const template i386_optab[] = {
{"addsubps", 2, 0xf20fd0, X, CpuPNI, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
{"fisttp", 1, 0xdf, 1, CpuPNI, sl_FP|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} },
/* Intel Syntax */
-{"fisttpd", 1, 0xdd, 1, CpuPNI, FP|Modrm, { LLongMem, 0, 0} },
{"fisttpq", 1, 0xdd, 1, CpuPNI, FP|Modrm, { LLongMem, 0, 0} },
{"fisttpll", 1, 0xdd, 1, CpuPNI, FP|Modrm, { LLongMem, 0, 0} },
{"haddpd", 2, 0x660f7c, X, CpuPNI, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
diff --git a/include/opcode/m68k.h b/include/opcode/m68k.h
index 3f189841d..014495b97 100644
--- a/include/opcode/m68k.h
+++ b/include/opcode/m68k.h
@@ -1,6 +1,6 @@
/* Opcode table header for m680[01234]0/m6888[12]/m68851.
Copyright 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2001,
- 2003 Free Software Foundation, Inc.
+ 2003, 2004 Free Software Foundation, Inc.
This file is part of GDB, GAS, and the GNU binutils.
@@ -35,13 +35,27 @@
#define m68881 0x040
#define m68882 m68881 /* Synonym for -m68881. otherwise unused. */
#define m68851 0x080
-#define cpu32 0x100 /* e.g., 68332 */
-#define mcf5200 0x200
-#define mcf5206e 0x400
-#define mcf5307 0x800
-#define mcf5407 0x1000
-#define mcfv4e 0x2000
-#define mcf528x 0x4000
+#define cpu32 0x100 /* e.g., 68332 */
+
+#define mcfmac 0x200 /* ColdFire MAC. */
+#define mcfemac 0x400 /* ColdFire EMAC. */
+#define cfloat 0x800 /* ColdFire FPU. */
+#define mcfhwdiv 0x1000 /* ColdFire hardware divide. */
+
+#define mcfisa_a 0x2000 /* ColdFire ISA_A. */
+#define mcfisa_aa 0x4000 /* ColdFire ISA_A+. */
+#define mcfisa_b 0x8000 /* ColdFire ISA_B. */
+#define mcfusp 0x10000 /* ColdFire USP instructions. */
+
+#define mcf5200 0x20000
+#define mcf5206e 0x40000
+#define mcf521x 0x80000
+#define mcf5249 0x100000
+#define mcf528x 0x200000
+#define mcf5307 0x400000
+#define mcf5407 0x800000
+#define mcf5470 0x1000000
+#define mcf5480 0x2000000
/* Handy aliases. */
#define m68040up (m68040 | m68060)
@@ -49,13 +63,7 @@
#define m68020up (m68020 | m68030up)
#define m68010up (m68010 | cpu32 | m68020up)
#define m68000up (m68000 | m68010up)
-#define mcf (mcf5200 | mcf5206e | mcf528x | mcf5307 | mcf5407 | mcfv4e)
-#define mcf5206eup (mcf5206e | mcf528x | mcf5307 | mcf5407 | mcfv4e)
-#define mcf5307up (mcf5307 | mcf5407 | mcfv4e)
-#define mcfv4up (mcf5407 | mcfv4e)
-#define mcfv4eup (mcfv4e)
-#define cfloat (mcfv4e)
#define mfloat (m68881 | m68882 | m68040 | m68060)
#define mmmu (m68851 | m68030 | m68040 | m68060)
@@ -65,6 +73,9 @@ struct m68k_opcode
{
/* The opcode name. */
const char *name;
+ /* The pseudo-size of the instruction(in bytes). Used to determine
+ number of bytes necessary to disassemble the instruction. */
+ unsigned int size;
/* The opcode itself. */
unsigned long opcode;
/* The mask used by the disassembler. */
@@ -99,7 +110,7 @@ struct m68k_opcode_alias
operand; the second, the place it is stored. */
/* Kinds of operands:
- Characters used: AaBbCcDdEFfGHIJkLlMmnOopQqRrSsTtU VvWwXxYyZz0123|*~%;@!&$?/<>#^+-
+ Characters used: AaBbCcDdEeFfGgHIiJkLlMmnOopQqRrSsTtU VvWwXxYyZz01234|*~%;@!&$?/<>#^+-
D data register only. Stored as 3 bits.
A address register only. Stored as 3 bits.
@@ -133,9 +144,12 @@ struct m68k_opcode_alias
C the CCR. No need to store it; this is just for filtering validity.
S the SR. No need to store, just as with CCR.
U the USP. No need to store, just as with CCR.
- E the ACC. No need to store, just as with CCR.
- G the MACSR. No need to store, just as with CCR.
+ E the MAC ACC. No need to store, just as with CCR.
+ e the EMAC ACC[0123].
+ G the MAC/EMAC MACSR. No need to store, just as with CCR.
+ g the EMAC ACCEXT{01,23}.
H the MASK. No need to store, just as with CCR.
+ i the MAC/EMAC scale factor.
I Coprocessor ID. Not printed if 1. The Coprocessor ID is always
extracted from the 'd' field of word one, which means that an extended
@@ -205,7 +219,7 @@ struct m68k_opcode_alias
! control (modes 2,5,6,7.0-3)
(not 0,1,3,4,7.4)
& alterable control (modes 2,5,6,7.0,7.1)
- (not 0,1,7.2-4)
+ (not 0,1,3,4,7.2-4)
$ alterable data (modes 0,2-6,7.0,7.1)
(not 1,7.2-4)
? alterable control, or data register (modes 0,2,5,6,7.0,7.1)
@@ -230,7 +244,9 @@ struct m68k_opcode_alias
w (modes 2-5,7.2)
y (modes 2,5)
z (modes 2,5,7.2)
- x mov3q immediate operand. */
+ x mov3q immediate operand.
+ 4 (modes 2,3,4,5)
+ */
/* For the 68851: */
/* I didn't use much imagination in choosing the
@@ -283,7 +299,7 @@ struct m68k_opcode_alias
*/
/* Places to put an operand, for non-general operands:
- Characters used: BbCcDdghijkLlMmNnostWw123456789
+ Characters used: BbCcDdFfGgHhIijkLlMmNnostWw123456789/
s source, low bits of first word.
d dest, shifted 9 in first word
@@ -348,6 +364,13 @@ struct m68k_opcode_alias
F double precision float, low bit of 1st word, immediate uses 8 bytes
x extended precision float, low bit of 1st word, immediate uses 12 bytes
p packed float, low bit of 1st word, immediate uses 12 bytes
+ G EMAC accumulator, load (bit 4 2nd word, !bit8 first word)
+ H EMAC accumulator, non load (bit 4 2nd word, bit 8 first word)
+ F EMAC ACCx
+ f EMAC ACCy
+ I MAC/EMAC scale factor
+ / Like 's', but set 2nd word, bit 5 if trailing_ampersand set
+ ] first word, bit 10
*/
extern const struct m68k_opcode m68k_opcodes[];
diff --git a/include/splay-tree.h b/include/splay-tree.h
index 86707fc1d..e05aeb5af 100644
--- a/include/splay-tree.h
+++ b/include/splay-tree.h
@@ -81,21 +81,21 @@ typedef void (*splay_tree_deallocate_fn) PARAMS((void *, void *));
struct splay_tree_node_s GTY(())
{
/* The key. */
- splay_tree_key GTY ((use_param1 (""))) key;
+ splay_tree_key GTY ((use_param1)) key;
/* The value. */
- splay_tree_value GTY ((use_param2 (""))) value;
+ splay_tree_value GTY ((use_param2)) value;
/* The left and right children, respectively. */
- splay_tree_node GTY ((use_params (""))) left;
- splay_tree_node GTY ((use_params (""))) right;
+ splay_tree_node GTY ((use_params)) left;
+ splay_tree_node GTY ((use_params)) right;
};
/* The splay tree itself. */
struct splay_tree_s GTY(())
{
/* The root of the tree. */
- splay_tree_node GTY ((use_params (""))) root;
+ splay_tree_node GTY ((use_params)) root;
/* The comparision function. */
splay_tree_compare_fn comp;
@@ -109,7 +109,7 @@ struct splay_tree_s GTY(())
/* Allocate/free functions, and a data pointer to pass to them. */
splay_tree_allocate_fn allocate;
splay_tree_deallocate_fn deallocate;
- PTR GTY((skip (""))) allocate_data;
+ PTR GTY((skip)) allocate_data;
};
typedef struct splay_tree_s *splay_tree;