xref: /netbsd/external/gpl3/gdb/dist/bfd/cpu-alpha.c (revision 1424dfb3)
1377e23a2Schristos /* BFD support for the Alpha architecture.
2*1424dfb3Schristos    Copyright (C) 1992-2020 Free Software Foundation, Inc.
3377e23a2Schristos 
4377e23a2Schristos    This file is part of BFD, the Binary File Descriptor library.
5377e23a2Schristos 
6377e23a2Schristos    This program is free software; you can redistribute it and/or modify
7377e23a2Schristos    it under the terms of the GNU General Public License as published by
8377e23a2Schristos    the Free Software Foundation; either version 3 of the License, or
9377e23a2Schristos    (at your option) any later version.
10377e23a2Schristos 
11377e23a2Schristos    This program is distributed in the hope that it will be useful,
12377e23a2Schristos    but WITHOUT ANY WARRANTY; without even the implied warranty of
13377e23a2Schristos    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14377e23a2Schristos    GNU General Public License for more details.
15377e23a2Schristos 
16377e23a2Schristos    You should have received a copy of the GNU General Public License
17377e23a2Schristos    along with this program; if not, write to the Free Software
18377e23a2Schristos    Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
19377e23a2Schristos    MA 02110-1301, USA.  */
20377e23a2Schristos 
21377e23a2Schristos #include "sysdep.h"
22377e23a2Schristos #include "bfd.h"
23377e23a2Schristos #include "libbfd.h"
24377e23a2Schristos 
25377e23a2Schristos #define N(BITS_WORD, BITS_ADDR, NUMBER, PRINT, DEFAULT, NEXT) \
26377e23a2Schristos   {							\
27*1424dfb3Schristos     BITS_WORD, /* Bits in a word.  */			\
28*1424dfb3Schristos     BITS_ADDR, /* Bits in an address.  */		\
29*1424dfb3Schristos     8,	       /* Bits in a byte.  */			\
30377e23a2Schristos     bfd_arch_alpha,					\
31377e23a2Schristos     NUMBER,						\
32377e23a2Schristos     "alpha",						\
33377e23a2Schristos     PRINT,						\
34*1424dfb3Schristos     3,		/* Section alignment power. */		\
35377e23a2Schristos     DEFAULT,						\
36377e23a2Schristos     bfd_default_compatible,				\
37377e23a2Schristos     bfd_default_scan,					\
3848596154Schristos     bfd_arch_default_fill,				\
39377e23a2Schristos     NEXT,						\
40*1424dfb3Schristos     0 /* Maximum offset of a reloc from the start of an insn.  */ \
41377e23a2Schristos   }
42377e23a2Schristos 
43377e23a2Schristos #define NN(index) (&arch_info_struct[index])
44377e23a2Schristos 
45377e23a2Schristos /* These exist only so that we can reasonably disassemble PALcode.  */
46377e23a2Schristos static const bfd_arch_info_type arch_info_struct[] =
47377e23a2Schristos {
48377e23a2Schristos   N (64, 64, bfd_mach_alpha_ev4, "alpha:ev4", FALSE, NN(1)),
49377e23a2Schristos   N (64, 64, bfd_mach_alpha_ev5, "alpha:ev5", FALSE, NN(2)),
50377e23a2Schristos   N (64, 64, bfd_mach_alpha_ev6, "alpha:ev6", FALSE, 0),
51377e23a2Schristos };
52377e23a2Schristos 
53377e23a2Schristos const bfd_arch_info_type bfd_alpha_arch =
54377e23a2Schristos   N (64, 64, 0, "alpha", TRUE, NN(0));
55