X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=bfd%2Fcpu-or1k.c;h=b9082a6b851dc56e16708d182f3f9ea56f30d7d8;hb=refs%2Fheads%2Fconcurrent-displaced-stepping-2020-04-01;hp=8cf6aacf6fd84c3443fe444556aa3f42bec83ecc;hpb=219d1afa89d0d53ca93a684cac341f16470f3ca0;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/cpu-or1k.c b/bfd/cpu-or1k.c index 8cf6aacf6f..b9082a6b85 100644 --- a/bfd/cpu-or1k.c +++ b/bfd/cpu-or1k.c @@ -1,5 +1,5 @@ /* BFD support for the OpenRISC 1000 architecture. - Copyright (C) 2002-2018 Free Software Foundation, Inc. + Copyright (C) 2002-2020 Free Software Foundation, Inc. Contributed for OR32 by Ivan Guzvinec This file is part of BFD, the Binary File Descriptor library. @@ -21,39 +21,27 @@ #include "bfd.h" #include "libbfd.h" -const bfd_arch_info_type bfd_or1k_arch; -const bfd_arch_info_type bfd_or1knd_arch; +#define N(NUMBER, PRINT, DEFAULT, NEXT) \ + { \ + 32, /* Bits in a word. */ \ + 32, /* Bits in an address. */ \ + 8, /* Bits in a byte. */ \ + bfd_arch_or1k, \ + NUMBER, \ + PRINT, \ + PRINT, \ + 4, /* Section alignment power. */ \ + DEFAULT, \ + bfd_default_compatible, \ + bfd_default_scan, \ + bfd_arch_default_fill, \ + NEXT, \ + 0 /* Maximum offset of a reloc from the start of an insn. */ \ + } -const bfd_arch_info_type bfd_or1k_arch = - { - 32, /* 32 bits in a word. */ - 32, /* 32 bits in an address. */ - 8, /* 8 bits in a byte. */ - bfd_arch_or1k, - bfd_mach_or1k, - "or1k", - "or1k", - 4, - TRUE, - bfd_default_compatible, - bfd_default_scan, - bfd_arch_default_fill, - &bfd_or1knd_arch, - }; const bfd_arch_info_type bfd_or1knd_arch = - { - 32, /* 32 bits in a word. */ - 32, /* 32 bits in an address. */ - 8, /* 8 bits in a byte. */ - bfd_arch_or1k, - bfd_mach_or1knd, - "or1knd", - "or1knd", - 4, - FALSE, - bfd_default_compatible, - bfd_default_scan, - bfd_arch_default_fill, - NULL, - }; + N (bfd_mach_or1knd, "or1knd", FALSE, NULL); + +const bfd_arch_info_type bfd_or1k_arch = + N (bfd_mach_or1k, "or1k", TRUE, &bfd_or1knd_arch);