1867d70fcSchristos /* BFD support for C-SKY processors. 2*c42dbd0eSchristos Copyright (C) 1994-2022 Free Software Foundation, Inc. 3867d70fcSchristos Contributed by C-SKY Microsystems and Mentor Graphics. 4867d70fcSchristos 5867d70fcSchristos This file is part of BFD, the Binary File Descriptor library. 6867d70fcSchristos 7867d70fcSchristos This program is free software; you can redistribute it and/or modify 8867d70fcSchristos it under the terms of the GNU General Public License as published by 9867d70fcSchristos the Free Software Foundation; either version 3 of the License, or 10867d70fcSchristos (at your option) any later version. 11867d70fcSchristos 12867d70fcSchristos This program is distributed in the hope that it will be useful, 13867d70fcSchristos but WITHOUT ANY WARRANTY; without even the implied warranty of 14867d70fcSchristos MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15867d70fcSchristos GNU General Public License for more details. 16867d70fcSchristos 17867d70fcSchristos You should have received a copy of the GNU General Public License 18867d70fcSchristos along with this program; if not, write to the Free Software 19867d70fcSchristos Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, 20867d70fcSchristos MA 02110-1301, USA. */ 21867d70fcSchristos 22867d70fcSchristos #include "sysdep.h" 23867d70fcSchristos #include "bfd.h" 24867d70fcSchristos #include "libbfd.h" 25867d70fcSchristos 26867d70fcSchristos #define N(NUMBER, PRINT, ISDEFAULT, NEXT) \ 27867d70fcSchristos { \ 28867d70fcSchristos 32, /* Bits in a word. */ \ 29867d70fcSchristos 32, /* Bits in an address. */ \ 30867d70fcSchristos 8, /* Bits in a byte. */ \ 31867d70fcSchristos bfd_arch_csky, /* Architecture. */ \ 32867d70fcSchristos NUMBER, /* Machine number. */ \ 33867d70fcSchristos "csky", /* Architecture name. */ \ 34867d70fcSchristos PRINT, /* Printable name. */ \ 35867d70fcSchristos 3, /* Section align power. */ \ 36867d70fcSchristos ISDEFAULT, /* Is this the default architecture ? */ \ 37867d70fcSchristos bfd_default_compatible, /* Architecture comparison function. */ \ 38867d70fcSchristos bfd_default_scan, /* String to architecture conversion. */ \ 39867d70fcSchristos bfd_arch_default_fill, \ 40867d70fcSchristos NEXT, /* Next in list. */ \ 41867d70fcSchristos 0 /* Maximum offset of a reloc from the start of an insn. */ \ 42867d70fcSchristos } 43867d70fcSchristos 44867d70fcSchristos static const bfd_arch_info_type arch_info_struct[] = 45867d70fcSchristos { 46867d70fcSchristos /* ABI v1 processors. */ 47*c42dbd0eSchristos N (bfd_mach_ck510, "csky:ck510", false, & arch_info_struct[1]), 48*c42dbd0eSchristos N (bfd_mach_ck610, "csky:ck610", false, & arch_info_struct[2]), 49867d70fcSchristos 50867d70fcSchristos /* ABI v2 processors. */ 51*c42dbd0eSchristos N (bfd_mach_ck801, "csky:ck801", false, & arch_info_struct[3]), 52*c42dbd0eSchristos N (bfd_mach_ck802, "csky:ck802", false, & arch_info_struct[4]), 53*c42dbd0eSchristos N (bfd_mach_ck803, "csky:ck803", false, & arch_info_struct[5]), 54*c42dbd0eSchristos N (bfd_mach_ck807, "csky:ck807", false, & arch_info_struct[6]), 55*c42dbd0eSchristos N (bfd_mach_ck810, "csky:ck810", false, & arch_info_struct[7]), 56*c42dbd0eSchristos N (bfd_mach_ck860, "csky:ck860", false, & arch_info_struct[8]), 57*c42dbd0eSchristos N (bfd_mach_ck_unknown, "csky:any", false, NULL) 58867d70fcSchristos }; 59867d70fcSchristos 60867d70fcSchristos const bfd_arch_info_type bfd_csky_arch = 61*c42dbd0eSchristos N (0, "csky", true, & arch_info_struct[0]); 62