16f4ced0bSchristos /* BFD support for C-SKY processors. 2*cb63e24eSchristos Copyright (C) 1994-2024 Free Software Foundation, Inc. 36f4ced0bSchristos Contributed by C-SKY Microsystems and Mentor Graphics. 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 266f4ced0bSchristos #define N(NUMBER, PRINT, ISDEFAULT, NEXT) \ 276f4ced0bSchristos { \ 286f4ced0bSchristos 32, /* Bits in a word. */ \ 296f4ced0bSchristos 32, /* Bits in an address. */ \ 306f4ced0bSchristos 8, /* Bits in a byte. */ \ 316f4ced0bSchristos bfd_arch_csky, /* Architecture. */ \ 326f4ced0bSchristos NUMBER, /* Machine number. */ \ 336f4ced0bSchristos "csky", /* Architecture name. */ \ 346f4ced0bSchristos PRINT, /* Printable name. */ \ 356f4ced0bSchristos 3, /* Section align power. */ \ 366f4ced0bSchristos ISDEFAULT, /* Is this the default architecture ? */ \ 376f4ced0bSchristos bfd_default_compatible, /* Architecture comparison function. */ \ 386f4ced0bSchristos bfd_default_scan, /* String to architecture conversion. */ \ 396f4ced0bSchristos bfd_arch_default_fill, \ 406f4ced0bSchristos NEXT, /* Next in list. */ \ 416f4ced0bSchristos 0 /* Maximum offset of a reloc from the start of an insn. */ \ 426f4ced0bSchristos } 436f4ced0bSchristos 446f4ced0bSchristos static const bfd_arch_info_type arch_info_struct[] = 456f4ced0bSchristos { 466f4ced0bSchristos /* ABI v1 processors. */ 474f645668Schristos N (bfd_mach_ck510, "csky:ck510", false, & arch_info_struct[1]), 484f645668Schristos N (bfd_mach_ck610, "csky:ck610", false, & arch_info_struct[2]), 496f4ced0bSchristos 506f4ced0bSchristos /* ABI v2 processors. */ 514f645668Schristos N (bfd_mach_ck801, "csky:ck801", false, & arch_info_struct[3]), 524f645668Schristos N (bfd_mach_ck802, "csky:ck802", false, & arch_info_struct[4]), 534f645668Schristos N (bfd_mach_ck803, "csky:ck803", false, & arch_info_struct[5]), 544f645668Schristos N (bfd_mach_ck807, "csky:ck807", false, & arch_info_struct[6]), 554f645668Schristos N (bfd_mach_ck810, "csky:ck810", false, & arch_info_struct[7]), 564f645668Schristos N (bfd_mach_ck860, "csky:ck860", false, & arch_info_struct[8]), 574f645668Schristos N (bfd_mach_ck_unknown, "csky:any", false, NULL) 586f4ced0bSchristos }; 596f4ced0bSchristos 606f4ced0bSchristos const bfd_arch_info_type bfd_csky_arch = 614f645668Schristos N (0, "csky", true, & arch_info_struct[0]); 62