X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=opcodes%2Fm32c-desc.c;h=ee37d9c0562f2848375d840f53caff88198af160;hb=83bec4829b6ed5819b0a7b951bc172e7461fb1f4;hp=931f90d52e8d59f4e5a3aed250ad17d6f5d474b1;hpb=a6743a5420aa02a0550b0f7be004f6c06e90ce21;p=binutils-gdb.git diff --git a/opcodes/m32c-desc.c b/opcodes/m32c-desc.c index 931f90d52e8..ee37d9c0562 100644 --- a/opcodes/m32c-desc.c +++ b/opcodes/m32c-desc.c @@ -3,7 +3,7 @@ THIS FILE IS MACHINE GENERATED WITH CGEN. -Copyright (C) 1996-2018 Free Software Foundation, Inc. +Copyright (C) 1996-2022 Free Software Foundation, Inc. This file is part of the GNU Binutils and/or GDB, the GNU debugger. @@ -26,6 +26,7 @@ This file is part of the GNU Binutils and/or GDB, the GNU debugger. #include "sysdep.h" #include #include +#include #include "ansidecl.h" #include "bfd.h" #include "symcat.h" @@ -63063,6 +63064,7 @@ m32c_cgen_rebuild_tables (CGEN_CPU_TABLE *cd) CGEN_CPU_OPEN_MACHS: bitmap of values in enum mach_attr CGEN_CPU_OPEN_BFDMACH: specify 1 mach using bfd name CGEN_CPU_OPEN_ENDIAN: specify endian choice + CGEN_CPU_OPEN_INSN_ENDIAN: specify instruction endian choice CGEN_CPU_OPEN_END: terminates arguments ??? Simultaneous multiple isas might not make sense, but it's not (yet) @@ -63076,6 +63078,7 @@ m32c_cgen_cpu_open (enum cgen_cpu_open_arg arg_type, ...) CGEN_BITSET *isas = 0; /* 0 = "unspecified" */ unsigned int machs = 0; /* 0 = "unspecified" */ enum cgen_endian endian = CGEN_ENDIAN_UNKNOWN; + enum cgen_endian insn_endian = CGEN_ENDIAN_UNKNOWN; va_list ap; if (! init_p) @@ -63110,6 +63113,9 @@ m32c_cgen_cpu_open (enum cgen_cpu_open_arg arg_type, ...) case CGEN_CPU_OPEN_ENDIAN : endian = va_arg (ap, enum cgen_endian); break; + case CGEN_CPU_OPEN_INSN_ENDIAN : + insn_endian = va_arg (ap, enum cgen_endian); + break; default : opcodes_error_handler (/* xgettext:c-format */ @@ -63139,11 +63145,8 @@ m32c_cgen_cpu_open (enum cgen_cpu_open_arg arg_type, ...) cd->isas = cgen_bitset_copy (isas); cd->machs = machs; cd->endian = endian; - /* FIXME: for the sparc case we can determine insn-endianness statically. - The worry here is where both data and insn endian can be independently - chosen, in which case this function will need another argument. - Actually, will want to allow for more arguments in the future anyway. */ - cd->insn_endian = endian; + cd->insn_endian + = (insn_endian == CGEN_ENDIAN_UNKNOWN ? endian : insn_endian); /* Table (re)builder. */ cd->rebuild_tables = m32c_cgen_rebuild_tables; @@ -63193,18 +63196,10 @@ m32c_cgen_cpu_close (CGEN_CPU_DESC cd) regfree (CGEN_INSN_RX (insns)); } - if (cd->macro_insn_table.init_entries) - free ((CGEN_INSN *) cd->macro_insn_table.init_entries); - - if (cd->insn_table.init_entries) - free ((CGEN_INSN *) cd->insn_table.init_entries); - - if (cd->hw_table.entries) - free ((CGEN_HW_ENTRY *) cd->hw_table.entries); - - if (cd->operand_table.entries) - free ((CGEN_HW_ENTRY *) cd->operand_table.entries); - + free ((CGEN_INSN *) cd->macro_insn_table.init_entries); + free ((CGEN_INSN *) cd->insn_table.init_entries); + free ((CGEN_HW_ENTRY *) cd->hw_table.entries); + free ((CGEN_HW_ENTRY *) cd->operand_table.entries); free (cd); }