xref: /netbsd-src/external/gpl3/binutils/dist/bfd/cpu-bpf.c (revision cb63e24e8d6aae7ddac1859a9015f48b1d8bd90e)
16f4ced0bSchristos /* BFD support for the BPF processor.
2*cb63e24eSchristos    Copyright (C) 2019-2024 Free Software Foundation, Inc.
36f4ced0bSchristos    Contributed by Oracle Inc.
46f4ced0bSchristos 
56f4ced0bSchristos    This file is part of BFD, the Binary File Descriptor library.
66f4ced0bSchristos 
76f4ced0bSchristos    This program is free software; you can redistribute it and/or modify
86f4ced0bSchristos    it under the terms of the GNU General Public License as published by
96f4ced0bSchristos    the Free Software Foundation; either version 3 of the License, or
106f4ced0bSchristos    (at your option) any later version.
116f4ced0bSchristos 
126f4ced0bSchristos    This program is distributed in the hope that it will be useful,
136f4ced0bSchristos    but WITHOUT ANY WARRANTY; without even the implied warranty of
146f4ced0bSchristos    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
156f4ced0bSchristos    GNU General Public License for more details.
166f4ced0bSchristos 
176f4ced0bSchristos    You should have received a copy of the GNU General Public License
186f4ced0bSchristos    along with this program; if not, write to the Free Software
196f4ced0bSchristos    Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
206f4ced0bSchristos    MA 02110-1301, USA.  */
216f4ced0bSchristos 
226f4ced0bSchristos #include "sysdep.h"
236f4ced0bSchristos #include "bfd.h"
246f4ced0bSchristos #include "libbfd.h"
256f4ced0bSchristos 
264f645668Schristos 
274f645668Schristos static const bfd_arch_info_type bfd_xbpf_arch =
284f645668Schristos {
294f645668Schristos   64,				/* Bits per word.  */
304f645668Schristos   64,				/* Bits per address.  */
314f645668Schristos   8,				/* Bits per byte.  */
324f645668Schristos   bfd_arch_bpf,			/* Architecture.  */
334f645668Schristos   bfd_mach_xbpf,		/* Machine.  */
344f645668Schristos   "bpf",			/* Architecture name.  */
354f645668Schristos   "xbpf",			/* Machine name.  */
364f645668Schristos   3,				/* Section align power.  */
374f645668Schristos   false,			/* The default ?  */
384f645668Schristos   bfd_default_compatible,	/* Architecture comparison fn.  */
394f645668Schristos   bfd_default_scan,		/* String to architecture convert fn.  */
404f645668Schristos   bfd_arch_default_fill,	/* Default fill.  */
414f645668Schristos   NULL,				/* Next in list.  */
424f645668Schristos   0 /* Maximum offset of a reloc from the start of an insn.  */
434f645668Schristos };
444f645668Schristos 
454f645668Schristos 
466f4ced0bSchristos const bfd_arch_info_type bfd_bpf_arch =
476f4ced0bSchristos {
486f4ced0bSchristos   64,				/* Bits per word.  */
496f4ced0bSchristos   64,				/* Bits per address.  */
506f4ced0bSchristos   8,				/* Bits per byte.  */
516f4ced0bSchristos   bfd_arch_bpf,			/* Architecture.  */
526f4ced0bSchristos   bfd_mach_bpf,			/* Machine.  */
536f4ced0bSchristos   "bpf",			/* Architecture name.  */
546f4ced0bSchristos   "bpf",			/* Machine name.  */
556f4ced0bSchristos   3,				/* Section align power.  */
564f645668Schristos   true,				/* The default ?  */
576f4ced0bSchristos   bfd_default_compatible,	/* Architecture comparison fn.  */
586f4ced0bSchristos   bfd_default_scan,		/* String to architecture convert fn.  */
596f4ced0bSchristos   bfd_arch_default_fill,	/* Default fill.  */
604f645668Schristos   &bfd_xbpf_arch,		/* Next in list.  */
616f4ced0bSchristos   0 /* Maximum offset of a reloc from the start of an insn.  */
626f4ced0bSchristos };
63