1 /* BFD support for LoongArch.
2 Copyright (C) 2021-2023 Free Software Foundation, Inc.
3 Contributed by Loongson Ltd.
5 This file is part of BFD, the Binary File Descriptor library.
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 3 of the License, or
10 (at your option) any later version.
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.
17 You should have received a copy of the GNU General Public License
18 along with this program; see the file COPYING3. If not,
19 see <http://www.gnu.org/licenses/>. */
25 static const bfd_arch_info_type bfd_loongarch32_arch
=
27 32, /* 32 bits in a word. */
28 32, /* 64 bits in an address. */
29 8, /* 8 bits in a byte. */
30 bfd_arch_loongarch
, /* Architecture. */
31 bfd_mach_loongarch32
, /* Machine number - 0 for now. */
32 "loongarch32", /* Architecture name. */
33 "Loongarch32", /* Printable name. */
34 3, /* Section align power. */
35 false, /* This is the default architecture. */
36 bfd_default_compatible
, /* Architecture comparison function. */
37 bfd_default_scan
, /* String to architecture conversion. */
38 bfd_arch_default_fill
, /* Default fill. */
39 NULL
, /* Next in list. */
43 const bfd_arch_info_type bfd_loongarch_arch
=
45 32, /* 32 bits in a word. */
46 64, /* 64 bits in an address. */
47 8, /* 8 bits in a byte. */
48 bfd_arch_loongarch
, /* Architecture. */
49 /* Machine number of LoongArch64 is larger
50 * so that LoongArch64 is compatible to LoongArch32. */
52 "loongarch64", /* Architecture name. */
53 "Loongarch64", /* Printable name. */
54 3, /* Section align power. */
55 true, /* This is the default architecture. */
56 bfd_default_compatible
, /* Architecture comparison function. */
57 bfd_default_scan
, /* String to architecture conversion. */
58 bfd_arch_default_fill
, /* Default fill. */
59 &bfd_loongarch32_arch
, /* Next in list. */