X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=opcodes%2Ffr30-desc.c;h=6c013d9fad52f565a79bee1c8cfb07bb38258c54;hb=b1d3c886aa30083236bf60c50d519bcc978139fb;hp=768fce6ebc0cfa89bc797be2d3fd090350d4489c;hpb=47b0e7ad8c60ea4b45b22ad5cb376f068991bc88;p=deliverable%2Fbinutils-gdb.git diff --git a/opcodes/fr30-desc.c b/opcodes/fr30-desc.c index 768fce6ebc..6c013d9fad 100644 --- a/opcodes/fr30-desc.c +++ b/opcodes/fr30-desc.c @@ -2,23 +2,23 @@ THIS FILE IS MACHINE GENERATED WITH CGEN. -Copyright 1996-2005 Free Software Foundation, Inc. +Copyright (C) 1996-2017 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. */ @@ -128,25 +128,25 @@ static const CGEN_MACH fr30_cgen_mach_table[] = { static CGEN_KEYWORD_ENTRY fr30_cgen_opval_gr_names_entries[] = { - { "r0", 0, {0, {0}}, 0, 0 }, - { "r1", 1, {0, {0}}, 0, 0 }, - { "r2", 2, {0, {0}}, 0, 0 }, - { "r3", 3, {0, {0}}, 0, 0 }, - { "r4", 4, {0, {0}}, 0, 0 }, - { "r5", 5, {0, {0}}, 0, 0 }, - { "r6", 6, {0, {0}}, 0, 0 }, - { "r7", 7, {0, {0}}, 0, 0 }, - { "r8", 8, {0, {0}}, 0, 0 }, - { "r9", 9, {0, {0}}, 0, 0 }, - { "r10", 10, {0, {0}}, 0, 0 }, - { "r11", 11, {0, {0}}, 0, 0 }, - { "r12", 12, {0, {0}}, 0, 0 }, - { "r13", 13, {0, {0}}, 0, 0 }, - { "r14", 14, {0, {0}}, 0, 0 }, - { "r15", 15, {0, {0}}, 0, 0 }, - { "ac", 13, {0, {0}}, 0, 0 }, - { "fp", 14, {0, {0}}, 0, 0 }, - { "sp", 15, {0, {0}}, 0, 0 } + { "r0", 0, {0, {{{0, 0}}}}, 0, 0 }, + { "r1", 1, {0, {{{0, 0}}}}, 0, 0 }, + { "r2", 2, {0, {{{0, 0}}}}, 0, 0 }, + { "r3", 3, {0, {{{0, 0}}}}, 0, 0 }, + { "r4", 4, {0, {{{0, 0}}}}, 0, 0 }, + { "r5", 5, {0, {{{0, 0}}}}, 0, 0 }, + { "r6", 6, {0, {{{0, 0}}}}, 0, 0 }, + { "r7", 7, {0, {{{0, 0}}}}, 0, 0 }, + { "r8", 8, {0, {{{0, 0}}}}, 0, 0 }, + { "r9", 9, {0, {{{0, 0}}}}, 0, 0 }, + { "r10", 10, {0, {{{0, 0}}}}, 0, 0 }, + { "r11", 11, {0, {{{0, 0}}}}, 0, 0 }, + { "r12", 12, {0, {{{0, 0}}}}, 0, 0 }, + { "r13", 13, {0, {{{0, 0}}}}, 0, 0 }, + { "r14", 14, {0, {{{0, 0}}}}, 0, 0 }, + { "r15", 15, {0, {{{0, 0}}}}, 0, 0 }, + { "ac", 13, {0, {{{0, 0}}}}, 0, 0 }, + { "fp", 14, {0, {{{0, 0}}}}, 0, 0 }, + { "sp", 15, {0, {{{0, 0}}}}, 0, 0 } }; CGEN_KEYWORD fr30_cgen_opval_gr_names = @@ -158,22 +158,22 @@ CGEN_KEYWORD fr30_cgen_opval_gr_names = static CGEN_KEYWORD_ENTRY fr30_cgen_opval_cr_names_entries[] = { - { "cr0", 0, {0, {0}}, 0, 0 }, - { "cr1", 1, {0, {0}}, 0, 0 }, - { "cr2", 2, {0, {0}}, 0, 0 }, - { "cr3", 3, {0, {0}}, 0, 0 }, - { "cr4", 4, {0, {0}}, 0, 0 }, - { "cr5", 5, {0, {0}}, 0, 0 }, - { "cr6", 6, {0, {0}}, 0, 0 }, - { "cr7", 7, {0, {0}}, 0, 0 }, - { "cr8", 8, {0, {0}}, 0, 0 }, - { "cr9", 9, {0, {0}}, 0, 0 }, - { "cr10", 10, {0, {0}}, 0, 0 }, - { "cr11", 11, {0, {0}}, 0, 0 }, - { "cr12", 12, {0, {0}}, 0, 0 }, - { "cr13", 13, {0, {0}}, 0, 0 }, - { "cr14", 14, {0, {0}}, 0, 0 }, - { "cr15", 15, {0, {0}}, 0, 0 } + { "cr0", 0, {0, {{{0, 0}}}}, 0, 0 }, + { "cr1", 1, {0, {{{0, 0}}}}, 0, 0 }, + { "cr2", 2, {0, {{{0, 0}}}}, 0, 0 }, + { "cr3", 3, {0, {{{0, 0}}}}, 0, 0 }, + { "cr4", 4, {0, {{{0, 0}}}}, 0, 0 }, + { "cr5", 5, {0, {{{0, 0}}}}, 0, 0 }, + { "cr6", 6, {0, {{{0, 0}}}}, 0, 0 }, + { "cr7", 7, {0, {{{0, 0}}}}, 0, 0 }, + { "cr8", 8, {0, {{{0, 0}}}}, 0, 0 }, + { "cr9", 9, {0, {{{0, 0}}}}, 0, 0 }, + { "cr10", 10, {0, {{{0, 0}}}}, 0, 0 }, + { "cr11", 11, {0, {{{0, 0}}}}, 0, 0 }, + { "cr12", 12, {0, {{{0, 0}}}}, 0, 0 }, + { "cr13", 13, {0, {{{0, 0}}}}, 0, 0 }, + { "cr14", 14, {0, {{{0, 0}}}}, 0, 0 }, + { "cr15", 15, {0, {{{0, 0}}}}, 0, 0 } }; CGEN_KEYWORD fr30_cgen_opval_cr_names = @@ -185,12 +185,12 @@ CGEN_KEYWORD fr30_cgen_opval_cr_names = static CGEN_KEYWORD_ENTRY fr30_cgen_opval_dr_names_entries[] = { - { "tbr", 0, {0, {0}}, 0, 0 }, - { "rp", 1, {0, {0}}, 0, 0 }, - { "ssp", 2, {0, {0}}, 0, 0 }, - { "usp", 3, {0, {0}}, 0, 0 }, - { "mdh", 4, {0, {0}}, 0, 0 }, - { "mdl", 5, {0, {0}}, 0, 0 } + { "tbr", 0, {0, {{{0, 0}}}}, 0, 0 }, + { "rp", 1, {0, {{{0, 0}}}}, 0, 0 }, + { "ssp", 2, {0, {{{0, 0}}}}, 0, 0 }, + { "usp", 3, {0, {{{0, 0}}}}, 0, 0 }, + { "mdh", 4, {0, {{{0, 0}}}}, 0, 0 }, + { "mdl", 5, {0, {{{0, 0}}}}, 0, 0 } }; CGEN_KEYWORD fr30_cgen_opval_dr_names = @@ -202,7 +202,7 @@ CGEN_KEYWORD fr30_cgen_opval_dr_names = static CGEN_KEYWORD_ENTRY fr30_cgen_opval_h_ps_entries[] = { - { "ps", 0, {0, {0}}, 0, 0 } + { "ps", 0, {0, {{{0, 0}}}}, 0, 0 } }; CGEN_KEYWORD fr30_cgen_opval_h_ps = @@ -214,7 +214,7 @@ CGEN_KEYWORD fr30_cgen_opval_h_ps = static CGEN_KEYWORD_ENTRY fr30_cgen_opval_h_r13_entries[] = { - { "r13", 0, {0, {0}}, 0, 0 } + { "r13", 0, {0, {{{0, 0}}}}, 0, 0 } }; CGEN_KEYWORD fr30_cgen_opval_h_r13 = @@ -226,7 +226,7 @@ CGEN_KEYWORD fr30_cgen_opval_h_r13 = static CGEN_KEYWORD_ENTRY fr30_cgen_opval_h_r14_entries[] = { - { "r14", 0, {0, {0}}, 0, 0 } + { "r14", 0, {0, {{{0, 0}}}}, 0, 0 } }; CGEN_KEYWORD fr30_cgen_opval_h_r14 = @@ -238,7 +238,7 @@ CGEN_KEYWORD fr30_cgen_opval_h_r14 = static CGEN_KEYWORD_ENTRY fr30_cgen_opval_h_r15_entries[] = { - { "r15", 0, {0, {0}}, 0, 0 } + { "r15", 0, {0, {{{0, 0}}}}, 0, 0 } }; CGEN_KEYWORD fr30_cgen_opval_h_r15 = @@ -251,40 +251,36 @@ CGEN_KEYWORD fr30_cgen_opval_h_r15 = /* 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 fr30_cgen_hw_table[] = { - { "h-memory", HW_H_MEMORY, CGEN_ASM_NONE, 0, { 0, { (1<isas; + CGEN_BITSET *isas = cd->isas; unsigned int machs = cd->machs; cd->int_insn_p = CGEN_INT_INSN_P; @@ -1556,7 +1536,7 @@ fr30_cgen_rebuild_tables (CGEN_CPU_TABLE *cd) cd->min_insn_bitsize = 65535; /* Some ridiculously big number. */ cd->max_insn_bitsize = 0; for (i = 0; i < MAX_ISAS; ++i) - if (((1 << i) & isas) != 0) + if (cgen_bitset_contains (isas, i)) { const CGEN_ISA *isa = & fr30_cgen_isa_table[i]; @@ -1630,18 +1610,14 @@ fr30_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 fr30_cgen_cpu_open (enum cgen_cpu_open_arg arg_type, ...) { CGEN_CPU_TABLE *cd = (CGEN_CPU_TABLE *) xmalloc (sizeof (CGEN_CPU_TABLE)); static int init_p; - unsigned int isas = 0; /* 0 = "unspecified" */ + CGEN_BITSET *isas = 0; /* 0 = "unspecified" */ unsigned int machs = 0; /* 0 = "unspecified" */ enum cgen_endian endian = CGEN_ENDIAN_UNKNOWN; va_list ap; @@ -1660,7 +1636,7 @@ fr30_cgen_cpu_open (enum cgen_cpu_open_arg arg_type, ...) switch (arg_type) { case CGEN_CPU_OPEN_ISAS : - isas = va_arg (ap, unsigned int); + isas = va_arg (ap, CGEN_BITSET *); break; case CGEN_CPU_OPEN_MACHS : machs = va_arg (ap, unsigned int); @@ -1671,7 +1647,8 @@ fr30_cgen_cpu_open (enum cgen_cpu_open_arg arg_type, ...) const CGEN_MACH *mach = lookup_mach_via_bfd_name (fr30_cgen_mach_table, name); - machs |= 1 << mach->num; + if (mach != NULL) + machs |= 1 << mach->num; break; } case CGEN_CPU_OPEN_ENDIAN : @@ -1691,9 +1668,6 @@ fr30_cgen_cpu_open (enum cgen_cpu_open_arg arg_type, ...) machs = (1 << MAX_MACHS) - 1; /* Base mach is always selected. */ machs |= 1; - /* ISA unspecified means "all". */ - if (isas == 0) - isas = (1 << MAX_ISAS) - 1; if (endian == CGEN_ENDIAN_UNKNOWN) { /* ??? If target has only one, could have a default. */ @@ -1701,7 +1675,7 @@ fr30_cgen_cpu_open (enum cgen_cpu_open_arg arg_type, ...) abort (); } - cd->isas = isas; + cd->isas = cgen_bitset_copy (isas); cd->machs = machs; cd->endian = endian; /* FIXME: for the sparc case we can determine insn-endianness statically. @@ -1716,7 +1690,7 @@ fr30_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; } @@ -1756,7 +1730,7 @@ fr30_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);