xref: /netbsd-src/external/gpl3/binutils/dist/bfd/cpu-hppa.c (revision cb63e24e8d6aae7ddac1859a9015f48b1d8bd90e)
12a6b7db3Sskrll /* BFD support for the HP Precision Architecture architecture.
2*cb63e24eSchristos    Copyright (C) 1992-2024 Free Software Foundation, Inc.
32a6b7db3Sskrll 
42a6b7db3Sskrll    This file is part of BFD, the Binary File Descriptor library.
52a6b7db3Sskrll 
62a6b7db3Sskrll    This program is free software; you can redistribute it and/or modify
72a6b7db3Sskrll    it under the terms of the GNU General Public License as published by
82a6b7db3Sskrll    the Free Software Foundation; either version 3 of the License, or
92a6b7db3Sskrll    (at your option) any later version.
102a6b7db3Sskrll 
112a6b7db3Sskrll    This program is distributed in the hope that it will be useful,
122a6b7db3Sskrll    but WITHOUT ANY WARRANTY; without even the implied warranty of
132a6b7db3Sskrll    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
142a6b7db3Sskrll    GNU General Public License for more details.
152a6b7db3Sskrll 
162a6b7db3Sskrll    You should have received a copy of the GNU General Public License
172a6b7db3Sskrll    along with this program; if not, write to the Free Software
182a6b7db3Sskrll    Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
192a6b7db3Sskrll    MA 02110-1301, USA.  */
202a6b7db3Sskrll 
212a6b7db3Sskrll #include "sysdep.h"
222a6b7db3Sskrll #include "bfd.h"
232a6b7db3Sskrll #include "libbfd.h"
242a6b7db3Sskrll 
256f4ced0bSchristos #define N(BITS, NUMBER, PRINT, DEFAULT, NEXT) \
266f4ced0bSchristos   {							\
276f4ced0bSchristos     BITS,      /* Bits in a word.  */			\
286f4ced0bSchristos     BITS,      /* Bits in an address.  */		\
296f4ced0bSchristos     8,	       /* Bits in a byte.  */			\
306f4ced0bSchristos     bfd_arch_hppa,					\
316f4ced0bSchristos     NUMBER,						\
326f4ced0bSchristos     "hppa",						\
336f4ced0bSchristos     PRINT,						\
346f4ced0bSchristos     3,		/* Section alignment power.  */		\
356f4ced0bSchristos     DEFAULT,						\
366f4ced0bSchristos     bfd_default_compatible,				\
376f4ced0bSchristos     bfd_default_scan,					\
386f4ced0bSchristos     bfd_arch_default_fill,				\
396f4ced0bSchristos     NEXT,						\
406f4ced0bSchristos     0 /* Maximum offset of a reloc from the start of an insn.  */ \
416f4ced0bSchristos   }
426f4ced0bSchristos 
436f4ced0bSchristos 
442a6b7db3Sskrll static const bfd_arch_info_type bfd_hppa10_arch =
454f645668Schristos   N (32, bfd_mach_hppa10, "hppa1.0", true, NULL);
462a6b7db3Sskrll 
476f4ced0bSchristos /* PA2.0 in narrow mode.  */
482a6b7db3Sskrll static const bfd_arch_info_type bfd_hppa20_arch =
494f645668Schristos   N (32, bfd_mach_hppa20, "hppa2.0", false, &bfd_hppa10_arch);
502a6b7db3Sskrll 
516f4ced0bSchristos /* PA2.0 in wide mode.  */
522a6b7db3Sskrll static const bfd_arch_info_type bfd_hppa20w_arch =
534f645668Schristos   N (64, bfd_mach_hppa20w, "hppa2.0w", false, &bfd_hppa20_arch);
542a6b7db3Sskrll 
552a6b7db3Sskrll const bfd_arch_info_type bfd_hppa_arch =
564f645668Schristos   N (32, bfd_mach_hppa11, "hppa1.1", false, &bfd_hppa20w_arch);
57