Add binutils support for v850e1 processor
[deliverable/binutils-gdb.git] / bfd / archures.c
index b73766f775fb9a78148a6b532fbb75af2da6c351..3e0cafdd3b40d25fb1298adffbf7ed2eca7d5db3 100644 (file)
@@ -1,6 +1,6 @@
 /* BFD library support routines for architectures.
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000, 2001, 2002
+   2000, 2001, 2002, 2003
    Free Software Foundation, Inc.
    Hacked by John Gilmore and Steve Chamberlain of Cygnus Support.
 
@@ -138,6 +138,7 @@ DESCRIPTION
 .#define bfd_mach_mips5400             5400
 .#define bfd_mach_mips5500             5500
 .#define bfd_mach_mips6000             6000
+.#define bfd_mach_mips7000             7000
 .#define bfd_mach_mips8000             8000
 .#define bfd_mach_mips10000            10000
 .#define bfd_mach_mips12000            12000
@@ -145,6 +146,7 @@ DESCRIPTION
 .#define bfd_mach_mips5                 5
 .#define bfd_mach_mips_sb1              12310201 {* octal 'SB', 01 *}
 .#define bfd_mach_mipsisa32             32
+.#define bfd_mach_mipsisa32r2           33
 .#define bfd_mach_mipsisa64             64
 .  bfd_arch_i386,      {* Intel 386 *}
 .#define bfd_mach_i386_i386 1
@@ -162,10 +164,14 @@ DESCRIPTION
 .  bfd_arch_m88k,      {* Motorola 88xxx *}
 .  bfd_arch_m98k,      {* Motorola 98xxx *}
 .  bfd_arch_pyramid,   {* Pyramid Technology *}
-.  bfd_arch_h8300,     {* Hitachi H8/300 *}
-.#define bfd_mach_h8300   1
-.#define bfd_mach_h8300h  2
-.#define bfd_mach_h8300s  3
+.  bfd_arch_h8300,     {* Renesas H8/300 (formerly Hitachi H8/300) *}
+.#define bfd_mach_h8300    1
+.#define bfd_mach_h8300h   2
+.#define bfd_mach_h8300s   3
+.#define bfd_mach_h8300hn  4
+.#define bfd_mach_h8300sn  5
+.#define bfd_mach_h8300sx  6
+.#define bfd_mach_h8300sxn 7
 .  bfd_arch_pdp11,     {* DEC PDP-11 *}
 .  bfd_arch_powerpc,   {* PowerPC *}
 .#define bfd_mach_ppc          32
@@ -207,11 +213,12 @@ DESCRIPTION
 .  bfd_arch_z8k,       {* Zilog Z8000 *}
 .#define bfd_mach_z8001                1
 .#define bfd_mach_z8002                2
-.  bfd_arch_h8500,     {* Hitachi H8/500 *}
-.  bfd_arch_sh,        {* Hitachi SH *}
+.  bfd_arch_h8500,     {* Renesas H8/500 (formerly Hitachi H8/500) *}
+.  bfd_arch_sh,        {* Renesas / SuperH SH (formerly Hitachi SH) *}
 .#define bfd_mach_sh            1
 .#define bfd_mach_sh2        0x20
 .#define bfd_mach_sh_dsp     0x2d
+.#define bfd_mach_sh2e       0x2e
 .#define bfd_mach_sh3        0x30
 .#define bfd_mach_sh3_dsp    0x3d
 .#define bfd_mach_sh3e       0x3e
@@ -222,6 +229,7 @@ DESCRIPTION
 .#define bfd_mach_alpha_ev5  0x20
 .#define bfd_mach_alpha_ev6  0x30
 .  bfd_arch_arm,       {* Advanced Risc Machines ARM.  *}
+.#define bfd_mach_arm_unknown  0
 .#define bfd_mach_arm_2                1
 .#define bfd_mach_arm_2a       2
 .#define bfd_mach_arm_3                3
@@ -232,29 +240,33 @@ DESCRIPTION
 .#define bfd_mach_arm_5T       8
 .#define bfd_mach_arm_5TE      9
 .#define bfd_mach_arm_XScale   10
+.#define bfd_mach_arm_ep9312   11
+.#define bfd_mach_arm_iWMMXt   12
 .  bfd_arch_ns32k,     {* National Semiconductors ns32000 *}
 .  bfd_arch_w65,       {* WDC 65816 *}
 .  bfd_arch_tic30,     {* Texas Instruments TMS320C30 *}
 .  bfd_arch_tic4x,     {* Texas Instruments TMS320C3X/4X *}
-.#define bfd_mach_c3x           30
-.#define bfd_mach_c4x           40
+.#define bfd_mach_tic3x         30
+.#define bfd_mach_tic4x         40
 .  bfd_arch_tic54x,    {* Texas Instruments TMS320C54X *}
 .  bfd_arch_tic80,     {* TI TMS320c80 (MVP) *}
 .  bfd_arch_v850,      {* NEC V850 *}
 .#define bfd_mach_v850          1
 .#define bfd_mach_v850e        'E'
+.#define bfd_mach_v850e1       '1'
 .  bfd_arch_arc,       {* ARC Cores *}
 .#define bfd_mach_arc_5         5
 .#define bfd_mach_arc_6         6
 .#define bfd_mach_arc_7         7
 .#define bfd_mach_arc_8         8
-.  bfd_arch_m32r,      {* Mitsubishi M32R/D *}
+.  bfd_arch_m32r,      {* Renesas M32R (formerly Mitsubishi M32R/D) *}
 .#define bfd_mach_m32r         1 {* For backwards compatibility.  *}
 .#define bfd_mach_m32rx                'x'
 .  bfd_arch_mn10200,   {* Matsushita MN10200 *}
 .  bfd_arch_mn10300,   {* Matsushita MN10300 *}
 .#define bfd_mach_mn10300              300
 .#define bfd_mach_am33         330
+.#define bfd_mach_am33_2       332
 .  bfd_arch_fr30,
 .#define bfd_mach_fr30         0x46523330
 .  bfd_arch_frv,
@@ -271,6 +283,9 @@ DESCRIPTION
 .  bfd_arch_ip2k,      {* Ubicom IP2K microcontrollers. *}
 .#define bfd_mach_ip2022       1
 .#define bfd_mach_ip2022ext    2
+. bfd_arch_iq2000,     {* Vitesse IQ2000.  *}
+.#define bfd_mach_iq2000        1
+.#define bfd_mach_iq10          2
 .  bfd_arch_pj,
 .  bfd_arch_avr,       {* Atmel AVR microcontrollers.  *}
 .#define bfd_mach_avr1         1
@@ -286,6 +301,23 @@ DESCRIPTION
 .  bfd_arch_mmix,      {* Donald Knuth's educational processor.  *}
 .  bfd_arch_xstormy16,
 .#define bfd_mach_xstormy16    1
+.  bfd_arch_msp430,    {* Texas Instruments MSP430 architecture.  *}
+.#define bfd_mach_msp11          11
+.#define bfd_mach_msp110         110
+.#define bfd_mach_msp12          12
+.#define bfd_mach_msp13          13
+.#define bfd_mach_msp14          14
+.#define bfd_mach_msp15          15
+.#define bfd_mach_msp16          16  
+.#define bfd_mach_msp31          31
+.#define bfd_mach_msp32          32
+.#define bfd_mach_msp33          33
+.#define bfd_mach_msp41          41
+.#define bfd_mach_msp42          42
+.#define bfd_mach_msp43          43
+.#define bfd_mach_msp44          44
+.  bfd_arch_xtensa,    {* Tensilica's Xtensa cores.  *}
+.#define bfd_mach_xtensa       1
 .  bfd_arch_last
 .  };
 */
@@ -314,10 +346,9 @@ DESCRIPTION
 .     all the entries for that arch can be accessed via <<next>>.  *}
 .  bfd_boolean the_default;
 .  const struct bfd_arch_info * (*compatible)
-.      PARAMS ((const struct bfd_arch_info *a,
-.               const struct bfd_arch_info *b));
+.    (const struct bfd_arch_info *a, const struct bfd_arch_info *b);
 .
-.  bfd_boolean (*scan) PARAMS ((const struct bfd_arch_info *, const char *));
+.  bfd_boolean (*scan) (const struct bfd_arch_info *, const char *);
 .
 .  const struct bfd_arch_info *next;
 .}
@@ -345,6 +376,7 @@ extern const bfd_arch_info_type bfd_i860_arch;
 extern const bfd_arch_info_type bfd_i960_arch;
 extern const bfd_arch_info_type bfd_ia64_arch;
 extern const bfd_arch_info_type bfd_ip2k_arch;
+extern const bfd_arch_info_type bfd_iq2000_arch;
 extern const bfd_arch_info_type bfd_m32r_arch;
 extern const bfd_arch_info_type bfd_m68hc11_arch;
 extern const bfd_arch_info_type bfd_m68hc12_arch;
@@ -355,6 +387,7 @@ extern const bfd_arch_info_type bfd_mips_arch;
 extern const bfd_arch_info_type bfd_mmix_arch;
 extern const bfd_arch_info_type bfd_mn10200_arch;
 extern const bfd_arch_info_type bfd_mn10300_arch;
+extern const bfd_arch_info_type bfd_msp430_arch;
 extern const bfd_arch_info_type bfd_ns32k_arch;
 extern const bfd_arch_info_type bfd_openrisc_arch;
 extern const bfd_arch_info_type bfd_or32_arch;
@@ -375,6 +408,7 @@ extern const bfd_arch_info_type bfd_vax_arch;
 extern const bfd_arch_info_type bfd_we32k_arch;
 extern const bfd_arch_info_type bfd_w65_arch;
 extern const bfd_arch_info_type bfd_xstormy16_arch;
+extern const bfd_arch_info_type bfd_xtensa_arch;
 extern const bfd_arch_info_type bfd_z8k_arch;
 
 static const bfd_arch_info_type * const bfd_archures_list[] =
@@ -402,6 +436,7 @@ static const bfd_arch_info_type * const bfd_archures_list[] =
     &bfd_i960_arch,
     &bfd_ia64_arch,
     &bfd_ip2k_arch,
+    &bfd_iq2000_arch,
     &bfd_m32r_arch,
     &bfd_m68hc11_arch,
     &bfd_m68hc12_arch,
@@ -412,6 +447,7 @@ static const bfd_arch_info_type * const bfd_archures_list[] =
     &bfd_mmix_arch,
     &bfd_mn10200_arch,
     &bfd_mn10300_arch,
+    &bfd_msp430_arch,
     &bfd_ns32k_arch,
     &bfd_openrisc_arch,
     &bfd_or32_arch,
@@ -430,6 +466,7 @@ static const bfd_arch_info_type * const bfd_archures_list[] =
     &bfd_w65_arch,
     &bfd_we32k_arch,
     &bfd_xstormy16_arch,
+    &bfd_xtensa_arch,
     &bfd_z8k_arch,
 #endif
   0
@@ -440,7 +477,7 @@ FUNCTION
        bfd_printable_name
 
 SYNOPSIS
-       const char *bfd_printable_name(bfd *abfd);
+       const char *bfd_printable_name (bfd *abfd);
 
 DESCRIPTION
        Return a printable string representing the architecture and machine
@@ -449,8 +486,7 @@ DESCRIPTION
 */
 
 const char *
-bfd_printable_name (abfd)
-     bfd *abfd;
+bfd_printable_name (bfd *abfd)
 {
   return abfd->arch_info->printable_name;
 }
@@ -460,7 +496,7 @@ FUNCTION
        bfd_scan_arch
 
 SYNOPSIS
-       const bfd_arch_info_type *bfd_scan_arch(const char *string);
+       const bfd_arch_info_type *bfd_scan_arch (const char *string);
 
 DESCRIPTION
        Figure out if BFD supports any cpu which could be described with
@@ -469,8 +505,7 @@ DESCRIPTION
 */
 
 const bfd_arch_info_type *
-bfd_scan_arch (string)
-     const char *string;
+bfd_scan_arch (const char *string)
 {
   const bfd_arch_info_type * const *app, *ap;
 
@@ -492,7 +527,7 @@ FUNCTION
        bfd_arch_list
 
 SYNOPSIS
-       const char **bfd_arch_list(void);
+       const char **bfd_arch_list (void);
 
 DESCRIPTION
        Return a freshly malloced NULL-terminated vector of the names
@@ -500,7 +535,7 @@ DESCRIPTION
 */
 
 const char **
-bfd_arch_list ()
+bfd_arch_list (void)
 {
   int vec_length = 0;
   const char **name_ptr;
@@ -520,7 +555,7 @@ bfd_arch_list ()
     }
 
   amt = (vec_length + 1) * sizeof (char **);
-  name_list = (const char **) bfd_malloc (amt);
+  name_list = bfd_malloc (amt);
   if (name_list == NULL)
     return NULL;
 
@@ -545,10 +580,8 @@ FUNCTION
        bfd_arch_get_compatible
 
 SYNOPSIS
-       const bfd_arch_info_type *bfd_arch_get_compatible(
-               const bfd *abfd,
-               const bfd *bbfd,
-               bfd_boolean accept_unknowns);
+       const bfd_arch_info_type *bfd_arch_get_compatible
+         (const bfd *abfd, const bfd *bbfd, bfd_boolean accept_unknowns);
 
 DESCRIPTION
        Determine whether two BFDs' architectures and machine types
@@ -559,10 +592,9 @@ DESCRIPTION
 */
 
 const bfd_arch_info_type *
-bfd_arch_get_compatible (abfd, bbfd, accept_unknowns)
-     const bfd *abfd;
-     const bfd *bbfd;
-     bfd_boolean accept_unknowns;
+bfd_arch_get_compatible (const bfd *abfd,
+                        const bfd *bbfd,
+                        bfd_boolean accept_unknowns)
 {
   const bfd * ubfd = NULL;
 
@@ -611,16 +643,14 @@ FUNCTION
        bfd_set_arch_info
 
 SYNOPSIS
-       void bfd_set_arch_info(bfd *abfd, const bfd_arch_info_type *arg);
+       void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg);
 
 DESCRIPTION
        Set the architecture info of @var{abfd} to @var{arg}.
 */
 
 void
-bfd_set_arch_info (abfd, arg)
-     bfd *abfd;
-     const bfd_arch_info_type *arg;
+bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg)
 {
   abfd->arch_info = arg;
 }
@@ -630,9 +660,8 @@ INTERNAL_FUNCTION
        bfd_default_set_arch_mach
 
 SYNOPSIS
-       bfd_boolean bfd_default_set_arch_mach(bfd *abfd,
-               enum bfd_architecture arch,
-               unsigned long mach);
+       bfd_boolean bfd_default_set_arch_mach
+         (bfd *abfd, enum bfd_architecture arch, unsigned long mach);
 
 DESCRIPTION
        Set the architecture and machine type in BFD @var{abfd}
@@ -642,10 +671,9 @@ DESCRIPTION
 */
 
 bfd_boolean
-bfd_default_set_arch_mach (abfd, arch, mach)
-     bfd *abfd;
-     enum bfd_architecture arch;
-     unsigned long mach;
+bfd_default_set_arch_mach (bfd *abfd,
+                          enum bfd_architecture arch,
+                          unsigned long mach)
 {
   abfd->arch_info = bfd_lookup_arch (arch, mach);
   if (abfd->arch_info != NULL)
@@ -661,7 +689,7 @@ FUNCTION
        bfd_get_arch
 
 SYNOPSIS
-       enum bfd_architecture bfd_get_arch(bfd *abfd);
+       enum bfd_architecture bfd_get_arch (bfd *abfd);
 
 DESCRIPTION
        Return the enumerated type which describes the BFD @var{abfd}'s
@@ -669,8 +697,7 @@ DESCRIPTION
 */
 
 enum bfd_architecture
-bfd_get_arch (abfd)
-     bfd *abfd;
+bfd_get_arch (bfd *abfd)
 {
   return abfd->arch_info->arch;
 }
@@ -680,7 +707,7 @@ FUNCTION
        bfd_get_mach
 
 SYNOPSIS
-       unsigned long bfd_get_mach(bfd *abfd);
+       unsigned long bfd_get_mach (bfd *abfd);
 
 DESCRIPTION
        Return the long type which describes the BFD @var{abfd}'s
@@ -688,8 +715,7 @@ DESCRIPTION
 */
 
 unsigned long
-bfd_get_mach (abfd)
-     bfd *abfd;
+bfd_get_mach (bfd *abfd)
 {
   return abfd->arch_info->mach;
 }
@@ -699,7 +725,7 @@ FUNCTION
        bfd_arch_bits_per_byte
 
 SYNOPSIS
-       unsigned int bfd_arch_bits_per_byte(bfd *abfd);
+       unsigned int bfd_arch_bits_per_byte (bfd *abfd);
 
 DESCRIPTION
        Return the number of bits in one of the BFD @var{abfd}'s
@@ -707,8 +733,7 @@ DESCRIPTION
 */
 
 unsigned int
-bfd_arch_bits_per_byte (abfd)
-     bfd *abfd;
+bfd_arch_bits_per_byte (bfd *abfd)
 {
   return abfd->arch_info->bits_per_byte;
 }
@@ -718,7 +743,7 @@ FUNCTION
        bfd_arch_bits_per_address
 
 SYNOPSIS
-       unsigned int bfd_arch_bits_per_address(bfd *abfd);
+       unsigned int bfd_arch_bits_per_address (bfd *abfd);
 
 DESCRIPTION
        Return the number of bits in one of the BFD @var{abfd}'s
@@ -726,8 +751,7 @@ DESCRIPTION
 */
 
 unsigned int
-bfd_arch_bits_per_address (abfd)
-     bfd *abfd;
+bfd_arch_bits_per_address (bfd *abfd)
 {
   return abfd->arch_info->bits_per_address;
 }
@@ -738,17 +762,15 @@ INTERNAL_FUNCTION
 
 SYNOPSIS
        const bfd_arch_info_type *bfd_default_compatible
-       (const bfd_arch_info_type *a,
-       const bfd_arch_info_type *b);
+         (const bfd_arch_info_type *a, const bfd_arch_info_type *b);
 
 DESCRIPTION
        The default function for testing for compatibility.
 */
 
 const bfd_arch_info_type *
-bfd_default_compatible (a, b)
-     const bfd_arch_info_type *a;
-     const bfd_arch_info_type *b;
+bfd_default_compatible (const bfd_arch_info_type *a,
+                       const bfd_arch_info_type *b)
 {
   if (a->arch != b->arch)
     return NULL;
@@ -770,7 +792,8 @@ INTERNAL_FUNCTION
        bfd_default_scan
 
 SYNOPSIS
-       bfd_boolean bfd_default_scan(const struct bfd_arch_info *info, const char *string);
+       bfd_boolean bfd_default_scan
+         (const struct bfd_arch_info *info, const char *string);
 
 DESCRIPTION
        The default function for working out whether this is an
@@ -778,9 +801,7 @@ DESCRIPTION
 */
 
 bfd_boolean
-bfd_default_scan (info, string)
-     const bfd_arch_info_type *info;
-     const char *string;
+bfd_default_scan (const bfd_arch_info_type *info, const char *string)
 {
   const char *ptr_src;
   const char *ptr_tst;
@@ -989,15 +1010,14 @@ FUNCTION
        bfd_get_arch_info
 
 SYNOPSIS
-       const bfd_arch_info_type * bfd_get_arch_info(bfd *abfd);
+       const bfd_arch_info_type *bfd_get_arch_info (bfd *abfd);
 
 DESCRIPTION
        Return the architecture info struct in @var{abfd}.
 */
 
 const bfd_arch_info_type *
-bfd_get_arch_info (abfd)
-     bfd *abfd;
+bfd_get_arch_info (bfd *abfd)
 {
   return abfd->arch_info;
 }
@@ -1008,9 +1028,7 @@ FUNCTION
 
 SYNOPSIS
        const bfd_arch_info_type *bfd_lookup_arch
-               (enum bfd_architecture
-               arch,
-               unsigned long machine);
+         (enum bfd_architecture arch, unsigned long machine);
 
 DESCRIPTION
        Look for the architecure info structure which matches the
@@ -1020,9 +1038,7 @@ DESCRIPTION
 */
 
 const bfd_arch_info_type *
-bfd_lookup_arch (arch, machine)
-     enum bfd_architecture arch;
-     unsigned long machine;
+bfd_lookup_arch (enum bfd_architecture arch, unsigned long machine)
 {
   const bfd_arch_info_type * const *app, *ap;
 
@@ -1046,7 +1062,7 @@ FUNCTION
 
 SYNOPSIS
        const char *bfd_printable_arch_mach
-               (enum bfd_architecture arch, unsigned long machine);
+         (enum bfd_architecture arch, unsigned long machine);
 
 DESCRIPTION
        Return a printable string representing the architecture and
@@ -1056,9 +1072,7 @@ DESCRIPTION
 */
 
 const char *
-bfd_printable_arch_mach (arch, machine)
-     enum bfd_architecture arch;
-     unsigned long machine;
+bfd_printable_arch_mach (enum bfd_architecture arch, unsigned long machine)
 {
   const bfd_arch_info_type *ap = bfd_lookup_arch (arch, machine);
 
@@ -1072,7 +1086,7 @@ FUNCTION
        bfd_octets_per_byte
 
 SYNOPSIS
-       unsigned int bfd_octets_per_byte(bfd *abfd);
+       unsigned int bfd_octets_per_byte (bfd *abfd);
 
 DESCRIPTION
        Return the number of octets (8-bit quantities) per target byte
@@ -1081,8 +1095,7 @@ DESCRIPTION
 */
 
 unsigned int
-bfd_octets_per_byte (abfd)
-     bfd *abfd;
+bfd_octets_per_byte (bfd *abfd)
 {
   return bfd_arch_mach_octets_per_byte (bfd_get_arch (abfd),
                                        bfd_get_mach (abfd));
@@ -1093,8 +1106,8 @@ FUNCTION
        bfd_arch_mach_octets_per_byte
 
 SYNOPSIS
-       unsigned int bfd_arch_mach_octets_per_byte(enum bfd_architecture arch,
-                                                   unsigned long machine);
+       unsigned int bfd_arch_mach_octets_per_byte
+         (enum bfd_architecture arch, unsigned long machine);
 
 DESCRIPTION
        See bfd_octets_per_byte.
@@ -1104,9 +1117,8 @@ DESCRIPTION
 */
 
 unsigned int
-bfd_arch_mach_octets_per_byte (arch, mach)
-     enum bfd_architecture arch;
-     unsigned long mach;
+bfd_arch_mach_octets_per_byte (enum bfd_architecture arch,
+                              unsigned long mach)
 {
   const bfd_arch_info_type *ap = bfd_lookup_arch (arch, mach);
 
This page took 0.030082 seconds and 4 git commands to generate.