source: trunk/third/binutils/bfd/cpu-i370.c @ 16965

Revision 16965, 2.5 KB checked in by ghudson, 22 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r16964, which included commits to RCS files with non-trunk default branches.
Line 
1/* BFD i370 CPU definition
2   Copyright 1994, 1995, 1996, 1998, 1999, 2000
3   Free Software Foundation, Inc.
4   Contributed by Ian Lance Taylor, Cygnus Support.
5   Hacked by Linas Vepstas <linas@linas.org> in 1998, 1999
6
7This file is part of BFD, the Binary File Descriptor library.
8
9This program is free software; you can redistribute it and/or modify
10it under the terms of the GNU General Public License as published by
11the Free Software Foundation; either version 2 of the License, or
12(at your option) any later version.
13
14This program is distributed in the hope that it will be useful,
15but WITHOUT ANY WARRANTY; without even the implied warranty of
16MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17GNU General Public License for more details.
18
19You should have received a copy of the GNU General Public License
20along with this program; if not, write to the Free Software
21Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
22
23#include "bfd.h"
24#include "sysdep.h"
25#include "libbfd.h"
26
27/* The common i360/370 architecture comes in many forms  */
28
29static const bfd_arch_info_type *i370_compatible
30  PARAMS ((const bfd_arch_info_type *, const bfd_arch_info_type *));
31
32static const bfd_arch_info_type *
33i370_compatible (a, b)
34     const bfd_arch_info_type *a;
35     const bfd_arch_info_type *b;
36{
37  BFD_ASSERT (a->arch == bfd_arch_i370);
38  switch (b->arch)
39    {
40    default:
41      return NULL;
42    case bfd_arch_i370:
43      return bfd_default_compatible (a, b);
44    }
45  /*NOTREACHED*/
46}
47
48static const bfd_arch_info_type arch_info_struct[] =
49{
50  /* hack alert: old old machines are really 16 and 24 bit arch ...  */
51  {
52    32, /* 32 bits in a word */
53    32, /* 32 bits in an address */
54    8,  /* 8 bits in a byte */
55    bfd_arch_i370,
56    360, /* for the 360 */
57    "i370",
58    "i370:360",
59    3,
60    false, /* not the default */
61    i370_compatible,
62    bfd_default_scan,
63    &arch_info_struct[1]
64  },
65  {
66    32, /* 32 bits in a word */
67    32, /* 32 bits in an address */
68    8,  /* 8 bits in a byte */
69    bfd_arch_i370,
70    370, /* for the 370 */
71    "i370",
72    "i370:370",
73    3,
74    false, /* not the default */
75    i370_compatible,
76    bfd_default_scan,
77    0
78  },
79};
80
81const bfd_arch_info_type bfd_i370_arch =
82  {
83    32, /* 32 bits in a word */
84    32, /* 32 bits in an address */
85    8,  /* 8 bits in a byte */
86    bfd_arch_i370,
87    0,  /* for the 360/370 common architecture */
88    "i370",
89    "i370:common",
90    3,
91    true, /* the default */
92    i370_compatible,
93    bfd_default_scan,
94    &arch_info_struct[0]
95  };
Note: See TracBrowser for help on using the repository browser.