X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=opcodes%2Fmep-desc.c;h=b77681701e6614a38723ff6de23ff893e2253426;hb=384f368958f2a5bb083660e58e5f8a010e6ad429;hp=ab0f9bd51850daed1016ee0e774de0293015dfcc;hpb=bd2f2e55ad54541340e5ea415f1aba65aa80717e;p=deliverable%2Fbinutils-gdb.git diff --git a/opcodes/mep-desc.c b/opcodes/mep-desc.c index ab0f9bd518..b77681701e 100644 --- a/opcodes/mep-desc.c +++ b/opcodes/mep-desc.c @@ -1,24 +1,25 @@ +/* DO NOT EDIT! -*- buffer-read-only: t -*- vi:set ro: */ /* CPU data for mep. THIS FILE IS MACHINE GENERATED WITH CGEN. -Copyright 1996-2005 Free Software Foundation, Inc. +Copyright (C) 1996-2020 Free Software Foundation, Inc. This file is part of the GNU Binutils and/or GDB, the GNU debugger. -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. + This file is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. + It is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public + License for more details. -You should have received a copy of the GNU General Public License along -with this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ @@ -48,6 +49,7 @@ static const CGEN_ATTR_ENTRY MACH_attr[] ATTRIBUTE_UNUSED = { "base", MACH_BASE }, { "mep", MACH_MEP }, { "h1", MACH_H1 }, + { "c5", MACH_C5 }, { "max", MACH_MAX }, { 0, 0 } }; @@ -56,11 +58,10 @@ static const CGEN_ATTR_ENTRY ISA_attr[] ATTRIBUTE_UNUSED = { { "mep", ISA_MEP }, { "ext_core1", ISA_EXT_CORE1 }, - { "ext_core2", ISA_EXT_CORE2 }, - { "ext_cop2_16", ISA_EXT_COP2_16 }, - { "ext_cop2_32", ISA_EXT_COP2_32 }, - { "ext_cop2_48", ISA_EXT_COP2_48 }, - { "ext_cop2_64", ISA_EXT_COP2_64 }, + { "ext_cop1_16", ISA_EXT_COP1_16 }, + { "ext_cop1_32", ISA_EXT_COP1_32 }, + { "ext_cop1_48", ISA_EXT_COP1_48 }, + { "ext_cop1_64", ISA_EXT_COP1_64 }, { "max", ISA_MAX }, { 0, 0 } }; @@ -82,13 +83,34 @@ static const CGEN_ATTR_ENTRY CDATA_attr[] ATTRIBUTE_UNUSED = { 0, 0 } }; -static const CGEN_ATTR_ENTRY ALIGN_attr [] ATTRIBUTE_UNUSED = +static const CGEN_ATTR_ENTRY CPTYPE_attr[] ATTRIBUTE_UNUSED = +{ + { "CP_DATA_BUS_INT", CPTYPE_CP_DATA_BUS_INT }, + { "VECT", CPTYPE_VECT }, + { "V2SI", CPTYPE_V2SI }, + { "V4HI", CPTYPE_V4HI }, + { "V8QI", CPTYPE_V8QI }, + { "V2USI", CPTYPE_V2USI }, + { "V4UHI", CPTYPE_V4UHI }, + { "V8UQI", CPTYPE_V8UQI }, + { 0, 0 } +}; + +static const CGEN_ATTR_ENTRY CRET_attr[] ATTRIBUTE_UNUSED = +{ + { "VOID", CRET_VOID }, + { "FIRST", CRET_FIRST }, + { "FIRSTCOPY", CRET_FIRSTCOPY }, + { 0, 0 } +}; + +static const CGEN_ATTR_ENTRY ALIGN_attr [] ATTRIBUTE_UNUSED = { {"integer", 1}, { 0, 0 } }; -static const CGEN_ATTR_ENTRY LATENCY_attr [] ATTRIBUTE_UNUSED = +static const CGEN_ATTR_ENTRY LATENCY_attr [] ATTRIBUTE_UNUSED = { {"integer", 0}, { 0, 0 } @@ -97,8 +119,17 @@ static const CGEN_ATTR_ENTRY LATENCY_attr [] ATTRIBUTE_UNUSED = static const CGEN_ATTR_ENTRY CONFIG_attr[] ATTRIBUTE_UNUSED = { { "NONE", CONFIG_NONE }, - { "simple", CONFIG_SIMPLE }, - { "fmax", CONFIG_FMAX }, + { "default", CONFIG_DEFAULT }, + { 0, 0 } +}; + +static const CGEN_ATTR_ENTRY SLOTS_attr[] ATTRIBUTE_UNUSED = +{ + { "CORE", SLOTS_CORE }, + { "C3", SLOTS_C3 }, + { "P0S", SLOTS_P0S }, + { "P0", SLOTS_P0 }, + { "P1", SLOTS_P1 }, { 0, 0 } }; @@ -149,8 +180,11 @@ const CGEN_ATTR_TABLE mep_cgen_insn_attr_table[] = { { "MACH", & MACH_attr[0], & MACH_attr[0] }, { "ISA", & ISA_attr[0], & ISA_attr[0] }, + { "CPTYPE", & CPTYPE_attr[0], & CPTYPE_attr[0] }, + { "CRET", & CRET_attr[0], & CRET_attr[0] }, { "LATENCY", & LATENCY_attr[0], & LATENCY_attr[0] }, { "CONFIG", & CONFIG_attr[0], & CONFIG_attr[0] }, + { "SLOTS", & SLOTS_attr[0], & SLOTS_attr[0] }, { "ALIAS", &bool_attr[0], &bool_attr[0] }, { "VIRTUAL", &bool_attr[0], &bool_attr[0] }, { "UNCOND-CTI", &bool_attr[0], &bool_attr[0] }, @@ -191,11 +225,10 @@ const CGEN_ATTR_TABLE mep_cgen_insn_attr_table[] = static const CGEN_ISA mep_cgen_isa_table[] = { { "mep", 32, 32, 16, 32 }, { "ext_core1", 32, 32, 16, 32 }, - { "ext_core2", 32, 32, 16, 32 }, - { "ext_cop2_16", 32, 32, 65535, 0 }, - { "ext_cop2_32", 32, 32, 65535, 0 }, - { "ext_cop2_48", 32, 32, 65535, 0 }, - { "ext_cop2_64", 32, 32, 65535, 0 }, + { "ext_cop1_16", 32, 32, 32, 32 }, + { "ext_cop1_32", 32, 32, 32, 32 }, + { "ext_cop1_48", 32, 32, 32, 32 }, + { "ext_cop1_64", 32, 32, 32, 32 }, { 0, 0, 0, 0, 0 } }; @@ -204,6 +237,7 @@ static const CGEN_ISA mep_cgen_isa_table[] = { static const CGEN_MACH mep_cgen_mach_table[] = { { "mep", "mep", MACH_MEP, 16 }, { "h1", "h1", MACH_H1, 16 }, + { "c5", "c5", MACH_C5, 16 }, { 0, 0, 0, 0 } }; @@ -263,13 +297,14 @@ static CGEN_KEYWORD_ENTRY mep_cgen_opval_h_csr_entries[] = { "$depc", 25, {0, {{{0, 0}}}}, 0, 0 }, { "$opt", 26, {0, {{{0, 0}}}}, 0, 0 }, { "$rcfg", 27, {0, {{{0, 0}}}}, 0, 0 }, - { "$ccfg", 28, {0, {{{0, 0}}}}, 0, 0 } + { "$ccfg", 28, {0, {{{0, 0}}}}, 0, 0 }, + { "$vid", 22, {0, {{{0, 0}}}}, 0, 0 } }; CGEN_KEYWORD mep_cgen_opval_h_csr = { & mep_cgen_opval_h_csr_entries[0], - 24, + 25, 0, 0, 0, 0, "" }; @@ -434,40 +469,8 @@ CGEN_KEYWORD mep_cgen_opval_h_ccr = 0, 0, 0, 0, "" }; -static CGEN_KEYWORD_ENTRY mep_cgen_opval_h_cr_fmax_entries[] = +static CGEN_KEYWORD_ENTRY mep_cgen_opval_h_cr_ivc2_entries[] = { - { "$fr0", 0, {0, {{{0, 0}}}}, 0, 0 }, - { "$fr1", 1, {0, {{{0, 0}}}}, 0, 0 }, - { "$fr2", 2, {0, {{{0, 0}}}}, 0, 0 }, - { "$fr3", 3, {0, {{{0, 0}}}}, 0, 0 }, - { "$fr4", 4, {0, {{{0, 0}}}}, 0, 0 }, - { "$fr5", 5, {0, {{{0, 0}}}}, 0, 0 }, - { "$fr6", 6, {0, {{{0, 0}}}}, 0, 0 }, - { "$fr7", 7, {0, {{{0, 0}}}}, 0, 0 }, - { "$fr8", 8, {0, {{{0, 0}}}}, 0, 0 }, - { "$fr9", 9, {0, {{{0, 0}}}}, 0, 0 }, - { "$fr10", 10, {0, {{{0, 0}}}}, 0, 0 }, - { "$fr11", 11, {0, {{{0, 0}}}}, 0, 0 }, - { "$fr12", 12, {0, {{{0, 0}}}}, 0, 0 }, - { "$fr13", 13, {0, {{{0, 0}}}}, 0, 0 }, - { "$fr14", 14, {0, {{{0, 0}}}}, 0, 0 }, - { "$fr15", 15, {0, {{{0, 0}}}}, 0, 0 }, - { "$fr16", 16, {0, {{{0, 0}}}}, 0, 0 }, - { "$fr17", 17, {0, {{{0, 0}}}}, 0, 0 }, - { "$fr18", 18, {0, {{{0, 0}}}}, 0, 0 }, - { "$fr19", 19, {0, {{{0, 0}}}}, 0, 0 }, - { "$fr20", 20, {0, {{{0, 0}}}}, 0, 0 }, - { "$fr21", 21, {0, {{{0, 0}}}}, 0, 0 }, - { "$fr22", 22, {0, {{{0, 0}}}}, 0, 0 }, - { "$fr23", 23, {0, {{{0, 0}}}}, 0, 0 }, - { "$fr24", 24, {0, {{{0, 0}}}}, 0, 0 }, - { "$fr25", 25, {0, {{{0, 0}}}}, 0, 0 }, - { "$fr26", 26, {0, {{{0, 0}}}}, 0, 0 }, - { "$fr27", 27, {0, {{{0, 0}}}}, 0, 0 }, - { "$fr28", 28, {0, {{{0, 0}}}}, 0, 0 }, - { "$fr29", 29, {0, {{{0, 0}}}}, 0, 0 }, - { "$fr30", 30, {0, {{{0, 0}}}}, 0, 0 }, - { "$fr31", 31, {0, {{{0, 0}}}}, 0, 0 }, { "$c0", 0, {0, {{{0, 0}}}}, 0, 0 }, { "$c1", 1, {0, {{{0, 0}}}}, 0, 0 }, { "$c2", 2, {0, {{{0, 0}}}}, 0, 0 }, @@ -475,85 +478,104 @@ static CGEN_KEYWORD_ENTRY mep_cgen_opval_h_cr_fmax_entries[] = { "$c4", 4, {0, {{{0, 0}}}}, 0, 0 }, { "$c5", 5, {0, {{{0, 0}}}}, 0, 0 }, { "$c6", 6, {0, {{{0, 0}}}}, 0, 0 }, - { "$c7", 7, {0, {{{0, 0}}}}, 0, 0 }, - { "$c8", 8, {0, {{{0, 0}}}}, 0, 0 }, - { "$c9", 9, {0, {{{0, 0}}}}, 0, 0 }, - { "$c10", 10, {0, {{{0, 0}}}}, 0, 0 }, - { "$c11", 11, {0, {{{0, 0}}}}, 0, 0 }, - { "$c12", 12, {0, {{{0, 0}}}}, 0, 0 }, - { "$c13", 13, {0, {{{0, 0}}}}, 0, 0 }, - { "$c14", 14, {0, {{{0, 0}}}}, 0, 0 }, - { "$c15", 15, {0, {{{0, 0}}}}, 0, 0 }, - { "$c16", 16, {0, {{{0, 0}}}}, 0, 0 }, - { "$c17", 17, {0, {{{0, 0}}}}, 0, 0 }, - { "$c18", 18, {0, {{{0, 0}}}}, 0, 0 }, - { "$c19", 19, {0, {{{0, 0}}}}, 0, 0 }, - { "$c20", 20, {0, {{{0, 0}}}}, 0, 0 }, - { "$c21", 21, {0, {{{0, 0}}}}, 0, 0 }, - { "$c22", 22, {0, {{{0, 0}}}}, 0, 0 }, - { "$c23", 23, {0, {{{0, 0}}}}, 0, 0 }, - { "$c24", 24, {0, {{{0, 0}}}}, 0, 0 }, - { "$c25", 25, {0, {{{0, 0}}}}, 0, 0 }, - { "$c26", 26, {0, {{{0, 0}}}}, 0, 0 }, - { "$c27", 27, {0, {{{0, 0}}}}, 0, 0 }, - { "$c28", 28, {0, {{{0, 0}}}}, 0, 0 }, - { "$c29", 29, {0, {{{0, 0}}}}, 0, 0 }, - { "$c30", 30, {0, {{{0, 0}}}}, 0, 0 }, - { "$c31", 31, {0, {{{0, 0}}}}, 0, 0 } + { "$c7", 7, {0, {{{0, 0}}}}, 0, 0 } }; -CGEN_KEYWORD mep_cgen_opval_h_cr_fmax = +CGEN_KEYWORD mep_cgen_opval_h_cr_ivc2 = { - & mep_cgen_opval_h_cr_fmax_entries[0], - 64, + & mep_cgen_opval_h_cr_ivc2_entries[0], + 8, 0, 0, 0, 0, "" }; -static CGEN_KEYWORD_ENTRY mep_cgen_opval_h_ccr_fmax_entries[] = +static CGEN_KEYWORD_ENTRY mep_cgen_opval_h_ccr_ivc2_entries[] = { - { "$cirr", 0, {0, {{{0, 0}}}}, 0, 0 }, - { "$fcr0", 0, {0, {{{0, 0}}}}, 0, 0 }, + { "$csar0", 0, {0, {{{0, 0}}}}, 0, 0 }, + { "$cc", 1, {0, {{{0, 0}}}}, 0, 0 }, + { "$cofr0", 4, {0, {{{0, 0}}}}, 0, 0 }, + { "$cofr1", 5, {0, {{{0, 0}}}}, 0, 0 }, + { "$cofa0", 6, {0, {{{0, 0}}}}, 0, 0 }, + { "$cofa1", 7, {0, {{{0, 0}}}}, 0, 0 }, + { "$csar1", 15, {0, {{{0, 0}}}}, 0, 0 }, + { "$acc0_0", 16, {0, {{{0, 0}}}}, 0, 0 }, + { "$acc0_1", 17, {0, {{{0, 0}}}}, 0, 0 }, + { "$acc0_2", 18, {0, {{{0, 0}}}}, 0, 0 }, + { "$acc0_3", 19, {0, {{{0, 0}}}}, 0, 0 }, + { "$acc0_4", 20, {0, {{{0, 0}}}}, 0, 0 }, + { "$acc0_5", 21, {0, {{{0, 0}}}}, 0, 0 }, + { "$acc0_6", 22, {0, {{{0, 0}}}}, 0, 0 }, + { "$acc0_7", 23, {0, {{{0, 0}}}}, 0, 0 }, + { "$acc1_0", 24, {0, {{{0, 0}}}}, 0, 0 }, + { "$acc1_1", 25, {0, {{{0, 0}}}}, 0, 0 }, + { "$acc1_2", 26, {0, {{{0, 0}}}}, 0, 0 }, + { "$acc1_3", 27, {0, {{{0, 0}}}}, 0, 0 }, + { "$acc1_4", 28, {0, {{{0, 0}}}}, 0, 0 }, + { "$acc1_5", 29, {0, {{{0, 0}}}}, 0, 0 }, + { "$acc1_6", 30, {0, {{{0, 0}}}}, 0, 0 }, + { "$acc1_7", 31, {0, {{{0, 0}}}}, 0, 0 }, { "$ccr0", 0, {0, {{{0, 0}}}}, 0, 0 }, - { "$cbcr", 1, {0, {{{0, 0}}}}, 0, 0 }, - { "$fcr1", 1, {0, {{{0, 0}}}}, 0, 0 }, { "$ccr1", 1, {0, {{{0, 0}}}}, 0, 0 }, - { "$cerr", 15, {0, {{{0, 0}}}}, 0, 0 }, - { "$fcr15", 15, {0, {{{0, 0}}}}, 0, 0 }, - { "$ccr15", 15, {0, {{{0, 0}}}}, 0, 0 } + { "$ccr2", 2, {0, {{{0, 0}}}}, 0, 0 }, + { "$ccr3", 3, {0, {{{0, 0}}}}, 0, 0 }, + { "$ccr4", 4, {0, {{{0, 0}}}}, 0, 0 }, + { "$ccr5", 5, {0, {{{0, 0}}}}, 0, 0 }, + { "$ccr6", 6, {0, {{{0, 0}}}}, 0, 0 }, + { "$ccr7", 7, {0, {{{0, 0}}}}, 0, 0 }, + { "$ccr8", 8, {0, {{{0, 0}}}}, 0, 0 }, + { "$ccr9", 9, {0, {{{0, 0}}}}, 0, 0 }, + { "$ccr10", 10, {0, {{{0, 0}}}}, 0, 0 }, + { "$ccr11", 11, {0, {{{0, 0}}}}, 0, 0 }, + { "$ccr12", 12, {0, {{{0, 0}}}}, 0, 0 }, + { "$ccr13", 13, {0, {{{0, 0}}}}, 0, 0 }, + { "$ccr14", 14, {0, {{{0, 0}}}}, 0, 0 }, + { "$ccr15", 15, {0, {{{0, 0}}}}, 0, 0 }, + { "$ccr16", 16, {0, {{{0, 0}}}}, 0, 0 }, + { "$ccr17", 17, {0, {{{0, 0}}}}, 0, 0 }, + { "$ccr18", 18, {0, {{{0, 0}}}}, 0, 0 }, + { "$ccr19", 19, {0, {{{0, 0}}}}, 0, 0 }, + { "$ccr20", 20, {0, {{{0, 0}}}}, 0, 0 }, + { "$ccr21", 21, {0, {{{0, 0}}}}, 0, 0 }, + { "$ccr22", 22, {0, {{{0, 0}}}}, 0, 0 }, + { "$ccr23", 23, {0, {{{0, 0}}}}, 0, 0 }, + { "$ccr24", 24, {0, {{{0, 0}}}}, 0, 0 }, + { "$ccr25", 25, {0, {{{0, 0}}}}, 0, 0 }, + { "$ccr26", 26, {0, {{{0, 0}}}}, 0, 0 }, + { "$ccr27", 27, {0, {{{0, 0}}}}, 0, 0 }, + { "$ccr28", 28, {0, {{{0, 0}}}}, 0, 0 }, + { "$ccr29", 29, {0, {{{0, 0}}}}, 0, 0 }, + { "$ccr30", 30, {0, {{{0, 0}}}}, 0, 0 }, + { "$ccr31", 31, {0, {{{0, 0}}}}, 0, 0 } }; -CGEN_KEYWORD mep_cgen_opval_h_ccr_fmax = +CGEN_KEYWORD mep_cgen_opval_h_ccr_ivc2 = { - & mep_cgen_opval_h_ccr_fmax_entries[0], - 9, + & mep_cgen_opval_h_ccr_ivc2_entries[0], + 55, 0, 0, 0, 0, "" }; /* The hardware table. */ -#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE) #define A(a) (1 << CGEN_HW_##a) -#else -#define A(a) (1 << CGEN_HW_/**/a) -#endif const CGEN_HW_ENTRY mep_cgen_hw_table[] = { - { "h-memory", HW_H_MEMORY, CGEN_ASM_NONE, 0, { 0, { { { (1<name) - { - if (strcmp (name, table->bfd_name) == 0) - return table; - ++table; - } - abort (); -} - -/* Subroutine of mep_cgen_cpu_open to build the hardware table. */ - -static void -build_hw_table (CGEN_CPU_TABLE *cd) -{ - int i; - int machs = cd->machs; - const CGEN_HW_ENTRY *init = & mep_cgen_hw_table[0]; - /* MAX_HW is only an upper bound on the number of selected entries. - However each entry is indexed by it's enum so there can be holes in - the table. */ - const CGEN_HW_ENTRY **selected = - (const CGEN_HW_ENTRY **) xmalloc (MAX_HW * sizeof (CGEN_HW_ENTRY *)); - - cd->hw_table.init_entries = init; - cd->hw_table.entry_size = sizeof (CGEN_HW_ENTRY); - memset (selected, 0, MAX_HW * sizeof (CGEN_HW_ENTRY *)); - /* ??? For now we just use machs to determine which ones we want. */ - for (i = 0; init[i].name != NULL; ++i) - if (CGEN_HW_ATTR_VALUE (&init[i], CGEN_HW_MACH) - & machs) - selected[init[i].type] = &init[i]; - cd->hw_table.entries = selected; - cd->hw_table.num_entries = MAX_HW; -} - -/* Subroutine of mep_cgen_cpu_open to build the hardware table. */ - -static void -build_ifield_table (CGEN_CPU_TABLE *cd) -{ - cd->ifld_table = & mep_cgen_ifld_table[0]; -} - -/* Subroutine of mep_cgen_cpu_open to build the hardware table. */ - -static void -build_operand_table (CGEN_CPU_TABLE *cd) -{ +/* cpsrl3.h $croc,$crqc,$crpc */ + { + MEP_INSN_CPSRL3_H_C3, "cpsrl3_h_C3", "cpsrl3.h", 32, + { 0|A(OPTIONAL_CP_INSN), { { { (1<name) + { + if (strcmp (name, table->bfd_name) == 0) + return table; + ++table; + } + return NULL; +} + +/* Subroutine of mep_cgen_cpu_open to build the hardware table. */ + +static void +build_hw_table (CGEN_CPU_TABLE *cd) +{ + int i; + int machs = cd->machs; + const CGEN_HW_ENTRY *init = & mep_cgen_hw_table[0]; + /* MAX_HW is only an upper bound on the number of selected entries. + However each entry is indexed by it's enum so there can be holes in + the table. */ + const CGEN_HW_ENTRY **selected = + (const CGEN_HW_ENTRY **) xmalloc (MAX_HW * sizeof (CGEN_HW_ENTRY *)); + + cd->hw_table.init_entries = init; + cd->hw_table.entry_size = sizeof (CGEN_HW_ENTRY); + memset (selected, 0, MAX_HW * sizeof (CGEN_HW_ENTRY *)); + /* ??? For now we just use machs to determine which ones we want. */ + for (i = 0; init[i].name != NULL; ++i) + if (CGEN_HW_ATTR_VALUE (&init[i], CGEN_HW_MACH) + & machs) + selected[init[i].type] = &init[i]; + cd->hw_table.entries = selected; + cd->hw_table.num_entries = MAX_HW; +} + +/* Subroutine of mep_cgen_cpu_open to build the hardware table. */ + +static void +build_ifield_table (CGEN_CPU_TABLE *cd) +{ + cd->ifld_table = & mep_cgen_ifld_table[0]; +} + +/* Subroutine of mep_cgen_cpu_open to build the hardware table. */ + +static void +build_operand_table (CGEN_CPU_TABLE *cd) +{ int i; int machs = cd->machs; const CGEN_OPERAND *init = & mep_cgen_operand_table[0]; @@ -2552,8 +6221,11 @@ mep_cgen_rebuild_tables (CGEN_CPU_TABLE *cd) { if (cd->insn_chunk_bitsize != 0 && cd->insn_chunk_bitsize != mach->insn_chunk_bitsize) { - fprintf (stderr, "mep_cgen_rebuild_tables: conflicting insn-chunk-bitsize values: `%d' vs. `%d'\n", - cd->insn_chunk_bitsize, mach->insn_chunk_bitsize); + opcodes_error_handler + (/* xgettext:c-format */ + _("internal error: mep_cgen_rebuild_tables: " + "conflicting insn-chunk-bitsize values: `%d' vs. `%d'"), + cd->insn_chunk_bitsize, mach->insn_chunk_bitsize); abort (); } @@ -2587,11 +6259,7 @@ mep_cgen_rebuild_tables (CGEN_CPU_TABLE *cd) CGEN_CPU_OPEN_END: terminates arguments ??? Simultaneous multiple isas might not make sense, but it's not (yet) - precluded. - - ??? We only support ISO C stdargs here, not K&R. - Laziness, plus experiment to see if anything requires K&R - eventually - K&R will no longer be supported - e.g. GDB is currently trying this. */ + precluded. */ CGEN_CPU_DESC mep_cgen_cpu_open (enum cgen_cpu_open_arg arg_type, ...) @@ -2628,15 +6296,19 @@ mep_cgen_cpu_open (enum cgen_cpu_open_arg arg_type, ...) const CGEN_MACH *mach = lookup_mach_via_bfd_name (mep_cgen_mach_table, name); - machs |= 1 << mach->num; + if (mach != NULL) + machs |= 1 << mach->num; break; } case CGEN_CPU_OPEN_ENDIAN : endian = va_arg (ap, enum cgen_endian); break; default : - fprintf (stderr, "mep_cgen_cpu_open: unsupported argument `%d'\n", - arg_type); + opcodes_error_handler + (/* xgettext:c-format */ + _("internal error: mep_cgen_cpu_open: " + "unsupported argument `%d'"), + arg_type); abort (); /* ??? return NULL? */ } arg_type = va_arg (ap, enum cgen_cpu_open_arg); @@ -2651,7 +6323,9 @@ mep_cgen_cpu_open (enum cgen_cpu_open_arg arg_type, ...) if (endian == CGEN_ENDIAN_UNKNOWN) { /* ??? If target has only one, could have a default. */ - fprintf (stderr, "mep_cgen_cpu_open: no endianness specified\n"); + opcodes_error_handler + (/* xgettext:c-format */ + _("internal error: mep_cgen_cpu_open: no endianness specified")); abort (); } @@ -2670,7 +6344,7 @@ mep_cgen_cpu_open (enum cgen_cpu_open_arg arg_type, ...) /* Default to not allowing signed overflow. */ cd->signed_overflow_ok_p = 0; - + return (CGEN_CPU_DESC) cd; } @@ -2710,7 +6384,7 @@ mep_cgen_cpu_close (CGEN_CPU_DESC cd) for (i = 0; i < cd->insn_table.num_init_entries; ++i, ++insns) if (CGEN_INSN_RX (insns)) regfree (CGEN_INSN_RX (insns)); - } + } if (cd->macro_insn_table.init_entries) free ((CGEN_INSN *) cd->macro_insn_table.init_entries);