Ignore:
Timestamp:
Aug 16, 2003, 6:59:22 PM (22 years ago)
Author:
bird
Message:

binutils v2.14 - offical sources.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/GNU/src/binutils/bfd/cpu-sh.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    1 /* BFD library support routines for the Hitachi-SH architecture.
    2    Copyright 1993, 1994, 1997, 1998, 2000 Free Software Foundation, Inc.
     1/* BFD library support routines for the Renesas / SuperH SH architecture.
     2   Copyright 1993, 1994, 1997, 1998, 2000, 2001, 2002, 2003
     3   Free Software Foundation, Inc.
    34   Hacked by Steve Chamberlain of Cygnus Support.
    45
    5 This file is part of BFD, the Binary File Descriptor library.
     6   This file is part of BFD, the Binary File Descriptor library.
    67
    7 This program is free software; you can redistribute it and/or modify
    8 it under the terms of the GNU General Public License as published by
    9 the Free Software Foundation; either version 2 of the License, or
    10 (at your option) any later version.
     8   This program is free software; you can redistribute it and/or modify
     9   it under the terms of the GNU General Public License as published by
     10   the Free Software Foundation; either version 2 of the License, or
     11   (at your option) any later version.
    1112
    12 This program is distributed in the hope that it will be useful,
    13 but WITHOUT ANY WARRANTY; without even the implied warranty of
    14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    15 GNU General Public License for more details.
     13   This program is distributed in the hope that it will be useful,
     14   but WITHOUT ANY WARRANTY; without even the implied warranty of
     15   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     16   GNU General Public License for more details.
    1617
    17 You should have received a copy of the GNU General Public License
    18 along with this program; if not, write to the Free Software
    19 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
     18   You should have received a copy of the GNU General Public License
     19   along with this program; if not, write to the Free Software
     20   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
    2021
    2122#include "bfd.h"
     
    2324#include "libbfd.h"
    2425
    25 static boolean
    26 scan_mach (info, string)
    27      const struct bfd_arch_info *info;
    28      const char *string;
    29 {
    30   if (strcasecmp (info->printable_name, string) == 0)
    31     return true;
    32   return false;
    33 }
    34 
    3526#if 0
    3627/* This routine is provided two arch_infos and returns whether
    37    they'd be compatible */
     28   they'd be compatible. */
    3829
    3930static const bfd_arch_info_type *
     
    4334{
    4435  if (a->arch != b->arch || a->mach != b->mach)
    45    return NULL;
     36    return NULL;
    4637  return a;
    4738}
     
    5041#define SH_NEXT      &arch_info_struct[0]
    5142#define SH2_NEXT     &arch_info_struct[1]
    52 #define SH_DSP_NEXT  &arch_info_struct[2]
    53 #define SH3_NEXT     &arch_info_struct[3]
    54 #define SH3_DSP_NEXT &arch_info_struct[4]
    55 #define SH3E_NEXT    &arch_info_struct[5]
    56 #define SH4_NEXT     NULL
     43#define SH2E_NEXT    &arch_info_struct[2]
     44#define SH_DSP_NEXT  &arch_info_struct[3]
     45#define SH3_NEXT     &arch_info_struct[4]
     46#define SH3_DSP_NEXT &arch_info_struct[5]
     47#define SH3E_NEXT    &arch_info_struct[6]
     48#define SH4_NEXT     &arch_info_struct[7]
     49#define SH64_NEXT    NULL
    5750
    5851static const bfd_arch_info_type arch_info_struct[] =
     
    6760    "sh2",                      /* printable name */
    6861    1,
    69     false,                      /* not the default */
     62    FALSE,                      /* not the default */
    7063    bfd_default_compatible,
    71     scan_mach,
     64    bfd_default_scan,
    7265    SH2_NEXT
     66  },
     67  {
     68    32,                         /* 32 bits in a word */
     69    32,                         /* 32 bits in an address */
     70    8,                          /* 8 bits in a byte */
     71    bfd_arch_sh,
     72    bfd_mach_sh2e,
     73    "sh",                       /* arch_name  */
     74    "sh2e",                     /* printable name */
     75    1,
     76    FALSE,                      /* not the default */
     77    bfd_default_compatible,
     78    bfd_default_scan,
     79    SH2E_NEXT
    7380  },
    7481  {
     
    8188    "sh-dsp",                   /* printable name */
    8289    1,
    83     false,                      /* not the default */
     90    FALSE,                      /* not the default */
    8491    bfd_default_compatible,
    85     scan_mach,
     92    bfd_default_scan,
    8693    SH_DSP_NEXT
    8794  },
     
    95102    "sh3",                      /* printable name */
    96103    1,
    97     false,                      /* not the default */
     104    FALSE,                      /* not the default */
    98105    bfd_default_compatible,
    99     scan_mach,
     106    bfd_default_scan,
    100107    SH3_NEXT
    101108  },
     
    109116    "sh3-dsp",                  /* printable name */
    110117    1,
    111     false,                      /* not the default */
     118    FALSE,                      /* not the default */
    112119    bfd_default_compatible,
    113     scan_mach,
     120    bfd_default_scan,
    114121    SH3_DSP_NEXT
    115122  },
     
    123130    "sh3e",                     /* printable name */
    124131    1,
    125     false,                      /* not the default */
     132    FALSE,                      /* not the default */
    126133    bfd_default_compatible,
    127     scan_mach,
     134    bfd_default_scan,
    128135    SH3E_NEXT
    129136  },
     
    137144    "sh4",                      /* printable name */
    138145    1,
    139     false,                      /* not the default */
     146    FALSE,                      /* not the default */
    140147    bfd_default_compatible,
    141     scan_mach,
     148    bfd_default_scan,
    142149    SH4_NEXT
     150  },
     151  {
     152    64,                         /* 64 bits in a word */
     153    64,                         /* 64 bits in an address */
     154    8,                          /* 8 bits in a byte */
     155    bfd_arch_sh,
     156    bfd_mach_sh5,
     157    "sh",                       /* arch_name  */
     158    "sh5",                      /* printable name */
     159    1,
     160    FALSE,                      /* not the default */
     161    bfd_default_compatible,
     162    bfd_default_scan,
     163    SH64_NEXT
    143164  },
    144165};
     
    154175  "sh",                         /* printable name */
    155176  1,
    156   true,                         /* the default machine */
     177  TRUE,                         /* the default machine */
    157178  bfd_default_compatible,
    158   scan_mach,
     179  bfd_default_scan,
    159180  SH_NEXT
    160181};
Note: See TracChangeset for help on using the changeset viewer.