1 /* BFD support for the NDS32 processor
2 Copyright (C) 2012-2017 Free Software Foundation, Inc.
3 Contributed by Andes Technology Corporation.
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; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
27 #define N(number, print, default, next) \
28 {32, 32, 8, bfd_arch_nds32, number, "nds32", print, 4, default, \
29 bfd_default_compatible, bfd_default_scan, bfd_arch_default_fill, next }
31 #define NEXT &arch_info_struct[0]
32 #define NDS32V2_NEXT &arch_info_struct[1]
33 #define NDS32V3_NEXT &arch_info_struct[2]
34 #define NDS32V3M_NEXT &arch_info_struct[3]
36 static const bfd_arch_info_type arch_info_struct
[] =
38 N (bfd_mach_n1h
, "n1h", FALSE
, NDS32V2_NEXT
),
39 N (bfd_mach_n1h_v2
, "n1h_v2", FALSE
, NDS32V3_NEXT
),
40 N (bfd_mach_n1h_v3
, "n1h_v3", FALSE
, NDS32V3M_NEXT
),
41 N (bfd_mach_n1h_v3m
, "n1h_v3m", FALSE
, NULL
),
44 const bfd_arch_info_type bfd_nds32_arch
=
45 N (bfd_mach_n1
, "n1h", TRUE
, NEXT
);