]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - bfd/cpu-m32c.c
Automatic date update in version.in
[thirdparty/binutils-gdb.git] / bfd / cpu-m32c.c
CommitLineData
49f58d10 1/* BFD support for the M16C/M32C processors.
fd67aa11 2 Copyright (C) 2004-2024 Free Software Foundation, Inc.
49f58d10
JB
3
4 This file is part of BFD, the Binary File Descriptor library.
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
cd123cb7 8 the Free Software Foundation; either version 3 of the License, or
49f58d10
JB
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
cd123cb7
NC
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 MA 02110-1301, USA. */
49f58d10 20
49f58d10 21#include "sysdep.h"
3db64b00 22#include "bfd.h"
49f58d10
JB
23#include "libbfd.h"
24
91b9a4a4
NC
25/* Like bfd_default_scan but if the string is just "m32c" then
26 skip the m16c architecture. */
27
0a1b45a2 28static bool
91b9a4a4
NC
29m32c_scan (const bfd_arch_info_type * info, const char * string)
30{
31 if (strcmp (string, "m32c") == 0
32 && info->mach == bfd_mach_m16c)
0a1b45a2 33 return false;
91b9a4a4
NC
34
35 return bfd_default_scan (info, string);
36}
37
aebcfb76
NC
38#define N(number, print, align, default, next) \
39{ 32, 32, 8, bfd_arch_m32c, number, "m32c", print, align, default, \
40 bfd_default_compatible, m32c_scan, bfd_arch_default_fill, next, 0 }
41
42static const bfd_arch_info_type arch_info_struct =
0a1b45a2 43 N (bfd_mach_m32c, "m32c", 3, false, NULL);
49f58d10
JB
44
45const bfd_arch_info_type bfd_m32c_arch =
0a1b45a2 46 N (bfd_mach_m16c, "m16c", 4, true, &arch_info_struct);
aebcfb76 47