1 /* BFD support for the AMDGCN gpu.
3 Copyright (C) 2019 Free Software Foundation, Inc.
4 Copyright (C) 2019 Advanced Micro Devices, Inc. All rights reserved.
6 This file is part of GDB.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>. */
25 #define N(MACHINE, PRINTABLE_NAME, DEFAULT, NEXT) \
27 32, /* 32 bits in a word */ \
28 64, /* 64 bits in an address */ \
29 8, /* 8 bits in a byte */ \
34 3, /* section align power */ \
36 bfd_default_compatible, \
38 bfd_arch_default_fill, \
43 #define NN(index) (&arch_info_struct[index])
45 static const bfd_arch_info_type arch_info_struct
[] =
47 N (bfd_mach_amdgcn_gfx900
, "amdgcn:gfx900", FALSE
, NN(1)),
48 N (bfd_mach_amdgcn_gfx902
, "amdgcn:gfx902", FALSE
, NN(2)),
49 N (bfd_mach_amdgcn_gfx904
, "amdgcn:gfx904", FALSE
, NN(3)),
50 N (bfd_mach_amdgcn_gfx906
, "amdgcn:gfx906", FALSE
, NN(4)),
51 N (bfd_mach_amdgcn_gfx908
, "amdgcn:gfx908", FALSE
, 0),
54 const bfd_arch_info_type bfd_amdgcn_arch
=
55 N (bfd_mach_amdgcn_unknown
, "amdgcn", TRUE
, NN(0));