opcodes error messages

Another patch aimed at making binutils comply with the GNU coding
standard.  The generated files require
https://sourceware.org/ml/cgen/2018-q1/msg00004.html

cpu/
	* frv.opc: Include opintl.h.
	(add_next_to_vliw): Use opcodes_error_handler to print error.
	Standardize error message.
	(fr500_check_insn_major_constraints, frv_vliw_add_insn): Likewise.
opcodes/
	* sysdep.h (opcodes_error_handler): Define.
	(_bfd_error_handler): Declare.
	* Makefile.am: Remove stray #.
	* opc2c.c (main): Remove bogus -l arg handling.  Print "DO NOT
	EDIT" comment.
	* aarch64-dis.c, * arc-dis.c, * arm-dis.c, * avr-dis.c,
	* d30v-dis.c, * h8300-dis.c, * mmix-dis.c, * ppc-dis.c,
	* riscv-dis.c, * s390-dis.c, * sparc-dis.c, * v850-dis.c: Use
	opcodes_error_handler to print errors.  Standardize error messages.
	* msp430-decode.opc, * nios2-dis.c, * rl78-decode.opc: Likewise,
	and include opintl.h.
	* nds32-asm.c: Likewise, and include sysdep.h and opintl.h.
	* i386-gen.c: Standardize error messages.
	* msp430-decode.c, * rl78-decode.c, rx-decode.c: Regenerate.
	* Makefile.in: Regenerate.
	* epiphany-asm.c, * epiphany-desc.c, * epiphany-dis.c,
	* epiphany-ibld.c, * fr30-asm.c, * fr30-desc.c, * fr30-dis.c,
	* fr30-ibld.c, * frv-asm.c, * frv-desc.c, * frv-dis.c, * frv-ibld.c,
	* frv-opc.c, * ip2k-asm.c, * ip2k-desc.c, * ip2k-dis.c, * ip2k-ibld.c,
	* iq2000-asm.c, * iq2000-desc.c, * iq2000-dis.c, * iq2000-ibld.c,
	* lm32-asm.c, * lm32-desc.c, * lm32-dis.c, * lm32-ibld.c,
	* m32c-asm.c, * m32c-desc.c, * m32c-dis.c, * m32c-ibld.c,
	* m32r-asm.c, * m32r-desc.c, * m32r-dis.c, * m32r-ibld.c,
	* mep-asm.c, * mep-desc.c, * mep-dis.c, * mep-ibld.c, * mt-asm.c,
	* mt-desc.c, * mt-dis.c, * mt-ibld.c, * or1k-asm.c, * or1k-desc.c,
	* or1k-dis.c, * or1k-ibld.c, * xc16x-asm.c, * xc16x-desc.c,
	* xc16x-dis.c, * xc16x-ibld.c, * xstormy16-asm.c, * xstormy16-desc.c,
	* xstormy16-dis.c, * xstormy16-ibld.c: Regenerate.
This commit is contained in:
Alan Modra 2018-03-02 08:23:50 +10:30
parent 5c1f594e58
commit a6743a5420
80 changed files with 1234 additions and 875 deletions

View file

@ -1,3 +1,10 @@
2018-03-03 Alan Modra <amodra@gmail.com>
* frv.opc: Include opintl.h.
(add_next_to_vliw): Use opcodes_error_handler to print error.
Standardize error message.
(fr500_check_insn_major_constraints, frv_vliw_add_insn): Likewise.
2018-01-13 Nick Clifton <nickc@redhat.com> 2018-01-13 Nick Clifton <nickc@redhat.com>
2.30 branch created. 2.30 branch created.

View file

@ -78,6 +78,7 @@ int spr_valid (long);
/* -- */ /* -- */
/* -- opc.c */ /* -- opc.c */
#include "opintl.h"
#include "elf/frv.h" #include "elf/frv.h"
#include <stdio.h> #include <stdio.h>
@ -500,9 +501,9 @@ add_next_to_vliw (FRV_VLIW *vliw, CGEN_ATTR_VALUE_ENUM_TYPE unit)
if (next <= 0) if (next <= 0)
{ {
fprintf (stderr, "frv-opc.c line %d: bad vliw->next_slot value.\n", /* xgettext:c-format */
__LINE__); opcodes_error_handler (_("internal error: bad vliw->next_slot value"));
abort (); /* Should never happen. */ abort ();
} }
/* The table is sorted by units allowed within slots, so vliws with /* The table is sorted by units allowed within slots, so vliws with
@ -810,8 +811,8 @@ fr500_check_insn_major_constraints (FRV_VLIW *vliw, CGEN_ATTR_VALUE_ENUM_TYPE ma
&& ! find_major_in_vliw (vliw, FR500_MAJOR_F_6) && ! find_major_in_vliw (vliw, FR500_MAJOR_F_6)
&& ! find_major_in_vliw (vliw, FR500_MAJOR_F_7); && ! find_major_in_vliw (vliw, FR500_MAJOR_F_7);
default: default:
fprintf (stderr, "frv-opc.c, line %d: bad major code, aborting.\n", /* xgettext:c-format */
__LINE__); opcodes_error_handler (_("internal error: bad major code"));
abort (); abort ();
break; break;
} }
@ -860,9 +861,9 @@ frv_vliw_add_insn (FRV_VLIW *vliw, const CGEN_INSN *insn)
unit = CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_UNIT); unit = CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_UNIT);
if (unit == UNIT_NIL) if (unit == UNIT_NIL)
{ {
fprintf (stderr, "frv-opc.c line %d: bad insn unit.\n", /* xgettext:c-format */
__LINE__); opcodes_error_handler (_("internal error: bad insn unit"));
abort (); /* No UNIT specified for this insn in frv.cpu. */ abort ();
} }
switch (vliw->mach) switch (vliw->mach)

View file

@ -1,3 +1,34 @@
2018-03-03 Alan Modra <amodra@gmail.com>
* sysdep.h (opcodes_error_handler): Define.
(_bfd_error_handler): Declare.
* Makefile.am: Remove stray #.
* opc2c.c (main): Remove bogus -l arg handling. Print "DO NOT
EDIT" comment.
* aarch64-dis.c, * arc-dis.c, * arm-dis.c, * avr-dis.c,
* d30v-dis.c, * h8300-dis.c, * mmix-dis.c, * ppc-dis.c,
* riscv-dis.c, * s390-dis.c, * sparc-dis.c, * v850-dis.c: Use
opcodes_error_handler to print errors. Standardize error messages.
* msp430-decode.opc, * nios2-dis.c, * rl78-decode.opc: Likewise,
and include opintl.h.
* nds32-asm.c: Likewise, and include sysdep.h and opintl.h.
* i386-gen.c: Standardize error messages.
* msp430-decode.c, * rl78-decode.c, rx-decode.c: Regenerate.
* Makefile.in: Regenerate.
* epiphany-asm.c, * epiphany-desc.c, * epiphany-dis.c,
* epiphany-ibld.c, * fr30-asm.c, * fr30-desc.c, * fr30-dis.c,
* fr30-ibld.c, * frv-asm.c, * frv-desc.c, * frv-dis.c, * frv-ibld.c,
* frv-opc.c, * ip2k-asm.c, * ip2k-desc.c, * ip2k-dis.c, * ip2k-ibld.c,
* iq2000-asm.c, * iq2000-desc.c, * iq2000-dis.c, * iq2000-ibld.c,
* lm32-asm.c, * lm32-desc.c, * lm32-dis.c, * lm32-ibld.c,
* m32c-asm.c, * m32c-desc.c, * m32c-dis.c, * m32c-ibld.c,
* m32r-asm.c, * m32r-desc.c, * m32r-dis.c, * m32r-ibld.c,
* mep-asm.c, * mep-desc.c, * mep-dis.c, * mep-ibld.c, * mt-asm.c,
* mt-desc.c, * mt-dis.c, * mt-ibld.c, * or1k-asm.c, * or1k-desc.c,
* or1k-dis.c, * or1k-ibld.c, * xc16x-asm.c, * xc16x-desc.c,
* xc16x-dis.c, * xc16x-ibld.c, * xstormy16-asm.c, * xstormy16-desc.c,
* xstormy16-dis.c, * xstormy16-ibld.c: Regenerate.
2018-03-01 H.J. Lu <hongjiu.lu@intel.com> 2018-03-01 H.J. Lu <hongjiu.lu@intel.com>
* * i386-opc.tbl: Add "Optimize" to AVX256 and AVX512 * * i386-opc.tbl: Add "Optimize" to AVX256 and AVX512

View file

@ -471,7 +471,7 @@ stamp-lm32: $(CGENDEPS) $(CPUDIR)/lm32.cpu $(CPUDIR)/lm32.opc
extrafiles=opinst extrafiles=opinst
$(srcdir)/m32c-desc.h $(srcdir)/m32c-desc.c $(srcdir)/m32c-opc.h $(srcdir)/m32c-opc.c $(srcdir)/m32c-ibld.c $(srcdir)/m32c-asm.c $(srcdir)/m32c-dis.c: $(M32C_DEPS) $(srcdir)/m32c-desc.h $(srcdir)/m32c-desc.c $(srcdir)/m32c-opc.h $(srcdir)/m32c-opc.c $(srcdir)/m32c-ibld.c $(srcdir)/m32c-asm.c $(srcdir)/m32c-dis.c: $(M32C_DEPS)
# @true @true
stamp-m32c: $(CGENDEPS) $(CPUDIR)/m32c.cpu $(CPUDIR)/m32c.opc stamp-m32c: $(CGENDEPS) $(CPUDIR)/m32c.cpu $(CPUDIR)/m32c.opc
$(MAKE) run-cgen arch=m32c prefix=m32c options= \ $(MAKE) run-cgen arch=m32c prefix=m32c options= \
archfile=$(CPUDIR)/m32c.cpu \ archfile=$(CPUDIR)/m32c.cpu \

View file

@ -1393,7 +1393,7 @@ stamp-lm32: $(CGENDEPS) $(CPUDIR)/lm32.cpu $(CPUDIR)/lm32.opc
extrafiles=opinst extrafiles=opinst
$(srcdir)/m32c-desc.h $(srcdir)/m32c-desc.c $(srcdir)/m32c-opc.h $(srcdir)/m32c-opc.c $(srcdir)/m32c-ibld.c $(srcdir)/m32c-asm.c $(srcdir)/m32c-dis.c: $(M32C_DEPS) $(srcdir)/m32c-desc.h $(srcdir)/m32c-desc.c $(srcdir)/m32c-opc.h $(srcdir)/m32c-opc.c $(srcdir)/m32c-ibld.c $(srcdir)/m32c-asm.c $(srcdir)/m32c-dis.c: $(M32C_DEPS)
# @true @true
stamp-m32c: $(CGENDEPS) $(CPUDIR)/m32c.cpu $(CPUDIR)/m32c.opc stamp-m32c: $(CGENDEPS) $(CPUDIR)/m32c.cpu $(CPUDIR)/m32c.opc
$(MAKE) run-cgen arch=m32c prefix=m32c options= \ $(MAKE) run-cgen arch=m32c prefix=m32c options= \
archfile=$(CPUDIR)/m32c.cpu \ archfile=$(CPUDIR)/m32c.cpu \

View file

@ -78,7 +78,7 @@ parse_aarch64_dis_option (const char *option, unsigned int len ATTRIBUTE_UNUSED)
#endif /* DEBUG_AARCH64 */ #endif /* DEBUG_AARCH64 */
/* Invalid option. */ /* Invalid option. */
fprintf (stderr, _("Unrecognised disassembler option: %s\n"), option); opcodes_error_handler (_("unrecognised disassembler option: %s"), option);
} }
static void static void

View file

@ -778,7 +778,8 @@ parse_option (const char *option)
else if (CONST_STRNEQ (option, "hex")) else if (CONST_STRNEQ (option, "hex"))
print_hex = TRUE; print_hex = TRUE;
else else
fprintf (stderr, _("Unrecognised disassembler option: %s\n"), option); /* xgettext:c-format */
opcodes_error_handler (_("unrecognised disassembler option: %s"), option);
} }
#define ARC_CPU_TYPE_A6xx(NAME,EXTRA) \ #define ARC_CPU_TYPE_A6xx(NAME,EXTRA) \
@ -820,7 +821,8 @@ parse_cpu_option (const char *option)
} }
} }
fprintf (stderr, _("Unrecognised disassembler CPU option: %s\n"), option); /* xgettext:c-format */
opcodes_error_handler (_("unrecognised disassembler CPU option: %s"), option);
return ARC_OPCODE_NONE; return ARC_OPCODE_NONE;
} }

View file

@ -6145,14 +6145,17 @@ parse_arm_disassembler_options (const char *options)
} }
if (i >= NUM_ARM_OPTIONS) if (i >= NUM_ARM_OPTIONS)
fprintf (stderr, _("Unrecognised register name set: %s\n"), opt); /* xgettext: c-format */
opcodes_error_handler (_("unrecognised register name set: %s"),
opt);
} }
else if (CONST_STRNEQ (opt, "force-thumb")) else if (CONST_STRNEQ (opt, "force-thumb"))
force_thumb = 1; force_thumb = 1;
else if (CONST_STRNEQ (opt, "no-force-thumb")) else if (CONST_STRNEQ (opt, "no-force-thumb"))
force_thumb = 0; force_thumb = 0;
else else
fprintf (stderr, _("Unrecognised disassembler option: %s\n"), opt); /* xgettext: c-format */
opcodes_error_handler (_("unrecognised disassembler option: %s"), opt);
} }
return; return;

View file

@ -212,7 +212,8 @@ avr_operand (unsigned int insn, unsigned int insn2, unsigned int pc, int constra
case 'n': case 'n':
sprintf (buf, "??"); sprintf (buf, "??");
fprintf (stderr, _("Internal disassembler error")); /* xgettext:c-format */
opcodes_error_handler (_("internal disassembler error"));
ok = 0; ok = 0;
break; break;
@ -265,7 +266,8 @@ avr_operand (unsigned int insn, unsigned int insn2, unsigned int pc, int constra
default: default:
sprintf (buf, "??"); sprintf (buf, "??");
fprintf (stderr, _("unknown constraint `%c'"), constraint); /* xgettext:c-format */
opcodes_error_handler (_("unknown constraint `%c'"), constraint);
ok = 0; ok = 0;
} }

View file

@ -225,7 +225,9 @@ print_insn (struct disassemble_info *info,
val |= OPERAND_FLAG; val |= OPERAND_FLAG;
break; break;
default: default:
fprintf (stderr, "illegal id (%d)\n", id); /* xgettext: c-format */
opcodes_error_handler (_("illegal id (%d)"), id);
abort ();
} }
} }
else if (oper->flags & OPERAND_ACC) else if (oper->flags & OPERAND_ACC)

View file

@ -452,7 +452,9 @@ epiphany_cgen_parse_operand (CGEN_CPU_DESC cd,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while parsing.\n"), opindex); opcodes_error_handler
(_("internal error: unrecognized field %d while parsing"),
opindex);
abort (); abort ();
} }

View file

@ -1939,6 +1939,11 @@ init_tables (void)
{ {
} }
#ifndef opcodes_error_handler
#define opcodes_error_handler(...) \
fprintf (stderr, __VA_ARGS__); fputc ('\n', stderr)
#endif
static const CGEN_MACH * lookup_mach_via_bfd_name (const CGEN_MACH *, const char *); static const CGEN_MACH * lookup_mach_via_bfd_name (const CGEN_MACH *, const char *);
static void build_hw_table (CGEN_CPU_TABLE *); static void build_hw_table (CGEN_CPU_TABLE *);
static void build_ifield_table (CGEN_CPU_TABLE *); static void build_ifield_table (CGEN_CPU_TABLE *);
@ -2099,8 +2104,11 @@ epiphany_cgen_rebuild_tables (CGEN_CPU_TABLE *cd)
{ {
if (cd->insn_chunk_bitsize != 0 && cd->insn_chunk_bitsize != mach->insn_chunk_bitsize) if (cd->insn_chunk_bitsize != 0 && cd->insn_chunk_bitsize != mach->insn_chunk_bitsize)
{ {
fprintf (stderr, "epiphany_cgen_rebuild_tables: conflicting insn-chunk-bitsize values: `%d' vs. `%d'\n", opcodes_error_handler
cd->insn_chunk_bitsize, mach->insn_chunk_bitsize); (/* xgettext:c-format */
_("internal error: epiphany_cgen_rebuild_tables: "
"conflicting insn-chunk-bitsize values: `%d' vs. `%d'"),
cd->insn_chunk_bitsize, mach->insn_chunk_bitsize);
abort (); abort ();
} }
@ -2179,8 +2187,11 @@ epiphany_cgen_cpu_open (enum cgen_cpu_open_arg arg_type, ...)
endian = va_arg (ap, enum cgen_endian); endian = va_arg (ap, enum cgen_endian);
break; break;
default : default :
fprintf (stderr, "epiphany_cgen_cpu_open: unsupported argument `%d'\n", opcodes_error_handler
arg_type); (/* xgettext:c-format */
_("internal error: epiphany_cgen_cpu_open: "
"unsupported argument `%d'"),
arg_type);
abort (); /* ??? return NULL? */ abort (); /* ??? return NULL? */
} }
arg_type = va_arg (ap, enum cgen_cpu_open_arg); arg_type = va_arg (ap, enum cgen_cpu_open_arg);
@ -2195,7 +2206,9 @@ epiphany_cgen_cpu_open (enum cgen_cpu_open_arg arg_type, ...)
if (endian == CGEN_ENDIAN_UNKNOWN) if (endian == CGEN_ENDIAN_UNKNOWN)
{ {
/* ??? If target has only one, could have a default. */ /* ??? If target has only one, could have a default. */
fprintf (stderr, "epiphany_cgen_cpu_open: no endianness specified\n"); opcodes_error_handler
(/* xgettext:c-format */
_("internal error: epiphany_cgen_cpu_open: no endianness specified"));
abort (); abort ();
} }

View file

@ -275,9 +275,10 @@ epiphany_cgen_print_operand (CGEN_CPU_DESC cd,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while printing insn.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while printing insn"),
abort (); opindex);
abort ();
} }
} }

View file

@ -876,8 +876,9 @@ epiphany_cgen_insert_operand (CGEN_CPU_DESC cd,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while building insn.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while building insn"),
opindex);
abort (); abort ();
} }
@ -1170,8 +1171,9 @@ epiphany_cgen_extract_operand (CGEN_CPU_DESC cd,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while decoding insn.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while decoding insn"),
opindex);
abort (); abort ();
} }
@ -1313,8 +1315,9 @@ epiphany_cgen_get_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while getting int operand.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while getting int operand"),
opindex);
abort (); abort ();
} }
@ -1438,8 +1441,9 @@ epiphany_cgen_get_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while getting vma operand.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while getting vma operand"),
opindex);
abort (); abort ();
} }
@ -1570,8 +1574,9 @@ epiphany_cgen_set_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while setting int operand.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while setting int operand"),
opindex);
abort (); abort ();
} }
} }
@ -1692,8 +1697,9 @@ epiphany_cgen_set_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while setting vma operand.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while setting vma operand"),
opindex);
abort (); abort ();
} }
} }

View file

@ -307,7 +307,9 @@ fr30_cgen_parse_operand (CGEN_CPU_DESC cd,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while parsing.\n"), opindex); opcodes_error_handler
(_("internal error: unrecognized field %d while parsing"),
opindex);
abort (); abort ();
} }

View file

@ -1416,6 +1416,11 @@ init_tables (void)
{ {
} }
#ifndef opcodes_error_handler
#define opcodes_error_handler(...) \
fprintf (stderr, __VA_ARGS__); fputc ('\n', stderr)
#endif
static const CGEN_MACH * lookup_mach_via_bfd_name (const CGEN_MACH *, const char *); static const CGEN_MACH * lookup_mach_via_bfd_name (const CGEN_MACH *, const char *);
static void build_hw_table (CGEN_CPU_TABLE *); static void build_hw_table (CGEN_CPU_TABLE *);
static void build_ifield_table (CGEN_CPU_TABLE *); static void build_ifield_table (CGEN_CPU_TABLE *);
@ -1576,8 +1581,11 @@ fr30_cgen_rebuild_tables (CGEN_CPU_TABLE *cd)
{ {
if (cd->insn_chunk_bitsize != 0 && cd->insn_chunk_bitsize != mach->insn_chunk_bitsize) if (cd->insn_chunk_bitsize != 0 && cd->insn_chunk_bitsize != mach->insn_chunk_bitsize)
{ {
fprintf (stderr, "fr30_cgen_rebuild_tables: conflicting insn-chunk-bitsize values: `%d' vs. `%d'\n", opcodes_error_handler
cd->insn_chunk_bitsize, mach->insn_chunk_bitsize); (/* xgettext:c-format */
_("internal error: fr30_cgen_rebuild_tables: "
"conflicting insn-chunk-bitsize values: `%d' vs. `%d'"),
cd->insn_chunk_bitsize, mach->insn_chunk_bitsize);
abort (); abort ();
} }
@ -1656,8 +1664,11 @@ fr30_cgen_cpu_open (enum cgen_cpu_open_arg arg_type, ...)
endian = va_arg (ap, enum cgen_endian); endian = va_arg (ap, enum cgen_endian);
break; break;
default : default :
fprintf (stderr, "fr30_cgen_cpu_open: unsupported argument `%d'\n", opcodes_error_handler
arg_type); (/* xgettext:c-format */
_("internal error: fr30_cgen_cpu_open: "
"unsupported argument `%d'"),
arg_type);
abort (); /* ??? return NULL? */ abort (); /* ??? return NULL? */
} }
arg_type = va_arg (ap, enum cgen_cpu_open_arg); arg_type = va_arg (ap, enum cgen_cpu_open_arg);
@ -1672,7 +1683,9 @@ fr30_cgen_cpu_open (enum cgen_cpu_open_arg arg_type, ...)
if (endian == CGEN_ENDIAN_UNKNOWN) if (endian == CGEN_ENDIAN_UNKNOWN)
{ {
/* ??? If target has only one, could have a default. */ /* ??? If target has only one, could have a default. */
fprintf (stderr, "fr30_cgen_cpu_open: no endianness specified\n"); opcodes_error_handler
(/* xgettext:c-format */
_("internal error: fr30_cgen_cpu_open: no endianness specified"));
abort (); abort ();
} }

View file

@ -296,9 +296,10 @@ fr30_cgen_print_operand (CGEN_CPU_DESC cd,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while printing insn.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while printing insn"),
abort (); opindex);
abort ();
} }
} }

View file

@ -731,8 +731,9 @@ fr30_cgen_insert_operand (CGEN_CPU_DESC cd,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while building insn.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while building insn"),
opindex);
abort (); abort ();
} }
@ -936,8 +937,9 @@ fr30_cgen_extract_operand (CGEN_CPU_DESC cd,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while decoding insn.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while decoding insn"),
opindex);
abort (); abort ();
} }
@ -1082,8 +1084,9 @@ fr30_cgen_get_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while getting int operand.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while getting int operand"),
opindex);
abort (); abort ();
} }
@ -1210,8 +1213,9 @@ fr30_cgen_get_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while getting vma operand.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while getting vma operand"),
opindex);
abort (); abort ();
} }
@ -1341,8 +1345,9 @@ fr30_cgen_set_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while setting int operand.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while setting int operand"),
opindex);
abort (); abort ();
} }
} }
@ -1462,8 +1467,9 @@ fr30_cgen_set_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while setting vma operand.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while setting vma operand"),
opindex);
abort (); abort ();
} }
} }

View file

@ -1260,7 +1260,9 @@ frv_cgen_parse_operand (CGEN_CPU_DESC cd,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while parsing.\n"), opindex); opcodes_error_handler
(_("internal error: unrecognized field %d while parsing"),
opindex);
abort (); abort ();
} }

View file

@ -6156,6 +6156,11 @@ init_tables (void)
{ {
} }
#ifndef opcodes_error_handler
#define opcodes_error_handler(...) \
fprintf (stderr, __VA_ARGS__); fputc ('\n', stderr)
#endif
static const CGEN_MACH * lookup_mach_via_bfd_name (const CGEN_MACH *, const char *); static const CGEN_MACH * lookup_mach_via_bfd_name (const CGEN_MACH *, const char *);
static void build_hw_table (CGEN_CPU_TABLE *); static void build_hw_table (CGEN_CPU_TABLE *);
static void build_ifield_table (CGEN_CPU_TABLE *); static void build_ifield_table (CGEN_CPU_TABLE *);
@ -6316,8 +6321,11 @@ frv_cgen_rebuild_tables (CGEN_CPU_TABLE *cd)
{ {
if (cd->insn_chunk_bitsize != 0 && cd->insn_chunk_bitsize != mach->insn_chunk_bitsize) if (cd->insn_chunk_bitsize != 0 && cd->insn_chunk_bitsize != mach->insn_chunk_bitsize)
{ {
fprintf (stderr, "frv_cgen_rebuild_tables: conflicting insn-chunk-bitsize values: `%d' vs. `%d'\n", opcodes_error_handler
cd->insn_chunk_bitsize, mach->insn_chunk_bitsize); (/* xgettext:c-format */
_("internal error: frv_cgen_rebuild_tables: "
"conflicting insn-chunk-bitsize values: `%d' vs. `%d'"),
cd->insn_chunk_bitsize, mach->insn_chunk_bitsize);
abort (); abort ();
} }
@ -6396,8 +6404,11 @@ frv_cgen_cpu_open (enum cgen_cpu_open_arg arg_type, ...)
endian = va_arg (ap, enum cgen_endian); endian = va_arg (ap, enum cgen_endian);
break; break;
default : default :
fprintf (stderr, "frv_cgen_cpu_open: unsupported argument `%d'\n", opcodes_error_handler
arg_type); (/* xgettext:c-format */
_("internal error: frv_cgen_cpu_open: "
"unsupported argument `%d'"),
arg_type);
abort (); /* ??? return NULL? */ abort (); /* ??? return NULL? */
} }
arg_type = va_arg (ap, enum cgen_cpu_open_arg); arg_type = va_arg (ap, enum cgen_cpu_open_arg);
@ -6412,7 +6423,9 @@ frv_cgen_cpu_open (enum cgen_cpu_open_arg arg_type, ...)
if (endian == CGEN_ENDIAN_UNKNOWN) if (endian == CGEN_ENDIAN_UNKNOWN)
{ {
/* ??? If target has only one, could have a default. */ /* ??? If target has only one, could have a default. */
fprintf (stderr, "frv_cgen_cpu_open: no endianness specified\n"); opcodes_error_handler
(/* xgettext:c-format */
_("internal error: frv_cgen_cpu_open: no endianness specified"));
abort (); abort ();
} }

View file

@ -393,9 +393,10 @@ frv_cgen_print_operand (CGEN_CPU_DESC cd,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while printing insn.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while printing insn"),
abort (); opindex);
abort ();
} }
} }

View file

@ -857,8 +857,9 @@ frv_cgen_insert_operand (CGEN_CPU_DESC cd,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while building insn.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while building insn"),
opindex);
abort (); abort ();
} }
@ -1174,8 +1175,9 @@ frv_cgen_extract_operand (CGEN_CPU_DESC cd,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while decoding insn.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while decoding insn"),
opindex);
abort (); abort ();
} }
@ -1452,8 +1454,9 @@ frv_cgen_get_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while getting int operand.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while getting int operand"),
opindex);
abort (); abort ();
} }
@ -1712,8 +1715,9 @@ frv_cgen_get_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while getting vma operand.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while getting vma operand"),
opindex);
abort (); abort ();
} }
@ -1979,8 +1983,9 @@ frv_cgen_set_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while setting int operand.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while setting int operand"),
opindex);
abort (); abort ();
} }
} }
@ -2236,8 +2241,9 @@ frv_cgen_set_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while setting vma operand.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while setting vma operand"),
opindex);
abort (); abort ();
} }
} }

View file

@ -32,6 +32,7 @@ This file is part of the GNU Binutils and/or GDB, the GNU debugger.
#include "libiberty.h" #include "libiberty.h"
/* -- opc.c */ /* -- opc.c */
#include "opintl.h"
#include "elf/frv.h" #include "elf/frv.h"
#include <stdio.h> #include <stdio.h>
@ -454,9 +455,9 @@ add_next_to_vliw (FRV_VLIW *vliw, CGEN_ATTR_VALUE_ENUM_TYPE unit)
if (next <= 0) if (next <= 0)
{ {
fprintf (stderr, "frv-opc.c line %d: bad vliw->next_slot value.\n", /* xgettext:c-format */
__LINE__); opcodes_error_handler (_("internal error: bad vliw->next_slot value"));
abort (); /* Should never happen. */ abort ();
} }
/* The table is sorted by units allowed within slots, so vliws with /* The table is sorted by units allowed within slots, so vliws with
@ -764,8 +765,8 @@ fr500_check_insn_major_constraints (FRV_VLIW *vliw, CGEN_ATTR_VALUE_ENUM_TYPE ma
&& ! find_major_in_vliw (vliw, FR500_MAJOR_F_6) && ! find_major_in_vliw (vliw, FR500_MAJOR_F_6)
&& ! find_major_in_vliw (vliw, FR500_MAJOR_F_7); && ! find_major_in_vliw (vliw, FR500_MAJOR_F_7);
default: default:
fprintf (stderr, "frv-opc.c, line %d: bad major code, aborting.\n", /* xgettext:c-format */
__LINE__); opcodes_error_handler (_("internal error: bad major code"));
abort (); abort ();
break; break;
} }
@ -814,9 +815,9 @@ frv_vliw_add_insn (FRV_VLIW *vliw, const CGEN_INSN *insn)
unit = CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_UNIT); unit = CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_UNIT);
if (unit == UNIT_NIL) if (unit == UNIT_NIL)
{ {
fprintf (stderr, "frv-opc.c line %d: bad insn unit.\n", /* xgettext:c-format */
__LINE__); opcodes_error_handler (_("internal error: bad insn unit"));
abort (); /* No UNIT specified for this insn in frv.cpu. */ abort ();
} }
switch (vliw->mach) switch (vliw->mach)

View file

@ -59,7 +59,8 @@ bfd_h8_disassemble_init (void)
if (i & 1) if (i & 1)
{ {
fprintf (stderr, "Internal error, h8_disassemble_init.\n"); /* xgettext:c-format */
opcodes_error_handler (_("internal error, h8_disassemble_init"));
abort (); abort ();
} }

View file

@ -722,7 +722,7 @@ fail (const char *message, ...)
va_list args; va_list args;
va_start (args, message); va_start (args, message);
fprintf (stderr, _("%s: Error: "), program_name); fprintf (stderr, _("%s: error: "), program_name);
vfprintf (stderr, message, args); vfprintf (stderr, message, args);
va_end (args); va_end (args);
xexit (1); xexit (1);
@ -901,9 +901,9 @@ set_bitfield (char *f, bitfield *array, int value,
return; return;
if (lineno != -1) if (lineno != -1)
fail (_("%s: %d: Unknown bitfield: %s\n"), filename, lineno, f); fail (_("%s: %d: unknown bitfield: %s\n"), filename, lineno, f);
else else
fail (_("Unknown bitfield: %s\n"), f); fail (_("unknown bitfield: %s\n"), f);
} }
static void static void
@ -966,7 +966,7 @@ process_i386_cpu_flag (FILE *table, char *flag, int macro,
last -= 1; last -= 1;
next = flag + 2; next = flag + 2;
if (*last != ')') if (*last != ')')
fail (_("%s: %d: Missing `)' in bitfield: %s\n"), filename, fail (_("%s: %d: missing `)' in bitfield: %s\n"), filename,
lineno, flag); lineno, flag);
*last = '\0'; *last = '\0';
} }

View file

@ -508,7 +508,9 @@ ip2k_cgen_parse_operand (CGEN_CPU_DESC cd,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while parsing.\n"), opindex); opcodes_error_handler
(_("internal error: unrecognized field %d while parsing"),
opindex);
abort (); abort ();
} }

View file

@ -845,6 +845,11 @@ init_tables (void)
{ {
} }
#ifndef opcodes_error_handler
#define opcodes_error_handler(...) \
fprintf (stderr, __VA_ARGS__); fputc ('\n', stderr)
#endif
static const CGEN_MACH * lookup_mach_via_bfd_name (const CGEN_MACH *, const char *); static const CGEN_MACH * lookup_mach_via_bfd_name (const CGEN_MACH *, const char *);
static void build_hw_table (CGEN_CPU_TABLE *); static void build_hw_table (CGEN_CPU_TABLE *);
static void build_ifield_table (CGEN_CPU_TABLE *); static void build_ifield_table (CGEN_CPU_TABLE *);
@ -1005,8 +1010,11 @@ ip2k_cgen_rebuild_tables (CGEN_CPU_TABLE *cd)
{ {
if (cd->insn_chunk_bitsize != 0 && cd->insn_chunk_bitsize != mach->insn_chunk_bitsize) if (cd->insn_chunk_bitsize != 0 && cd->insn_chunk_bitsize != mach->insn_chunk_bitsize)
{ {
fprintf (stderr, "ip2k_cgen_rebuild_tables: conflicting insn-chunk-bitsize values: `%d' vs. `%d'\n", opcodes_error_handler
cd->insn_chunk_bitsize, mach->insn_chunk_bitsize); (/* xgettext:c-format */
_("internal error: ip2k_cgen_rebuild_tables: "
"conflicting insn-chunk-bitsize values: `%d' vs. `%d'"),
cd->insn_chunk_bitsize, mach->insn_chunk_bitsize);
abort (); abort ();
} }
@ -1085,8 +1093,11 @@ ip2k_cgen_cpu_open (enum cgen_cpu_open_arg arg_type, ...)
endian = va_arg (ap, enum cgen_endian); endian = va_arg (ap, enum cgen_endian);
break; break;
default : default :
fprintf (stderr, "ip2k_cgen_cpu_open: unsupported argument `%d'\n", opcodes_error_handler
arg_type); (/* xgettext:c-format */
_("internal error: ip2k_cgen_cpu_open: "
"unsupported argument `%d'"),
arg_type);
abort (); /* ??? return NULL? */ abort (); /* ??? return NULL? */
} }
arg_type = va_arg (ap, enum cgen_cpu_open_arg); arg_type = va_arg (ap, enum cgen_cpu_open_arg);
@ -1101,7 +1112,9 @@ ip2k_cgen_cpu_open (enum cgen_cpu_open_arg arg_type, ...)
if (endian == CGEN_ENDIAN_UNKNOWN) if (endian == CGEN_ENDIAN_UNKNOWN)
{ {
/* ??? If target has only one, could have a default. */ /* ??? If target has only one, could have a default. */
fprintf (stderr, "ip2k_cgen_cpu_open: no endianness specified\n"); opcodes_error_handler
(/* xgettext:c-format */
_("internal error: ip2k_cgen_cpu_open: no endianness specified"));
abort (); abort ();
} }

View file

@ -285,9 +285,10 @@ ip2k_cgen_print_operand (CGEN_CPU_DESC cd,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while printing insn.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while printing insn"),
abort (); opindex);
abort ();
} }
} }

View file

@ -608,8 +608,9 @@ ip2k_cgen_insert_operand (CGEN_CPU_DESC cd,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while building insn.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while building insn"),
opindex);
abort (); abort ();
} }
@ -683,8 +684,9 @@ ip2k_cgen_extract_operand (CGEN_CPU_DESC cd,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while decoding insn.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while decoding insn"),
opindex);
abort (); abort ();
} }
@ -757,8 +759,9 @@ ip2k_cgen_get_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while getting int operand.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while getting int operand"),
opindex);
abort (); abort ();
} }
@ -813,8 +816,9 @@ ip2k_cgen_get_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while getting vma operand.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while getting vma operand"),
opindex);
abort (); abort ();
} }
@ -872,8 +876,9 @@ ip2k_cgen_set_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while setting int operand.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while setting int operand"),
opindex);
abort (); abort ();
} }
} }
@ -921,8 +926,9 @@ ip2k_cgen_set_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while setting vma operand.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while setting vma operand"),
opindex);
abort (); abort ();
} }
} }

View file

@ -456,7 +456,9 @@ iq2000_cgen_parse_operand (CGEN_CPU_DESC cd,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while parsing.\n"), opindex); opcodes_error_handler
(_("internal error: unrecognized field %d while parsing"),
opindex);
abort (); abort ();
} }

View file

@ -1850,6 +1850,11 @@ init_tables (void)
{ {
} }
#ifndef opcodes_error_handler
#define opcodes_error_handler(...) \
fprintf (stderr, __VA_ARGS__); fputc ('\n', stderr)
#endif
static const CGEN_MACH * lookup_mach_via_bfd_name (const CGEN_MACH *, const char *); static const CGEN_MACH * lookup_mach_via_bfd_name (const CGEN_MACH *, const char *);
static void build_hw_table (CGEN_CPU_TABLE *); static void build_hw_table (CGEN_CPU_TABLE *);
static void build_ifield_table (CGEN_CPU_TABLE *); static void build_ifield_table (CGEN_CPU_TABLE *);
@ -2010,8 +2015,11 @@ iq2000_cgen_rebuild_tables (CGEN_CPU_TABLE *cd)
{ {
if (cd->insn_chunk_bitsize != 0 && cd->insn_chunk_bitsize != mach->insn_chunk_bitsize) if (cd->insn_chunk_bitsize != 0 && cd->insn_chunk_bitsize != mach->insn_chunk_bitsize)
{ {
fprintf (stderr, "iq2000_cgen_rebuild_tables: conflicting insn-chunk-bitsize values: `%d' vs. `%d'\n", opcodes_error_handler
cd->insn_chunk_bitsize, mach->insn_chunk_bitsize); (/* xgettext:c-format */
_("internal error: iq2000_cgen_rebuild_tables: "
"conflicting insn-chunk-bitsize values: `%d' vs. `%d'"),
cd->insn_chunk_bitsize, mach->insn_chunk_bitsize);
abort (); abort ();
} }
@ -2090,8 +2098,11 @@ iq2000_cgen_cpu_open (enum cgen_cpu_open_arg arg_type, ...)
endian = va_arg (ap, enum cgen_endian); endian = va_arg (ap, enum cgen_endian);
break; break;
default : default :
fprintf (stderr, "iq2000_cgen_cpu_open: unsupported argument `%d'\n", opcodes_error_handler
arg_type); (/* xgettext:c-format */
_("internal error: iq2000_cgen_cpu_open: "
"unsupported argument `%d'"),
arg_type);
abort (); /* ??? return NULL? */ abort (); /* ??? return NULL? */
} }
arg_type = va_arg (ap, enum cgen_cpu_open_arg); arg_type = va_arg (ap, enum cgen_cpu_open_arg);
@ -2106,7 +2117,9 @@ iq2000_cgen_cpu_open (enum cgen_cpu_open_arg arg_type, ...)
if (endian == CGEN_ENDIAN_UNKNOWN) if (endian == CGEN_ENDIAN_UNKNOWN)
{ {
/* ??? If target has only one, could have a default. */ /* ??? If target has only one, could have a default. */
fprintf (stderr, "iq2000_cgen_cpu_open: no endianness specified\n"); opcodes_error_handler
(/* xgettext:c-format */
_("internal error: iq2000_cgen_cpu_open: no endianness specified"));
abort (); abort ();
} }

View file

@ -186,9 +186,10 @@ iq2000_cgen_print_operand (CGEN_CPU_DESC cd,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while printing insn.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while printing insn"),
abort (); opindex);
abort ();
} }
} }

View file

@ -714,8 +714,9 @@ iq2000_cgen_insert_operand (CGEN_CPU_DESC cd,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while building insn.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while building insn"),
opindex);
abort (); abort ();
} }
@ -889,8 +890,9 @@ iq2000_cgen_extract_operand (CGEN_CPU_DESC cd,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while decoding insn.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while decoding insn"),
opindex);
abort (); abort ();
} }
@ -1020,8 +1022,9 @@ iq2000_cgen_get_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while getting int operand.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while getting int operand"),
opindex);
abort (); abort ();
} }
@ -1133,8 +1136,9 @@ iq2000_cgen_get_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while getting vma operand.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while getting vma operand"),
opindex);
abort (); abort ();
} }
@ -1253,8 +1257,9 @@ iq2000_cgen_set_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while setting int operand.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while setting int operand"),
opindex);
abort (); abort ();
} }
} }
@ -1363,8 +1368,9 @@ iq2000_cgen_set_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while setting vma operand.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while setting vma operand"),
opindex);
abort (); abort ();
} }
} }

View file

@ -346,7 +346,9 @@ lm32_cgen_parse_operand (CGEN_CPU_DESC cd,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while parsing.\n"), opindex); opcodes_error_handler
(_("internal error: unrecognized field %d while parsing"),
opindex);
abort (); abort ();
} }

View file

@ -832,6 +832,11 @@ init_tables (void)
{ {
} }
#ifndef opcodes_error_handler
#define opcodes_error_handler(...) \
fprintf (stderr, __VA_ARGS__); fputc ('\n', stderr)
#endif
static const CGEN_MACH * lookup_mach_via_bfd_name (const CGEN_MACH *, const char *); static const CGEN_MACH * lookup_mach_via_bfd_name (const CGEN_MACH *, const char *);
static void build_hw_table (CGEN_CPU_TABLE *); static void build_hw_table (CGEN_CPU_TABLE *);
static void build_ifield_table (CGEN_CPU_TABLE *); static void build_ifield_table (CGEN_CPU_TABLE *);
@ -992,8 +997,11 @@ lm32_cgen_rebuild_tables (CGEN_CPU_TABLE *cd)
{ {
if (cd->insn_chunk_bitsize != 0 && cd->insn_chunk_bitsize != mach->insn_chunk_bitsize) if (cd->insn_chunk_bitsize != 0 && cd->insn_chunk_bitsize != mach->insn_chunk_bitsize)
{ {
fprintf (stderr, "lm32_cgen_rebuild_tables: conflicting insn-chunk-bitsize values: `%d' vs. `%d'\n", opcodes_error_handler
cd->insn_chunk_bitsize, mach->insn_chunk_bitsize); (/* xgettext:c-format */
_("internal error: lm32_cgen_rebuild_tables: "
"conflicting insn-chunk-bitsize values: `%d' vs. `%d'"),
cd->insn_chunk_bitsize, mach->insn_chunk_bitsize);
abort (); abort ();
} }
@ -1072,8 +1080,11 @@ lm32_cgen_cpu_open (enum cgen_cpu_open_arg arg_type, ...)
endian = va_arg (ap, enum cgen_endian); endian = va_arg (ap, enum cgen_endian);
break; break;
default : default :
fprintf (stderr, "lm32_cgen_cpu_open: unsupported argument `%d'\n", opcodes_error_handler
arg_type); (/* xgettext:c-format */
_("internal error: lm32_cgen_cpu_open: "
"unsupported argument `%d'"),
arg_type);
abort (); /* ??? return NULL? */ abort (); /* ??? return NULL? */
} }
arg_type = va_arg (ap, enum cgen_cpu_open_arg); arg_type = va_arg (ap, enum cgen_cpu_open_arg);
@ -1088,7 +1099,9 @@ lm32_cgen_cpu_open (enum cgen_cpu_open_arg arg_type, ...)
if (endian == CGEN_ENDIAN_UNKNOWN) if (endian == CGEN_ENDIAN_UNKNOWN)
{ {
/* ??? If target has only one, could have a default. */ /* ??? If target has only one, could have a default. */
fprintf (stderr, "lm32_cgen_cpu_open: no endianness specified\n"); opcodes_error_handler
(/* xgettext:c-format */
_("internal error: lm32_cgen_cpu_open: no endianness specified"));
abort (); abort ();
} }

View file

@ -144,9 +144,10 @@ lm32_cgen_print_operand (CGEN_CPU_DESC cd,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while printing insn.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while printing insn"),
abort (); opindex);
abort ();
} }
} }

View file

@ -635,8 +635,9 @@ lm32_cgen_insert_operand (CGEN_CPU_DESC cd,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while building insn.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while building insn"),
opindex);
abort (); abort ();
} }
@ -739,8 +740,9 @@ lm32_cgen_extract_operand (CGEN_CPU_DESC cd,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while decoding insn.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while decoding insn"),
opindex);
abort (); abort ();
} }
@ -828,8 +830,9 @@ lm32_cgen_get_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while getting int operand.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while getting int operand"),
opindex);
abort (); abort ();
} }
@ -899,8 +902,9 @@ lm32_cgen_get_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while getting vma operand.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while getting vma operand"),
opindex);
abort (); abort ();
} }
@ -977,8 +981,9 @@ lm32_cgen_set_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while setting int operand.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while setting int operand"),
opindex);
abort (); abort ();
} }
} }
@ -1045,8 +1050,9 @@ lm32_cgen_set_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while setting vma operand.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while setting vma operand"),
opindex);
abort (); abort ();
} }
} }

View file

@ -1581,7 +1581,9 @@ m32c_cgen_parse_operand (CGEN_CPU_DESC cd,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while parsing.\n"), opindex); opcodes_error_handler
(_("internal error: unrecognized field %d while parsing"),
opindex);
abort (); abort ();
} }

View file

@ -62863,6 +62863,11 @@ init_tables (void)
{ {
} }
#ifndef opcodes_error_handler
#define opcodes_error_handler(...) \
fprintf (stderr, __VA_ARGS__); fputc ('\n', stderr)
#endif
static const CGEN_MACH * lookup_mach_via_bfd_name (const CGEN_MACH *, const char *); static const CGEN_MACH * lookup_mach_via_bfd_name (const CGEN_MACH *, const char *);
static void build_hw_table (CGEN_CPU_TABLE *); static void build_hw_table (CGEN_CPU_TABLE *);
static void build_ifield_table (CGEN_CPU_TABLE *); static void build_ifield_table (CGEN_CPU_TABLE *);
@ -63023,8 +63028,11 @@ m32c_cgen_rebuild_tables (CGEN_CPU_TABLE *cd)
{ {
if (cd->insn_chunk_bitsize != 0 && cd->insn_chunk_bitsize != mach->insn_chunk_bitsize) if (cd->insn_chunk_bitsize != 0 && cd->insn_chunk_bitsize != mach->insn_chunk_bitsize)
{ {
fprintf (stderr, "m32c_cgen_rebuild_tables: conflicting insn-chunk-bitsize values: `%d' vs. `%d'\n", opcodes_error_handler
cd->insn_chunk_bitsize, mach->insn_chunk_bitsize); (/* xgettext:c-format */
_("internal error: m32c_cgen_rebuild_tables: "
"conflicting insn-chunk-bitsize values: `%d' vs. `%d'"),
cd->insn_chunk_bitsize, mach->insn_chunk_bitsize);
abort (); abort ();
} }
@ -63103,8 +63111,11 @@ m32c_cgen_cpu_open (enum cgen_cpu_open_arg arg_type, ...)
endian = va_arg (ap, enum cgen_endian); endian = va_arg (ap, enum cgen_endian);
break; break;
default : default :
fprintf (stderr, "m32c_cgen_cpu_open: unsupported argument `%d'\n", opcodes_error_handler
arg_type); (/* xgettext:c-format */
_("internal error: m32c_cgen_cpu_open: "
"unsupported argument `%d'"),
arg_type);
abort (); /* ??? return NULL? */ abort (); /* ??? return NULL? */
} }
arg_type = va_arg (ap, enum cgen_cpu_open_arg); arg_type = va_arg (ap, enum cgen_cpu_open_arg);
@ -63119,7 +63130,9 @@ m32c_cgen_cpu_open (enum cgen_cpu_open_arg arg_type, ...)
if (endian == CGEN_ENDIAN_UNKNOWN) if (endian == CGEN_ENDIAN_UNKNOWN)
{ {
/* ??? If target has only one, could have a default. */ /* ??? If target has only one, could have a default. */
fprintf (stderr, "m32c_cgen_cpu_open: no endianness specified\n"); opcodes_error_handler
(/* xgettext:c-format */
_("internal error: m32c_cgen_cpu_open: no endianness specified"));
abort (); abort ();
} }

View file

@ -888,9 +888,10 @@ m32c_cgen_print_operand (CGEN_CPU_DESC cd,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while printing insn.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while printing insn"),
abort (); opindex);
abort ();
} }
} }

View file

@ -1732,8 +1732,9 @@ m32c_cgen_insert_operand (CGEN_CPU_DESC cd,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while building insn.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while building insn"),
opindex);
abort (); abort ();
} }
@ -2893,8 +2894,9 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC cd,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while decoding insn.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while decoding insn"),
opindex);
abort (); abort ();
} }
@ -3510,8 +3512,9 @@ m32c_cgen_get_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while getting int operand.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while getting int operand"),
opindex);
abort (); abort ();
} }
@ -4109,8 +4112,9 @@ m32c_cgen_get_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while getting vma operand.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while getting vma operand"),
opindex);
abort (); abort ();
} }
@ -4696,8 +4700,9 @@ m32c_cgen_set_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while setting int operand.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while setting int operand"),
opindex);
abort (); abort ();
} }
} }
@ -5273,8 +5278,9 @@ m32c_cgen_set_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while setting vma operand.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while setting vma operand"),
opindex);
abort (); abort ();
} }
} }

View file

@ -325,7 +325,9 @@ m32r_cgen_parse_operand (CGEN_CPU_DESC cd,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while parsing.\n"), opindex); opcodes_error_handler
(_("internal error: unrecognized field %d while parsing"),
opindex);
abort (); abort ();
} }

View file

@ -1195,6 +1195,11 @@ init_tables (void)
{ {
} }
#ifndef opcodes_error_handler
#define opcodes_error_handler(...) \
fprintf (stderr, __VA_ARGS__); fputc ('\n', stderr)
#endif
static const CGEN_MACH * lookup_mach_via_bfd_name (const CGEN_MACH *, const char *); static const CGEN_MACH * lookup_mach_via_bfd_name (const CGEN_MACH *, const char *);
static void build_hw_table (CGEN_CPU_TABLE *); static void build_hw_table (CGEN_CPU_TABLE *);
static void build_ifield_table (CGEN_CPU_TABLE *); static void build_ifield_table (CGEN_CPU_TABLE *);
@ -1355,8 +1360,11 @@ m32r_cgen_rebuild_tables (CGEN_CPU_TABLE *cd)
{ {
if (cd->insn_chunk_bitsize != 0 && cd->insn_chunk_bitsize != mach->insn_chunk_bitsize) if (cd->insn_chunk_bitsize != 0 && cd->insn_chunk_bitsize != mach->insn_chunk_bitsize)
{ {
fprintf (stderr, "m32r_cgen_rebuild_tables: conflicting insn-chunk-bitsize values: `%d' vs. `%d'\n", opcodes_error_handler
cd->insn_chunk_bitsize, mach->insn_chunk_bitsize); (/* xgettext:c-format */
_("internal error: m32r_cgen_rebuild_tables: "
"conflicting insn-chunk-bitsize values: `%d' vs. `%d'"),
cd->insn_chunk_bitsize, mach->insn_chunk_bitsize);
abort (); abort ();
} }
@ -1435,8 +1443,11 @@ m32r_cgen_cpu_open (enum cgen_cpu_open_arg arg_type, ...)
endian = va_arg (ap, enum cgen_endian); endian = va_arg (ap, enum cgen_endian);
break; break;
default : default :
fprintf (stderr, "m32r_cgen_cpu_open: unsupported argument `%d'\n", opcodes_error_handler
arg_type); (/* xgettext:c-format */
_("internal error: m32r_cgen_cpu_open: "
"unsupported argument `%d'"),
arg_type);
abort (); /* ??? return NULL? */ abort (); /* ??? return NULL? */
} }
arg_type = va_arg (ap, enum cgen_cpu_open_arg); arg_type = va_arg (ap, enum cgen_cpu_open_arg);
@ -1451,7 +1462,9 @@ m32r_cgen_cpu_open (enum cgen_cpu_open_arg arg_type, ...)
if (endian == CGEN_ENDIAN_UNKNOWN) if (endian == CGEN_ENDIAN_UNKNOWN)
{ {
/* ??? If target has only one, could have a default. */ /* ??? If target has only one, could have a default. */
fprintf (stderr, "m32r_cgen_cpu_open: no endianness specified\n"); opcodes_error_handler
(/* xgettext:c-format */
_("internal error: m32r_cgen_cpu_open: no endianness specified"));
abort (); abort ();
} }

View file

@ -276,9 +276,10 @@ m32r_cgen_print_operand (CGEN_CPU_DESC cd,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while printing insn.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while printing insn"),
abort (); opindex);
abort ();
} }
} }

View file

@ -666,8 +666,9 @@ m32r_cgen_insert_operand (CGEN_CPU_DESC cd,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while building insn.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while building insn"),
opindex);
abort (); abort ();
} }
@ -803,8 +804,9 @@ m32r_cgen_extract_operand (CGEN_CPU_DESC cd,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while decoding insn.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while decoding insn"),
opindex);
abort (); abort ();
} }
@ -916,8 +918,9 @@ m32r_cgen_get_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while getting int operand.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while getting int operand"),
opindex);
abort (); abort ();
} }
@ -1011,8 +1014,9 @@ m32r_cgen_get_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while getting vma operand.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while getting vma operand"),
opindex);
abort (); abort ();
} }
@ -1112,8 +1116,9 @@ m32r_cgen_set_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while setting int operand.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while setting int operand"),
opindex);
abort (); abort ();
} }
} }
@ -1203,8 +1208,9 @@ m32r_cgen_set_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while setting vma operand.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while setting vma operand"),
opindex);
abort (); abort ();
} }
} }

View file

@ -1284,7 +1284,9 @@ mep_cgen_parse_operand (CGEN_CPU_DESC cd,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while parsing.\n"), opindex); opcodes_error_handler
(_("internal error: unrecognized field %d while parsing"),
opindex);
abort (); abort ();
} }

View file

@ -6056,6 +6056,11 @@ init_tables (void)
{ {
} }
#ifndef opcodes_error_handler
#define opcodes_error_handler(...) \
fprintf (stderr, __VA_ARGS__); fputc ('\n', stderr)
#endif
static const CGEN_MACH * lookup_mach_via_bfd_name (const CGEN_MACH *, const char *); static const CGEN_MACH * lookup_mach_via_bfd_name (const CGEN_MACH *, const char *);
static void build_hw_table (CGEN_CPU_TABLE *); static void build_hw_table (CGEN_CPU_TABLE *);
static void build_ifield_table (CGEN_CPU_TABLE *); static void build_ifield_table (CGEN_CPU_TABLE *);
@ -6216,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) 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", opcodes_error_handler
cd->insn_chunk_bitsize, mach->insn_chunk_bitsize); (/* 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 (); abort ();
} }
@ -6296,8 +6304,11 @@ mep_cgen_cpu_open (enum cgen_cpu_open_arg arg_type, ...)
endian = va_arg (ap, enum cgen_endian); endian = va_arg (ap, enum cgen_endian);
break; break;
default : default :
fprintf (stderr, "mep_cgen_cpu_open: unsupported argument `%d'\n", opcodes_error_handler
arg_type); (/* xgettext:c-format */
_("internal error: mep_cgen_cpu_open: "
"unsupported argument `%d'"),
arg_type);
abort (); /* ??? return NULL? */ abort (); /* ??? return NULL? */
} }
arg_type = va_arg (ap, enum cgen_cpu_open_arg); arg_type = va_arg (ap, enum cgen_cpu_open_arg);
@ -6312,7 +6323,9 @@ mep_cgen_cpu_open (enum cgen_cpu_open_arg arg_type, ...)
if (endian == CGEN_ENDIAN_UNKNOWN) if (endian == CGEN_ENDIAN_UNKNOWN)
{ {
/* ??? If target has only one, could have a default. */ /* ??? 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 (); abort ();
} }

View file

@ -1184,9 +1184,10 @@ mep_cgen_print_operand (CGEN_CPU_DESC cd,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while printing insn.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while printing insn"),
abort (); opindex);
abort ();
} }
} }

View file

@ -1209,8 +1209,9 @@ mep_cgen_insert_operand (CGEN_CPU_DESC cd,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while building insn.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while building insn"),
opindex);
abort (); abort ();
} }
@ -1808,8 +1809,9 @@ mep_cgen_extract_operand (CGEN_CPU_DESC cd,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while decoding insn.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while decoding insn"),
opindex);
abort (); abort ();
} }
@ -2278,8 +2280,9 @@ mep_cgen_get_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while getting int operand.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while getting int operand"),
opindex);
abort (); abort ();
} }
@ -2730,8 +2733,9 @@ mep_cgen_get_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while getting vma operand.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while getting vma operand"),
opindex);
abort (); abort ();
} }
@ -3143,8 +3147,9 @@ mep_cgen_set_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while setting int operand.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while setting int operand"),
opindex);
abort (); abort ();
} }
} }
@ -3546,8 +3551,9 @@ mep_cgen_set_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while setting vma operand.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while setting vma operand"),
opindex);
abort (); abort ();
} }
} }

View file

@ -27,24 +27,23 @@
#include "bfd.h" #include "bfd.h"
#include "opintl.h" #include "opintl.h"
#define BAD_CASE(x) \ #define BAD_CASE(x) \
do \ do \
{ \ { \
fprintf (stderr, \ opcodes_error_handler (_("bad case %d (%s) in %s:%d"), \
_("Bad case %d (%s) in %s:%d\n"), \ x, #x, __FILE__, __LINE__); \
x, #x, __FILE__, __LINE__); \ abort (); \
abort (); \ } \
} \
while (0) while (0)
#define FATAL_DEBUG \ #define FATAL_DEBUG \
do \ do \
{ \ { \
fprintf (stderr, \ opcodes_error_handler (_("internal: non-debugged code " \
_("Internal: Non-debugged code (test-case missing): %s:%d"),\ "(test-case missing): %s:%d"), \
__FILE__, __LINE__); \ __FILE__, __LINE__); \
abort (); \ abort (); \
} \ } \
while (0) while (0)
#define ROUND_MODE(n) \ #define ROUND_MODE(n) \

View file

@ -1,3 +1,4 @@
/* DO NOT EDIT! -*- buffer-read-only: t -*- vi:set ro: */
#line 1 "msp430-decode.opc" #line 1 "msp430-decode.opc"
/* -*- c -*- */ /* -*- c -*- */
/* Copyright (C) 2013-2018 Free Software Foundation, Inc. /* Copyright (C) 2013-2018 Free Software Foundation, Inc.
@ -26,6 +27,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "ansidecl.h" #include "ansidecl.h"
#include "opintl.h"
#include "opcode/msp430-decode.h" #include "opcode/msp430-decode.h"
static int trace = 0; static int trace = 0;
@ -141,9 +143,9 @@ immediate (int bytes, int sign_extend, LocalData *ld)
i -= 0x100000000ULL; i -= 0x100000000ULL;
break; break;
default: default:
fprintf (stderr, opcodes_error_handler
"Programmer error: immediate() called with invalid byte count %d\n", (_("internal error: immediate() called with invalid byte count %d"),
bytes); bytes);
abort (); abort ();
} }
return i; return i;
@ -359,9 +361,9 @@ msp430_decode_opcode (unsigned long pc,
op_semantics_1: op_semantics_1:
{ {
/** 0000 srcr 0000 dstr MOVA @%1, %0 */ /** 0000 srcr 0000 dstr MOVA @%1, %0 */
#line 439 "msp430-decode.opc" #line 440 "msp430-decode.opc"
int srcr AU = op[0] & 0x0f; int srcr AU = op[0] & 0x0f;
#line 439 "msp430-decode.opc" #line 440 "msp430-decode.opc"
int dstr AU = op[1] & 0x0f; int dstr AU = op[1] & 0x0f;
if (trace) if (trace)
{ {
@ -372,7 +374,7 @@ msp430_decode_opcode (unsigned long pc,
printf (" dstr = 0x%x\n", dstr); printf (" dstr = 0x%x\n", dstr);
} }
SYNTAX("MOVA @%1, %0"); SYNTAX("MOVA @%1, %0");
#line 439 "msp430-decode.opc" #line 440 "msp430-decode.opc"
ID (MSO_mov); SM (srcr, 0); DR (dstr); ID (MSO_mov); SM (srcr, 0); DR (dstr);
msp430->size = 20; msp430->size = 20;
msp430->ofs_430x = 1; msp430->ofs_430x = 1;
@ -383,9 +385,9 @@ msp430_decode_opcode (unsigned long pc,
op_semantics_2: op_semantics_2:
{ {
/** 0000 srcr 0001 dstr MOVA @%1+, %0 */ /** 0000 srcr 0001 dstr MOVA @%1+, %0 */
#line 444 "msp430-decode.opc" #line 445 "msp430-decode.opc"
int srcr AU = op[0] & 0x0f; int srcr AU = op[0] & 0x0f;
#line 444 "msp430-decode.opc" #line 445 "msp430-decode.opc"
int dstr AU = op[1] & 0x0f; int dstr AU = op[1] & 0x0f;
if (trace) if (trace)
{ {
@ -396,7 +398,7 @@ msp430_decode_opcode (unsigned long pc,
printf (" dstr = 0x%x\n", dstr); printf (" dstr = 0x%x\n", dstr);
} }
SYNTAX("MOVA @%1+, %0"); SYNTAX("MOVA @%1+, %0");
#line 444 "msp430-decode.opc" #line 445 "msp430-decode.opc"
ID (MSO_mov); SI (srcr); DR (dstr); ID (MSO_mov); SI (srcr); DR (dstr);
msp430->size = 20; msp430->size = 20;
msp430->ofs_430x = 1; msp430->ofs_430x = 1;
@ -407,9 +409,9 @@ msp430_decode_opcode (unsigned long pc,
op_semantics_3: op_semantics_3:
{ {
/** 0000 srcr 0010 dstr MOVA &%1, %0 */ /** 0000 srcr 0010 dstr MOVA &%1, %0 */
#line 449 "msp430-decode.opc" #line 450 "msp430-decode.opc"
int srcr AU = op[0] & 0x0f; int srcr AU = op[0] & 0x0f;
#line 449 "msp430-decode.opc" #line 450 "msp430-decode.opc"
int dstr AU = op[1] & 0x0f; int dstr AU = op[1] & 0x0f;
if (trace) if (trace)
{ {
@ -420,7 +422,7 @@ msp430_decode_opcode (unsigned long pc,
printf (" dstr = 0x%x\n", dstr); printf (" dstr = 0x%x\n", dstr);
} }
SYNTAX("MOVA &%1, %0"); SYNTAX("MOVA &%1, %0");
#line 449 "msp430-decode.opc" #line 450 "msp430-decode.opc"
ID (MSO_mov); SA ((srcr << 16) + IMMU(2)); DR (dstr); ID (MSO_mov); SA ((srcr << 16) + IMMU(2)); DR (dstr);
msp430->size = 20; msp430->size = 20;
msp430->ofs_430x = 1; msp430->ofs_430x = 1;
@ -431,9 +433,9 @@ msp430_decode_opcode (unsigned long pc,
op_semantics_4: op_semantics_4:
{ {
/** 0000 srcr 0011 dstr MOVA %1, %0 */ /** 0000 srcr 0011 dstr MOVA %1, %0 */
#line 454 "msp430-decode.opc" #line 455 "msp430-decode.opc"
int srcr AU = op[0] & 0x0f; int srcr AU = op[0] & 0x0f;
#line 454 "msp430-decode.opc" #line 455 "msp430-decode.opc"
int dstr AU = op[1] & 0x0f; int dstr AU = op[1] & 0x0f;
if (trace) if (trace)
{ {
@ -444,7 +446,7 @@ msp430_decode_opcode (unsigned long pc,
printf (" dstr = 0x%x\n", dstr); printf (" dstr = 0x%x\n", dstr);
} }
SYNTAX("MOVA %1, %0"); SYNTAX("MOVA %1, %0");
#line 454 "msp430-decode.opc" #line 455 "msp430-decode.opc"
ID (MSO_mov); SM (srcr, IMMS(2)); DR (dstr); ID (MSO_mov); SM (srcr, IMMS(2)); DR (dstr);
msp430->size = 20; msp430->size = 20;
msp430->ofs_430x = 1; msp430->ofs_430x = 1;
@ -456,11 +458,11 @@ msp430_decode_opcode (unsigned long pc,
op_semantics_5: op_semantics_5:
{ {
/** 0000 bt00 010w dstr RRCM.A %c, %0 */ /** 0000 bt00 010w dstr RRCM.A %c, %0 */
#line 521 "msp430-decode.opc" #line 522 "msp430-decode.opc"
int bt AU = (op[0] >> 2) & 0x03; int bt AU = (op[0] >> 2) & 0x03;
#line 521 "msp430-decode.opc" #line 522 "msp430-decode.opc"
int w AU = (op[1] >> 4) & 0x01; int w AU = (op[1] >> 4) & 0x01;
#line 521 "msp430-decode.opc" #line 522 "msp430-decode.opc"
int dstr AU = op[1] & 0x0f; int dstr AU = op[1] & 0x0f;
if (trace) if (trace)
{ {
@ -472,7 +474,7 @@ msp430_decode_opcode (unsigned long pc,
printf (" dstr = 0x%x\n", dstr); printf (" dstr = 0x%x\n", dstr);
} }
SYNTAX("RRCM.A %c, %0"); SYNTAX("RRCM.A %c, %0");
#line 521 "msp430-decode.opc" #line 522 "msp430-decode.opc"
ID (MSO_rrc); DR (dstr); SR (dstr); ID (MSO_rrc); DR (dstr); SR (dstr);
msp430->repeats = bt; msp430->repeats = bt;
msp430->size = w ? 16 : 20; msp430->size = w ? 16 : 20;
@ -485,9 +487,9 @@ msp430_decode_opcode (unsigned long pc,
op_semantics_6: op_semantics_6:
{ {
/** 0000 srcr 0110 dstr MOVA %1, &%0 */ /** 0000 srcr 0110 dstr MOVA %1, &%0 */
#line 459 "msp430-decode.opc" #line 460 "msp430-decode.opc"
int srcr AU = op[0] & 0x0f; int srcr AU = op[0] & 0x0f;
#line 459 "msp430-decode.opc" #line 460 "msp430-decode.opc"
int dstr AU = op[1] & 0x0f; int dstr AU = op[1] & 0x0f;
if (trace) if (trace)
{ {
@ -498,7 +500,7 @@ msp430_decode_opcode (unsigned long pc,
printf (" dstr = 0x%x\n", dstr); printf (" dstr = 0x%x\n", dstr);
} }
SYNTAX("MOVA %1, &%0"); SYNTAX("MOVA %1, &%0");
#line 459 "msp430-decode.opc" #line 460 "msp430-decode.opc"
ID (MSO_mov); SR (srcr); DA ((dstr << 16) + IMMU(2)); ID (MSO_mov); SR (srcr); DA ((dstr << 16) + IMMU(2));
msp430->size = 20; msp430->size = 20;
msp430->ofs_430x = 1; msp430->ofs_430x = 1;
@ -509,9 +511,9 @@ msp430_decode_opcode (unsigned long pc,
op_semantics_7: op_semantics_7:
{ {
/** 0000 srcr 0111 dstr MOVA %1, &%0 */ /** 0000 srcr 0111 dstr MOVA %1, &%0 */
#line 464 "msp430-decode.opc" #line 465 "msp430-decode.opc"
int srcr AU = op[0] & 0x0f; int srcr AU = op[0] & 0x0f;
#line 464 "msp430-decode.opc" #line 465 "msp430-decode.opc"
int dstr AU = op[1] & 0x0f; int dstr AU = op[1] & 0x0f;
if (trace) if (trace)
{ {
@ -522,7 +524,7 @@ msp430_decode_opcode (unsigned long pc,
printf (" dstr = 0x%x\n", dstr); printf (" dstr = 0x%x\n", dstr);
} }
SYNTAX("MOVA %1, &%0"); SYNTAX("MOVA %1, &%0");
#line 464 "msp430-decode.opc" #line 465 "msp430-decode.opc"
ID (MSO_mov); SR (srcr); DM (dstr, IMMS(2)); ID (MSO_mov); SR (srcr); DM (dstr, IMMS(2));
msp430->size = 20; msp430->size = 20;
msp430->ofs_430x = 1; msp430->ofs_430x = 1;
@ -533,9 +535,9 @@ msp430_decode_opcode (unsigned long pc,
op_semantics_8: op_semantics_8:
{ {
/** 0000 srcr 1000 dstr MOVA %1, %0 */ /** 0000 srcr 1000 dstr MOVA %1, %0 */
#line 469 "msp430-decode.opc" #line 470 "msp430-decode.opc"
int srcr AU = op[0] & 0x0f; int srcr AU = op[0] & 0x0f;
#line 469 "msp430-decode.opc" #line 470 "msp430-decode.opc"
int dstr AU = op[1] & 0x0f; int dstr AU = op[1] & 0x0f;
if (trace) if (trace)
{ {
@ -546,7 +548,7 @@ msp430_decode_opcode (unsigned long pc,
printf (" dstr = 0x%x\n", dstr); printf (" dstr = 0x%x\n", dstr);
} }
SYNTAX("MOVA %1, %0"); SYNTAX("MOVA %1, %0");
#line 469 "msp430-decode.opc" #line 470 "msp430-decode.opc"
ID (MSO_mov); SC ((srcr << 16) + IMMU(2)); DR (dstr); ID (MSO_mov); SC ((srcr << 16) + IMMU(2)); DR (dstr);
msp430->size = 20; msp430->size = 20;
msp430->ofs_430x = 1; msp430->ofs_430x = 1;
@ -557,9 +559,9 @@ msp430_decode_opcode (unsigned long pc,
op_semantics_9: op_semantics_9:
{ {
/** 0000 srcr 1001 dstr CMPA %1, %0 */ /** 0000 srcr 1001 dstr CMPA %1, %0 */
#line 474 "msp430-decode.opc" #line 475 "msp430-decode.opc"
int srcr AU = op[0] & 0x0f; int srcr AU = op[0] & 0x0f;
#line 474 "msp430-decode.opc" #line 475 "msp430-decode.opc"
int dstr AU = op[1] & 0x0f; int dstr AU = op[1] & 0x0f;
if (trace) if (trace)
{ {
@ -570,7 +572,7 @@ msp430_decode_opcode (unsigned long pc,
printf (" dstr = 0x%x\n", dstr); printf (" dstr = 0x%x\n", dstr);
} }
SYNTAX("CMPA %1, %0"); SYNTAX("CMPA %1, %0");
#line 474 "msp430-decode.opc" #line 475 "msp430-decode.opc"
ID (MSO_cmp); SC ((srcr << 16) + IMMU(2)); DR (dstr); ID (MSO_cmp); SC ((srcr << 16) + IMMU(2)); DR (dstr);
msp430->size = 20; msp430->size = 20;
msp430->ofs_430x = 1; msp430->ofs_430x = 1;
@ -582,9 +584,9 @@ msp430_decode_opcode (unsigned long pc,
op_semantics_10: op_semantics_10:
{ {
/** 0000 srcr 1010 dstr ADDA %1, %0 */ /** 0000 srcr 1010 dstr ADDA %1, %0 */
#line 480 "msp430-decode.opc" #line 481 "msp430-decode.opc"
int srcr AU = op[0] & 0x0f; int srcr AU = op[0] & 0x0f;
#line 480 "msp430-decode.opc" #line 481 "msp430-decode.opc"
int dstr AU = op[1] & 0x0f; int dstr AU = op[1] & 0x0f;
if (trace) if (trace)
{ {
@ -595,7 +597,7 @@ msp430_decode_opcode (unsigned long pc,
printf (" dstr = 0x%x\n", dstr); printf (" dstr = 0x%x\n", dstr);
} }
SYNTAX("ADDA %1, %0"); SYNTAX("ADDA %1, %0");
#line 480 "msp430-decode.opc" #line 481 "msp430-decode.opc"
ID (MSO_add); SC ((srcr << 16) + IMMU(2)); DR (dstr); ID (MSO_add); SC ((srcr << 16) + IMMU(2)); DR (dstr);
msp430->size = 20; msp430->size = 20;
msp430->ofs_430x = 1; msp430->ofs_430x = 1;
@ -607,9 +609,9 @@ msp430_decode_opcode (unsigned long pc,
op_semantics_11: op_semantics_11:
{ {
/** 0000 srcr 1011 dstr SUBA %1, %0 */ /** 0000 srcr 1011 dstr SUBA %1, %0 */
#line 486 "msp430-decode.opc" #line 487 "msp430-decode.opc"
int srcr AU = op[0] & 0x0f; int srcr AU = op[0] & 0x0f;
#line 486 "msp430-decode.opc" #line 487 "msp430-decode.opc"
int dstr AU = op[1] & 0x0f; int dstr AU = op[1] & 0x0f;
if (trace) if (trace)
{ {
@ -620,7 +622,7 @@ msp430_decode_opcode (unsigned long pc,
printf (" dstr = 0x%x\n", dstr); printf (" dstr = 0x%x\n", dstr);
} }
SYNTAX("SUBA %1, %0"); SYNTAX("SUBA %1, %0");
#line 486 "msp430-decode.opc" #line 487 "msp430-decode.opc"
ID (MSO_sub); SC ((srcr << 16) + IMMU(2)); DR (dstr); ID (MSO_sub); SC ((srcr << 16) + IMMU(2)); DR (dstr);
msp430->size = 20; msp430->size = 20;
msp430->ofs_430x = 1; msp430->ofs_430x = 1;
@ -632,9 +634,9 @@ msp430_decode_opcode (unsigned long pc,
op_semantics_12: op_semantics_12:
{ {
/** 0000 srcr 1100 dstr MOVA %1, %0 */ /** 0000 srcr 1100 dstr MOVA %1, %0 */
#line 498 "msp430-decode.opc" #line 499 "msp430-decode.opc"
int srcr AU = op[0] & 0x0f; int srcr AU = op[0] & 0x0f;
#line 498 "msp430-decode.opc" #line 499 "msp430-decode.opc"
int dstr AU = op[1] & 0x0f; int dstr AU = op[1] & 0x0f;
if (trace) if (trace)
{ {
@ -645,7 +647,7 @@ msp430_decode_opcode (unsigned long pc,
printf (" dstr = 0x%x\n", dstr); printf (" dstr = 0x%x\n", dstr);
} }
SYNTAX("MOVA %1, %0"); SYNTAX("MOVA %1, %0");
#line 498 "msp430-decode.opc" #line 499 "msp430-decode.opc"
ID (MSO_mov); SR (srcr); DR (dstr); ID (MSO_mov); SR (srcr); DR (dstr);
msp430->size = 20; msp430->size = 20;
msp430->ofs_430x = 1; msp430->ofs_430x = 1;
@ -656,9 +658,9 @@ msp430_decode_opcode (unsigned long pc,
op_semantics_13: op_semantics_13:
{ {
/** 0000 srcr 1101 dstr CMPA %1, %0 */ /** 0000 srcr 1101 dstr CMPA %1, %0 */
#line 503 "msp430-decode.opc" #line 504 "msp430-decode.opc"
int srcr AU = op[0] & 0x0f; int srcr AU = op[0] & 0x0f;
#line 503 "msp430-decode.opc" #line 504 "msp430-decode.opc"
int dstr AU = op[1] & 0x0f; int dstr AU = op[1] & 0x0f;
if (trace) if (trace)
{ {
@ -669,7 +671,7 @@ msp430_decode_opcode (unsigned long pc,
printf (" dstr = 0x%x\n", dstr); printf (" dstr = 0x%x\n", dstr);
} }
SYNTAX("CMPA %1, %0"); SYNTAX("CMPA %1, %0");
#line 503 "msp430-decode.opc" #line 504 "msp430-decode.opc"
ID (MSO_cmp); SR (srcr); DR (dstr); ID (MSO_cmp); SR (srcr); DR (dstr);
msp430->size = 20; msp430->size = 20;
msp430->ofs_430x = 1; msp430->ofs_430x = 1;
@ -681,9 +683,9 @@ msp430_decode_opcode (unsigned long pc,
op_semantics_14: op_semantics_14:
{ {
/** 0000 srcr 1110 dstr ADDA %1, %0 */ /** 0000 srcr 1110 dstr ADDA %1, %0 */
#line 509 "msp430-decode.opc" #line 510 "msp430-decode.opc"
int srcr AU = op[0] & 0x0f; int srcr AU = op[0] & 0x0f;
#line 509 "msp430-decode.opc" #line 510 "msp430-decode.opc"
int dstr AU = op[1] & 0x0f; int dstr AU = op[1] & 0x0f;
if (trace) if (trace)
{ {
@ -694,7 +696,7 @@ msp430_decode_opcode (unsigned long pc,
printf (" dstr = 0x%x\n", dstr); printf (" dstr = 0x%x\n", dstr);
} }
SYNTAX("ADDA %1, %0"); SYNTAX("ADDA %1, %0");
#line 509 "msp430-decode.opc" #line 510 "msp430-decode.opc"
ID (MSO_add); SR (srcr); DR (dstr); ID (MSO_add); SR (srcr); DR (dstr);
msp430->size = 20; msp430->size = 20;
msp430->ofs_430x = 1; msp430->ofs_430x = 1;
@ -706,9 +708,9 @@ msp430_decode_opcode (unsigned long pc,
op_semantics_15: op_semantics_15:
{ {
/** 0000 srcr 1111 dstr SUBA %1, %0 */ /** 0000 srcr 1111 dstr SUBA %1, %0 */
#line 515 "msp430-decode.opc" #line 516 "msp430-decode.opc"
int srcr AU = op[0] & 0x0f; int srcr AU = op[0] & 0x0f;
#line 515 "msp430-decode.opc" #line 516 "msp430-decode.opc"
int dstr AU = op[1] & 0x0f; int dstr AU = op[1] & 0x0f;
if (trace) if (trace)
{ {
@ -719,7 +721,7 @@ msp430_decode_opcode (unsigned long pc,
printf (" dstr = 0x%x\n", dstr); printf (" dstr = 0x%x\n", dstr);
} }
SYNTAX("SUBA %1, %0"); SYNTAX("SUBA %1, %0");
#line 515 "msp430-decode.opc" #line 516 "msp430-decode.opc"
ID (MSO_sub); SR (srcr); DR (dstr); ID (MSO_sub); SR (srcr); DR (dstr);
msp430->size = 20; msp430->size = 20;
msp430->ofs_430x = 1; msp430->ofs_430x = 1;
@ -750,11 +752,11 @@ msp430_decode_opcode (unsigned long pc,
op_semantics_16: op_semantics_16:
{ {
/** 0000 bt01 010w dstr RRAM.A %c, %0 */ /** 0000 bt01 010w dstr RRAM.A %c, %0 */
#line 528 "msp430-decode.opc" #line 529 "msp430-decode.opc"
int bt AU = (op[0] >> 2) & 0x03; int bt AU = (op[0] >> 2) & 0x03;
#line 528 "msp430-decode.opc" #line 529 "msp430-decode.opc"
int w AU = (op[1] >> 4) & 0x01; int w AU = (op[1] >> 4) & 0x01;
#line 528 "msp430-decode.opc" #line 529 "msp430-decode.opc"
int dstr AU = op[1] & 0x0f; int dstr AU = op[1] & 0x0f;
if (trace) if (trace)
{ {
@ -766,7 +768,7 @@ msp430_decode_opcode (unsigned long pc,
printf (" dstr = 0x%x\n", dstr); printf (" dstr = 0x%x\n", dstr);
} }
SYNTAX("RRAM.A %c, %0"); SYNTAX("RRAM.A %c, %0");
#line 528 "msp430-decode.opc" #line 529 "msp430-decode.opc"
ID (MSO_rra); DR (dstr); SR (dstr); ID (MSO_rra); DR (dstr); SR (dstr);
msp430->repeats = bt; msp430->repeats = bt;
msp430->size = w ? 16 : 20; msp430->size = w ? 16 : 20;
@ -828,11 +830,11 @@ msp430_decode_opcode (unsigned long pc,
op_semantics_17: op_semantics_17:
{ {
/** 0000 bt10 010w dstr RLAM.A %c, %0 */ /** 0000 bt10 010w dstr RLAM.A %c, %0 */
#line 535 "msp430-decode.opc" #line 536 "msp430-decode.opc"
int bt AU = (op[0] >> 2) & 0x03; int bt AU = (op[0] >> 2) & 0x03;
#line 535 "msp430-decode.opc" #line 536 "msp430-decode.opc"
int w AU = (op[1] >> 4) & 0x01; int w AU = (op[1] >> 4) & 0x01;
#line 535 "msp430-decode.opc" #line 536 "msp430-decode.opc"
int dstr AU = op[1] & 0x0f; int dstr AU = op[1] & 0x0f;
if (trace) if (trace)
{ {
@ -844,7 +846,7 @@ msp430_decode_opcode (unsigned long pc,
printf (" dstr = 0x%x\n", dstr); printf (" dstr = 0x%x\n", dstr);
} }
SYNTAX("RLAM.A %c, %0"); SYNTAX("RLAM.A %c, %0");
#line 535 "msp430-decode.opc" #line 536 "msp430-decode.opc"
ID (MSO_add); DR (dstr); SR (dstr); ID (MSO_add); DR (dstr); SR (dstr);
msp430->repeats = bt; msp430->repeats = bt;
msp430->size = w ? 16 : 20; msp430->size = w ? 16 : 20;
@ -906,11 +908,11 @@ msp430_decode_opcode (unsigned long pc,
op_semantics_18: op_semantics_18:
{ {
/** 0000 bt11 010w dstr RRUM.A %c, %0 */ /** 0000 bt11 010w dstr RRUM.A %c, %0 */
#line 542 "msp430-decode.opc" #line 543 "msp430-decode.opc"
int bt AU = (op[0] >> 2) & 0x03; int bt AU = (op[0] >> 2) & 0x03;
#line 542 "msp430-decode.opc" #line 543 "msp430-decode.opc"
int w AU = (op[1] >> 4) & 0x01; int w AU = (op[1] >> 4) & 0x01;
#line 542 "msp430-decode.opc" #line 543 "msp430-decode.opc"
int dstr AU = op[1] & 0x0f; int dstr AU = op[1] & 0x0f;
if (trace) if (trace)
{ {
@ -922,7 +924,7 @@ msp430_decode_opcode (unsigned long pc,
printf (" dstr = 0x%x\n", dstr); printf (" dstr = 0x%x\n", dstr);
} }
SYNTAX("RRUM.A %c, %0"); SYNTAX("RRUM.A %c, %0");
#line 542 "msp430-decode.opc" #line 543 "msp430-decode.opc"
ID (MSO_rru); DR (dstr); SR (dstr); ID (MSO_rru); DR (dstr); SR (dstr);
msp430->repeats = bt; msp430->repeats = bt;
msp430->size = w ? 16 : 20; msp430->size = w ? 16 : 20;
@ -1595,15 +1597,15 @@ msp430_decode_opcode (unsigned long pc,
op_semantics_19: op_semantics_19:
{ {
/** 0001 00so c b ad dreg %S%b %1 */ /** 0001 00so c b ad dreg %S%b %1 */
#line 395 "msp430-decode.opc" #line 396 "msp430-decode.opc"
int so AU = op[0] & 0x03; int so AU = op[0] & 0x03;
#line 395 "msp430-decode.opc" #line 396 "msp430-decode.opc"
int c AU = (op[1] >> 7) & 0x01; int c AU = (op[1] >> 7) & 0x01;
#line 395 "msp430-decode.opc" #line 396 "msp430-decode.opc"
int b AU = (op[1] >> 6) & 0x01; int b AU = (op[1] >> 6) & 0x01;
#line 395 "msp430-decode.opc" #line 396 "msp430-decode.opc"
int ad AU = (op[1] >> 4) & 0x03; int ad AU = (op[1] >> 4) & 0x03;
#line 395 "msp430-decode.opc" #line 396 "msp430-decode.opc"
int dreg AU = op[1] & 0x0f; int dreg AU = op[1] & 0x0f;
if (trace) if (trace)
{ {
@ -1617,7 +1619,7 @@ msp430_decode_opcode (unsigned long pc,
printf (" dreg = 0x%x\n", dreg); printf (" dreg = 0x%x\n", dreg);
} }
SYNTAX("%S%b %1"); SYNTAX("%S%b %1");
#line 395 "msp430-decode.opc" #line 396 "msp430-decode.opc"
ID (sopc_to_id (so,c)); ASX (dreg, ad, srxt_bits); ABW (al_bit, b); ID (sopc_to_id (so,c)); ASX (dreg, ad, srxt_bits); ABW (al_bit, b);
@ -1683,7 +1685,7 @@ msp430_decode_opcode (unsigned long pc,
op[0], op[1]); op[0], op[1]);
} }
SYNTAX("RETI"); SYNTAX("RETI");
#line 549 "msp430-decode.opc" #line 550 "msp430-decode.opc"
ID (MSO_reti); ID (MSO_reti);
msp430->size = 20; msp430->size = 20;
msp430->ofs_430x = 1; msp430->ofs_430x = 1;
@ -1901,9 +1903,9 @@ msp430_decode_opcode (unsigned long pc,
case 0x7f: case 0x7f:
{ {
/** 0001 0011 01as dstr CALLA %0 */ /** 0001 0011 01as dstr CALLA %0 */
#line 554 "msp430-decode.opc" #line 555 "msp430-decode.opc"
int as AU = (op[1] >> 4) & 0x03; int as AU = (op[1] >> 4) & 0x03;
#line 554 "msp430-decode.opc" #line 555 "msp430-decode.opc"
int dstr AU = op[1] & 0x0f; int dstr AU = op[1] & 0x0f;
if (trace) if (trace)
{ {
@ -1914,7 +1916,7 @@ msp430_decode_opcode (unsigned long pc,
printf (" dstr = 0x%x\n", dstr); printf (" dstr = 0x%x\n", dstr);
} }
SYNTAX("CALLA %0"); SYNTAX("CALLA %0");
#line 554 "msp430-decode.opc" #line 555 "msp430-decode.opc"
ID (MSO_call); AS (dstr, as); ID (MSO_call); AS (dstr, as);
msp430->size = 20; msp430->size = 20;
msp430->ofs_430x = 1; msp430->ofs_430x = 1;
@ -1939,7 +1941,7 @@ msp430_decode_opcode (unsigned long pc,
case 0x8f: case 0x8f:
{ {
/** 0001 0011 1000 extb CALLA %0 */ /** 0001 0011 1000 extb CALLA %0 */
#line 559 "msp430-decode.opc" #line 560 "msp430-decode.opc"
int extb AU = op[1] & 0x0f; int extb AU = op[1] & 0x0f;
if (trace) if (trace)
{ {
@ -1949,7 +1951,7 @@ msp430_decode_opcode (unsigned long pc,
printf (" extb = 0x%x\n", extb); printf (" extb = 0x%x\n", extb);
} }
SYNTAX("CALLA %0"); SYNTAX("CALLA %0");
#line 559 "msp430-decode.opc" #line 560 "msp430-decode.opc"
ID (MSO_call); SA (IMMU(2) | (extb << 16)); ID (MSO_call); SA (IMMU(2) | (extb << 16));
msp430->size = 20; msp430->size = 20;
msp430->ofs_430x = 1; msp430->ofs_430x = 1;
@ -1974,7 +1976,7 @@ msp430_decode_opcode (unsigned long pc,
case 0x9f: case 0x9f:
{ {
/** 0001 0011 1001 extb CALLA %0 */ /** 0001 0011 1001 extb CALLA %0 */
#line 564 "msp430-decode.opc" #line 565 "msp430-decode.opc"
int extb AU = op[1] & 0x0f; int extb AU = op[1] & 0x0f;
if (trace) if (trace)
{ {
@ -1984,7 +1986,7 @@ msp430_decode_opcode (unsigned long pc,
printf (" extb = 0x%x\n", extb); printf (" extb = 0x%x\n", extb);
} }
SYNTAX("CALLA %0"); SYNTAX("CALLA %0");
#line 564 "msp430-decode.opc" #line 565 "msp430-decode.opc"
raddr = IMMU(2) | (extb << 16); raddr = IMMU(2) | (extb << 16);
if (raddr & 0x80000) if (raddr & 0x80000)
raddr -= 0x100000; raddr -= 0x100000;
@ -2012,7 +2014,7 @@ msp430_decode_opcode (unsigned long pc,
case 0xbf: case 0xbf:
{ {
/** 0001 0011 1011 extb CALLA %0 */ /** 0001 0011 1011 extb CALLA %0 */
#line 572 "msp430-decode.opc" #line 573 "msp430-decode.opc"
int extb AU = op[1] & 0x0f; int extb AU = op[1] & 0x0f;
if (trace) if (trace)
{ {
@ -2022,7 +2024,7 @@ msp430_decode_opcode (unsigned long pc,
printf (" extb = 0x%x\n", extb); printf (" extb = 0x%x\n", extb);
} }
SYNTAX("CALLA %0"); SYNTAX("CALLA %0");
#line 572 "msp430-decode.opc" #line 573 "msp430-decode.opc"
ID (MSO_call); SC (IMMU(2) | (extb << 16)); ID (MSO_call); SC (IMMU(2) | (extb << 16));
msp430->size = 20; msp430->size = 20;
msp430->ofs_430x = 1; msp430->ofs_430x = 1;
@ -2039,11 +2041,11 @@ msp430_decode_opcode (unsigned long pc,
op_semantics_20: op_semantics_20:
{ {
/** 0001 010w bits srcr PUSHM.A %0 */ /** 0001 010w bits srcr PUSHM.A %0 */
#line 577 "msp430-decode.opc" #line 578 "msp430-decode.opc"
int w AU = op[0] & 0x01; int w AU = op[0] & 0x01;
#line 577 "msp430-decode.opc" #line 578 "msp430-decode.opc"
int bits AU = (op[1] >> 4) & 0x0f; int bits AU = (op[1] >> 4) & 0x0f;
#line 577 "msp430-decode.opc" #line 578 "msp430-decode.opc"
int srcr AU = op[1] & 0x0f; int srcr AU = op[1] & 0x0f;
if (trace) if (trace)
{ {
@ -2055,7 +2057,7 @@ msp430_decode_opcode (unsigned long pc,
printf (" srcr = 0x%x\n", srcr); printf (" srcr = 0x%x\n", srcr);
} }
SYNTAX("PUSHM.A %0"); SYNTAX("PUSHM.A %0");
#line 577 "msp430-decode.opc" #line 578 "msp430-decode.opc"
ID (MSO_push); SR (srcr); ID (MSO_push); SR (srcr);
msp430->size = w ? 16 : 20; msp430->size = w ? 16 : 20;
msp430->repeats = bits; msp430->repeats = bits;
@ -2082,11 +2084,11 @@ msp430_decode_opcode (unsigned long pc,
op_semantics_21: op_semantics_21:
{ {
/** 0001 011w bits dstr POPM.A %0 */ /** 0001 011w bits dstr POPM.A %0 */
#line 583 "msp430-decode.opc" #line 584 "msp430-decode.opc"
int w AU = op[0] & 0x01; int w AU = op[0] & 0x01;
#line 583 "msp430-decode.opc" #line 584 "msp430-decode.opc"
int bits AU = (op[1] >> 4) & 0x0f; int bits AU = (op[1] >> 4) & 0x0f;
#line 583 "msp430-decode.opc" #line 584 "msp430-decode.opc"
int dstr AU = op[1] & 0x0f; int dstr AU = op[1] & 0x0f;
if (trace) if (trace)
{ {
@ -2098,7 +2100,7 @@ msp430_decode_opcode (unsigned long pc,
printf (" dstr = 0x%x\n", dstr); printf (" dstr = 0x%x\n", dstr);
} }
SYNTAX("POPM.A %0"); SYNTAX("POPM.A %0");
#line 583 "msp430-decode.opc" #line 584 "msp430-decode.opc"
ID (MSO_pop); DR (dstr); ID (MSO_pop); DR (dstr);
msp430->size = w ? 16 : 20; msp430->size = w ? 16 : 20;
msp430->repeats = bits; msp430->repeats = bits;
@ -2125,13 +2127,13 @@ msp430_decode_opcode (unsigned long pc,
op_semantics_22: op_semantics_22:
{ {
/** 0001 1srx t l 00 dsxt 430x */ /** 0001 1srx t l 00 dsxt 430x */
#line 351 "msp430-decode.opc" #line 352 "msp430-decode.opc"
int srx AU = op[0] & 0x07; int srx AU = op[0] & 0x07;
#line 351 "msp430-decode.opc" #line 352 "msp430-decode.opc"
int t AU = (op[1] >> 7) & 0x01; int t AU = (op[1] >> 7) & 0x01;
#line 351 "msp430-decode.opc" #line 352 "msp430-decode.opc"
int l AU = (op[1] >> 6) & 0x01; int l AU = (op[1] >> 6) & 0x01;
#line 351 "msp430-decode.opc" #line 352 "msp430-decode.opc"
int dsxt AU = op[1] & 0x0f; int dsxt AU = op[1] & 0x0f;
if (trace) if (trace)
{ {
@ -2144,7 +2146,7 @@ msp430_decode_opcode (unsigned long pc,
printf (" dsxt = 0x%x\n", dsxt); printf (" dsxt = 0x%x\n", dsxt);
} }
SYNTAX("430x"); SYNTAX("430x");
#line 351 "msp430-decode.opc" #line 352 "msp430-decode.opc"
al_bit = l; al_bit = l;
srxt_bits = srx * 2 + t; srxt_bits = srx * 2 + t;
@ -2247,11 +2249,11 @@ msp430_decode_opcode (unsigned long pc,
op_semantics_23: op_semantics_23:
{ {
/** 001jmp aa addrlsbs %J %1 */ /** 001jmp aa addrlsbs %J %1 */
#line 425 "msp430-decode.opc" #line 426 "msp430-decode.opc"
int jmp AU = (op[0] >> 2) & 0x07; int jmp AU = (op[0] >> 2) & 0x07;
#line 425 "msp430-decode.opc" #line 426 "msp430-decode.opc"
int aa AU = op[0] & 0x03; int aa AU = op[0] & 0x03;
#line 425 "msp430-decode.opc" #line 426 "msp430-decode.opc"
int addrlsbs AU = op[1]; int addrlsbs AU = op[1];
if (trace) if (trace)
{ {
@ -2263,7 +2265,7 @@ msp430_decode_opcode (unsigned long pc,
printf (" addrlsbs = 0x%x\n", addrlsbs); printf (" addrlsbs = 0x%x\n", addrlsbs);
} }
SYNTAX("%J %1"); SYNTAX("%J %1");
#line 425 "msp430-decode.opc" #line 426 "msp430-decode.opc"
raddr = (aa << 9) | (addrlsbs << 1); raddr = (aa << 9) | (addrlsbs << 1);
if (raddr & 0x400) if (raddr & 0x400)
@ -2568,17 +2570,17 @@ msp430_decode_opcode (unsigned long pc,
op_semantics_24: op_semantics_24:
{ {
/** dopc sreg a b as dreg %D%b %1,%0 */ /** dopc sreg a b as dreg %D%b %1,%0 */
#line 372 "msp430-decode.opc" #line 373 "msp430-decode.opc"
int dopc AU = (op[0] >> 4) & 0x0f; int dopc AU = (op[0] >> 4) & 0x0f;
#line 372 "msp430-decode.opc" #line 373 "msp430-decode.opc"
int sreg AU = op[0] & 0x0f; int sreg AU = op[0] & 0x0f;
#line 372 "msp430-decode.opc" #line 373 "msp430-decode.opc"
int a AU = (op[1] >> 7) & 0x01; int a AU = (op[1] >> 7) & 0x01;
#line 372 "msp430-decode.opc" #line 373 "msp430-decode.opc"
int b AU = (op[1] >> 6) & 0x01; int b AU = (op[1] >> 6) & 0x01;
#line 372 "msp430-decode.opc" #line 373 "msp430-decode.opc"
int as AU = (op[1] >> 4) & 0x03; int as AU = (op[1] >> 4) & 0x03;
#line 372 "msp430-decode.opc" #line 373 "msp430-decode.opc"
int dreg AU = op[1] & 0x0f; int dreg AU = op[1] & 0x0f;
if (trace) if (trace)
{ {
@ -2593,7 +2595,7 @@ msp430_decode_opcode (unsigned long pc,
printf (" dreg = 0x%x\n", dreg); printf (" dreg = 0x%x\n", dreg);
} }
SYNTAX("%D%b %1,%0"); SYNTAX("%D%b %1,%0");
#line 372 "msp430-decode.opc" #line 373 "msp430-decode.opc"
ID (dopc_to_id (dopc)); ASX (sreg, as, srxt_bits); ADX (dreg, a, dsxt_bits); ABW (al_bit, b); ID (dopc_to_id (dopc)); ASX (sreg, as, srxt_bits); ADX (dreg, a, dsxt_bits); ABW (al_bit, b);
if (a == 0 && as == 0) if (a == 0 && as == 0)
@ -4340,7 +4342,7 @@ msp430_decode_opcode (unsigned long pc,
} }
break; break;
} }
#line 589 "msp430-decode.opc" #line 590 "msp430-decode.opc"
return msp430->n_bytes; return msp430->n_bytes;
} }

View file

@ -25,6 +25,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "ansidecl.h" #include "ansidecl.h"
#include "opintl.h"
#include "opcode/msp430-decode.h" #include "opcode/msp430-decode.h"
static int trace = 0; static int trace = 0;
@ -140,9 +141,9 @@ immediate (int bytes, int sign_extend, LocalData *ld)
i -= 0x100000000ULL; i -= 0x100000000ULL;
break; break;
default: default:
fprintf (stderr, opcodes_error_handler
"Programmer error: immediate() called with invalid byte count %d\n", (_("internal error: immediate() called with invalid byte count %d"),
bytes); bytes);
abort (); abort ();
} }
return i; return i;

View file

@ -592,7 +592,9 @@ mt_cgen_parse_operand (CGEN_CPU_DESC cd,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while parsing.\n"), opindex); opcodes_error_handler
(_("internal error: unrecognized field %d while parsing"),
opindex);
abort (); abort ();
} }

View file

@ -976,6 +976,11 @@ init_tables (void)
{ {
} }
#ifndef opcodes_error_handler
#define opcodes_error_handler(...) \
fprintf (stderr, __VA_ARGS__); fputc ('\n', stderr)
#endif
static const CGEN_MACH * lookup_mach_via_bfd_name (const CGEN_MACH *, const char *); static const CGEN_MACH * lookup_mach_via_bfd_name (const CGEN_MACH *, const char *);
static void build_hw_table (CGEN_CPU_TABLE *); static void build_hw_table (CGEN_CPU_TABLE *);
static void build_ifield_table (CGEN_CPU_TABLE *); static void build_ifield_table (CGEN_CPU_TABLE *);
@ -1136,8 +1141,11 @@ mt_cgen_rebuild_tables (CGEN_CPU_TABLE *cd)
{ {
if (cd->insn_chunk_bitsize != 0 && cd->insn_chunk_bitsize != mach->insn_chunk_bitsize) if (cd->insn_chunk_bitsize != 0 && cd->insn_chunk_bitsize != mach->insn_chunk_bitsize)
{ {
fprintf (stderr, "mt_cgen_rebuild_tables: conflicting insn-chunk-bitsize values: `%d' vs. `%d'\n", opcodes_error_handler
cd->insn_chunk_bitsize, mach->insn_chunk_bitsize); (/* xgettext:c-format */
_("internal error: mt_cgen_rebuild_tables: "
"conflicting insn-chunk-bitsize values: `%d' vs. `%d'"),
cd->insn_chunk_bitsize, mach->insn_chunk_bitsize);
abort (); abort ();
} }
@ -1216,8 +1224,11 @@ mt_cgen_cpu_open (enum cgen_cpu_open_arg arg_type, ...)
endian = va_arg (ap, enum cgen_endian); endian = va_arg (ap, enum cgen_endian);
break; break;
default : default :
fprintf (stderr, "mt_cgen_cpu_open: unsupported argument `%d'\n", opcodes_error_handler
arg_type); (/* xgettext:c-format */
_("internal error: mt_cgen_cpu_open: "
"unsupported argument `%d'"),
arg_type);
abort (); /* ??? return NULL? */ abort (); /* ??? return NULL? */
} }
arg_type = va_arg (ap, enum cgen_cpu_open_arg); arg_type = va_arg (ap, enum cgen_cpu_open_arg);
@ -1232,7 +1243,9 @@ mt_cgen_cpu_open (enum cgen_cpu_open_arg arg_type, ...)
if (endian == CGEN_ENDIAN_UNKNOWN) if (endian == CGEN_ENDIAN_UNKNOWN)
{ {
/* ??? If target has only one, could have a default. */ /* ??? If target has only one, could have a default. */
fprintf (stderr, "mt_cgen_cpu_open: no endianness specified\n"); opcodes_error_handler
(/* xgettext:c-format */
_("internal error: mt_cgen_cpu_open: no endianness specified"));
abort (); abort ();
} }

View file

@ -287,9 +287,10 @@ mt_cgen_print_operand (CGEN_CPU_DESC cd,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while printing insn.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while printing insn"),
abort (); opindex);
abort ();
} }
} }

View file

@ -750,8 +750,9 @@ mt_cgen_insert_operand (CGEN_CPU_DESC cd,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while building insn.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while building insn"),
opindex);
abort (); abort ();
} }
@ -970,8 +971,9 @@ mt_cgen_extract_operand (CGEN_CPU_DESC cd,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while decoding insn.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while decoding insn"),
opindex);
abort (); abort ();
} }
@ -1170,8 +1172,9 @@ mt_cgen_get_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while getting int operand.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while getting int operand"),
opindex);
abort (); abort ();
} }
@ -1352,8 +1355,9 @@ mt_cgen_get_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while getting vma operand.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while getting vma operand"),
opindex);
abort (); abort ();
} }
@ -1541,8 +1545,9 @@ mt_cgen_set_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while setting int operand.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while setting int operand"),
opindex);
abort (); abort ();
} }
} }
@ -1720,8 +1725,9 @@ mt_cgen_set_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while setting vma operand.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while setting vma operand"),
opindex);
abort (); abort ();
} }
} }

View file

@ -20,17 +20,16 @@
02110-1301, USA. */ 02110-1301, USA. */
#include <config.h> #include "sysdep.h"
#include <stdlib.h>
#include <stdint.h> #include <stdint.h>
#include <string.h>
#include <assert.h> #include <assert.h>
#include "safe-ctype.h" #include "safe-ctype.h"
#include "libiberty.h" #include "libiberty.h"
#include "hashtab.h" #include "hashtab.h"
#include "bfd.h" #include "bfd.h"
#include "opintl.h"
#include "opcode/nds32.h" #include "opcode/nds32.h"
#include "nds32-asm.h" #include "nds32-asm.h"
@ -1505,9 +1504,11 @@ build_opcode_syntax (struct nds32_opcode *opc)
if (fd == NULL) if (fd == NULL)
{ {
fprintf (stderr, "Internal error: Unknown operand, %s\n", str); /* xgettext: c-format */
opcodes_error_handler (_("internal error: unknown operand, %s"), str);
abort ();
} }
assert (fd && fidx >= 0 && fidx < (int) ARRAY_SIZE (operand_fields)); assert (fidx >= 0 && fidx < (int) ARRAY_SIZE (operand_fields));
*plex |= LEX_SET_FIELD (fidx); *plex |= LEX_SET_FIELD (fidx);
str += len; str += len;
@ -2057,14 +2058,16 @@ parse_operand (nds32_asm_desc_t *pdesc, nds32_asm_insn_t *pinsn,
value = value & 0xfffff; value = value & 0xfffff;
break; break;
default: default:
fprintf (stderr, "Internal error: Don't know how to handle " /* xgettext: c-format */
"parsing results.\n"); opcodes_error_handler (_("internal error: don't know how to handle "
"parsing results"));
abort (); abort ();
} }
} }
else else
{ {
fprintf (stderr, "Internal error: Unknown hardware resource.\n"); /* xgettext: c-format */
opcodes_error_handler (_("internal error: unknown hardware resource"));
abort (); abort ();
} }

View file

@ -22,6 +22,7 @@
#include "sysdep.h" #include "sysdep.h"
#include "disassemble.h" #include "disassemble.h"
#include "opintl.h"
#include "opcode/nios2.h" #include "opcode/nios2.h"
#include "libiberty.h" #include "libiberty.h"
#include <string.h> #include <string.h>
@ -130,9 +131,9 @@ nios2_init_opcode_hash (nios2_disassembler_state *state)
(nios2_opcode_hash *) malloc (sizeof (nios2_opcode_hash)); (nios2_opcode_hash *) malloc (sizeof (nios2_opcode_hash));
if (new_hash == NULL) if (new_hash == NULL)
{ {
fprintf (stderr, /* xgettext:c-format */
"error allocating memory...broken disassembler\n"); opcodes_error_handler (_("out of memory"));
abort (); exit (1);
} }
new_hash->opcode = op; new_hash->opcode = op;
new_hash->next = NULL; new_hash->next = NULL;
@ -257,8 +258,10 @@ nios2_control_regs (void)
static void static void
bad_opcode (const struct nios2_opcode *op) bad_opcode (const struct nios2_opcode *op)
{ {
fprintf (stderr, "Internal error: broken opcode descriptor for `%s %s'\n", opcodes_error_handler
op->name, op->args); /* xgettext:c-format */
(_("internal error: broken opcode descriptor for `%s %s'"),
op->name, op->args);
abort (); abort ();
} }

View file

@ -577,14 +577,6 @@ main (int argc, char ** argv)
VaryRef * vlist; VaryRef * vlist;
int skipping_section = 0; int skipping_section = 0;
if (argc > 2 && strcmp (argv[1], "-l") == 0)
{
sim_log = fopen (argv[2], "w");
fprintf (stderr, "sim_log: %s\n", argv[2]);
argc -= 2;
argv += 2;
}
if (argc < 2) if (argc < 2)
{ {
fprintf (stderr, "usage: opc2c infile.opc > outfile.opc\n"); fprintf (stderr, "usage: opc2c infile.opc > outfile.opc\n");
@ -802,6 +794,8 @@ main (int argc, char ** argv)
store_opcode_bits (opcodes[i], 0, indirect); store_opcode_bits (opcodes[i], 0, indirect);
} }
printf ("/* DO NOT EDIT! -*- buffer-read-only: t -*- vi:set ro: */\n");
dump_lines (&prefix_text, 0, 0); dump_lines (&prefix_text, 0, 0);
emit_indirect (indirect, 0); emit_indirect (indirect, 0);

View file

@ -500,7 +500,9 @@ or1k_cgen_parse_operand (CGEN_CPU_DESC cd,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while parsing.\n"), opindex); opcodes_error_handler
(_("internal error: unrecognized field %d while parsing"),
opindex);
abort (); abort ();
} }

View file

@ -1778,6 +1778,11 @@ init_tables (void)
{ {
} }
#ifndef opcodes_error_handler
#define opcodes_error_handler(...) \
fprintf (stderr, __VA_ARGS__); fputc ('\n', stderr)
#endif
static const CGEN_MACH * lookup_mach_via_bfd_name (const CGEN_MACH *, const char *); static const CGEN_MACH * lookup_mach_via_bfd_name (const CGEN_MACH *, const char *);
static void build_hw_table (CGEN_CPU_TABLE *); static void build_hw_table (CGEN_CPU_TABLE *);
static void build_ifield_table (CGEN_CPU_TABLE *); static void build_ifield_table (CGEN_CPU_TABLE *);
@ -1938,8 +1943,11 @@ or1k_cgen_rebuild_tables (CGEN_CPU_TABLE *cd)
{ {
if (cd->insn_chunk_bitsize != 0 && cd->insn_chunk_bitsize != mach->insn_chunk_bitsize) if (cd->insn_chunk_bitsize != 0 && cd->insn_chunk_bitsize != mach->insn_chunk_bitsize)
{ {
fprintf (stderr, "or1k_cgen_rebuild_tables: conflicting insn-chunk-bitsize values: `%d' vs. `%d'\n", opcodes_error_handler
cd->insn_chunk_bitsize, mach->insn_chunk_bitsize); (/* xgettext:c-format */
_("internal error: or1k_cgen_rebuild_tables: "
"conflicting insn-chunk-bitsize values: `%d' vs. `%d'"),
cd->insn_chunk_bitsize, mach->insn_chunk_bitsize);
abort (); abort ();
} }
@ -2018,8 +2026,11 @@ or1k_cgen_cpu_open (enum cgen_cpu_open_arg arg_type, ...)
endian = va_arg (ap, enum cgen_endian); endian = va_arg (ap, enum cgen_endian);
break; break;
default : default :
fprintf (stderr, "or1k_cgen_cpu_open: unsupported argument `%d'\n", opcodes_error_handler
arg_type); (/* xgettext:c-format */
_("internal error: or1k_cgen_cpu_open: "
"unsupported argument `%d'"),
arg_type);
abort (); /* ??? return NULL? */ abort (); /* ??? return NULL? */
} }
arg_type = va_arg (ap, enum cgen_cpu_open_arg); arg_type = va_arg (ap, enum cgen_cpu_open_arg);
@ -2034,7 +2045,9 @@ or1k_cgen_cpu_open (enum cgen_cpu_open_arg arg_type, ...)
if (endian == CGEN_ENDIAN_UNKNOWN) if (endian == CGEN_ENDIAN_UNKNOWN)
{ {
/* ??? If target has only one, could have a default. */ /* ??? If target has only one, could have a default. */
fprintf (stderr, "or1k_cgen_cpu_open: no endianness specified\n"); opcodes_error_handler
(/* xgettext:c-format */
_("internal error: or1k_cgen_cpu_open: no endianness specified"));
abort (); abort ();
} }

View file

@ -138,9 +138,10 @@ or1k_cgen_print_operand (CGEN_CPU_DESC cd,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while printing insn.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while printing insn"),
abort (); opindex);
abort ();
} }
} }

View file

@ -647,8 +647,9 @@ or1k_cgen_insert_operand (CGEN_CPU_DESC cd,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while building insn.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while building insn"),
opindex);
abort (); abort ();
} }
@ -752,8 +753,9 @@ or1k_cgen_extract_operand (CGEN_CPU_DESC cd,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while decoding insn.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while decoding insn"),
opindex);
abort (); abort ();
} }
@ -835,8 +837,9 @@ or1k_cgen_get_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while getting int operand.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while getting int operand"),
opindex);
abort (); abort ();
} }
@ -900,8 +903,9 @@ or1k_cgen_get_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while getting vma operand.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while getting vma operand"),
opindex);
abort (); abort ();
} }
@ -972,8 +976,9 @@ or1k_cgen_set_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while setting int operand.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while setting int operand"),
opindex);
abort (); abort ();
} }
} }
@ -1034,8 +1039,9 @@ or1k_cgen_set_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while setting vma operand.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while setting vma operand"),
opindex);
abort (); abort ();
} }
} }

View file

@ -356,7 +356,8 @@ powerpc_init_dialect (struct disassemble_info *info)
else if ((new_cpu = ppc_parse_cpu (dialect, &sticky, opt)) != 0) else if ((new_cpu = ppc_parse_cpu (dialect, &sticky, opt)) != 0)
dialect = new_cpu; dialect = new_cpu;
else else
fprintf (stderr, _("warning: ignoring unknown -M%s option\n"), opt); /* xgettext: c-format */
opcodes_error_handler (_("warning: ignoring unknown -M%s option"), opt);
} }
info->private_data = priv; info->private_data = priv;

View file

@ -64,8 +64,8 @@ parse_riscv_dis_option (const char *option)
} }
else else
{ {
/* Invalid option. */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized disassembler option: %s\n"), option); opcodes_error_handler (_("unrecognized disassembler option: %s"), option);
} }
} }

File diff suppressed because it is too large Load diff

View file

@ -25,6 +25,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "ansidecl.h" #include "ansidecl.h"
#include "opintl.h"
#include "opcode/rl78.h" #include "opcode/rl78.h"
static int trace = 0; static int trace = 0;
@ -100,7 +101,10 @@ immediate (int bytes, int sign_extend, LocalData * ld)
i -= 0x1000000; i -= 0x1000000;
break; break;
default: default:
fprintf (stderr, "Programmer error: immediate() called with invalid byte count %d\n", bytes); opcodes_error_handler
/* xgettext:c-format */
(_("internal error: immediate() called with invalid byte count %d"),
bytes);
abort(); abort();
} }
return i; return i;

View file

@ -1,3 +1,4 @@
/* DO NOT EDIT! -*- buffer-read-only: t -*- vi:set ro: */
#line 1 "rx-decode.opc" #line 1 "rx-decode.opc"
/* -*- c -*- */ /* -*- c -*- */
/* Copyright (C) 2012-2018 Free Software Foundation, Inc. /* Copyright (C) 2012-2018 Free Software Foundation, Inc.

View file

@ -72,7 +72,8 @@ disassemble_init_s390 (struct disassemble_info *info)
else if (CONST_STRNEQ (p, "insnlength")) else if (CONST_STRNEQ (p, "insnlength"))
option_use_insn_len_bits_p = 1; option_use_insn_len_bits_p = 1;
else else
fprintf (stderr, "Unknown S/390 disassembler option: %s\n", p); /* xgettext:c-format */
opcodes_error_handler (_("unknown S/390 disassembler option: %s"), p);
p = strchr (p, ','); p = strchr (p, ',');
if (p != NULL) if (p != NULL)

View file

@ -303,10 +303,9 @@ compare_opcodes (const void * a, const void * b)
wrong with the opcode table. */ wrong with the opcode table. */
if (match0 & lose0) if (match0 & lose0)
{ {
fprintf opcodes_error_handler
(stderr, /* xgettext:c-format */
/* xgettext:c-format */ (_("internal error: bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"),
_("Internal error: bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"),
op0->name, match0, lose0); op0->name, match0, lose0);
op0->lose &= ~op0->match; op0->lose &= ~op0->match;
lose0 = op0->lose; lose0 = op0->lose;
@ -314,10 +313,9 @@ compare_opcodes (const void * a, const void * b)
if (match1 & lose1) if (match1 & lose1)
{ {
fprintf opcodes_error_handler
(stderr, /* xgettext:c-format */
/* xgettext:c-format */ (_("internal error: bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"),
_("Internal error: bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"),
op1->name, match1, lose1); op1->name, match1, lose1);
op1->lose &= ~op1->match; op1->lose &= ~op1->match;
lose1 = op1->lose; lose1 = op1->lose;
@ -374,10 +372,10 @@ compare_opcodes (const void * a, const void * b)
return i; return i;
} }
else else
fprintf (stderr, opcodes_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
_("Internal error: bad sparc-opcode.h: \"%s\" == \"%s\"\n"), (_("internal error: bad sparc-opcode.h: \"%s\" == \"%s\"\n"),
op0->name, op1->name); op0->name, op1->name);
} }
/* Fewer arguments are preferred. */ /* Fewer arguments are preferred. */

View file

@ -56,6 +56,9 @@
extern char *stpcpy (char *__dest, const char *__src); extern char *stpcpy (char *__dest, const char *__src);
#endif #endif
#define opcodes_error_handler _bfd_error_handler
extern void _bfd_error_handler (const char *, ...) ATTRIBUTE_PRINTF_1;
/* Use sigsetjmp/siglongjmp without saving the signal mask if possible. /* Use sigsetjmp/siglongjmp without saving the signal mask if possible.
It is faster than setjmp/longjmp on systems where the signal mask is It is faster than setjmp/longjmp on systems where the signal mask is
saved. */ saved. */

View file

@ -450,7 +450,8 @@ disassemble (bfd_vma memaddr,
case 0xffe00001: regs = list12_regs; break; case 0xffe00001: regs = list12_regs; break;
default: default:
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("unknown operand shift: %x\n"), operand->shift); opcodes_error_handler (_("unknown operand shift: %x"),
operand->shift);
abort (); abort ();
} }
@ -460,10 +461,17 @@ disassemble (bfd_vma memaddr,
{ {
switch (regs[ i ]) switch (regs[ i ])
{ {
default: mask |= (1 << regs[ i ]); break; default:
mask |= (1 << regs[ i ]);
break;
case 0:
/* xgettext:c-format */ /* xgettext:c-format */
case 0: fprintf (stderr, _("unknown reg: %d\n"), i ); abort (); opcodes_error_handler (_("unknown reg: %d"), i);
case -1: pc = 1; break; abort ();
break;
case -1:
pc = 1;
break;
} }
} }
} }

View file

@ -373,7 +373,9 @@ xc16x_cgen_parse_operand (CGEN_CPU_DESC cd,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while parsing.\n"), opindex); opcodes_error_handler
(_("internal error: unrecognized field %d while parsing"),
opindex);
abort (); abort ();
} }

View file

@ -3179,6 +3179,11 @@ init_tables (void)
{ {
} }
#ifndef opcodes_error_handler
#define opcodes_error_handler(...) \
fprintf (stderr, __VA_ARGS__); fputc ('\n', stderr)
#endif
static const CGEN_MACH * lookup_mach_via_bfd_name (const CGEN_MACH *, const char *); static const CGEN_MACH * lookup_mach_via_bfd_name (const CGEN_MACH *, const char *);
static void build_hw_table (CGEN_CPU_TABLE *); static void build_hw_table (CGEN_CPU_TABLE *);
static void build_ifield_table (CGEN_CPU_TABLE *); static void build_ifield_table (CGEN_CPU_TABLE *);
@ -3339,8 +3344,11 @@ xc16x_cgen_rebuild_tables (CGEN_CPU_TABLE *cd)
{ {
if (cd->insn_chunk_bitsize != 0 && cd->insn_chunk_bitsize != mach->insn_chunk_bitsize) if (cd->insn_chunk_bitsize != 0 && cd->insn_chunk_bitsize != mach->insn_chunk_bitsize)
{ {
fprintf (stderr, "xc16x_cgen_rebuild_tables: conflicting insn-chunk-bitsize values: `%d' vs. `%d'\n", opcodes_error_handler
cd->insn_chunk_bitsize, mach->insn_chunk_bitsize); (/* xgettext:c-format */
_("internal error: xc16x_cgen_rebuild_tables: "
"conflicting insn-chunk-bitsize values: `%d' vs. `%d'"),
cd->insn_chunk_bitsize, mach->insn_chunk_bitsize);
abort (); abort ();
} }
@ -3419,8 +3427,11 @@ xc16x_cgen_cpu_open (enum cgen_cpu_open_arg arg_type, ...)
endian = va_arg (ap, enum cgen_endian); endian = va_arg (ap, enum cgen_endian);
break; break;
default : default :
fprintf (stderr, "xc16x_cgen_cpu_open: unsupported argument `%d'\n", opcodes_error_handler
arg_type); (/* xgettext:c-format */
_("internal error: xc16x_cgen_cpu_open: "
"unsupported argument `%d'"),
arg_type);
abort (); /* ??? return NULL? */ abort (); /* ??? return NULL? */
} }
arg_type = va_arg (ap, enum cgen_cpu_open_arg); arg_type = va_arg (ap, enum cgen_cpu_open_arg);
@ -3435,7 +3446,9 @@ xc16x_cgen_cpu_open (enum cgen_cpu_open_arg arg_type, ...)
if (endian == CGEN_ENDIAN_UNKNOWN) if (endian == CGEN_ENDIAN_UNKNOWN)
{ {
/* ??? If target has only one, could have a default. */ /* ??? If target has only one, could have a default. */
fprintf (stderr, "xc16x_cgen_cpu_open: no endianness specified\n"); opcodes_error_handler
(/* xgettext:c-format */
_("internal error: xc16x_cgen_cpu_open: no endianness specified"));
abort (); abort ();
} }

View file

@ -417,9 +417,10 @@ xc16x_cgen_print_operand (CGEN_CPU_DESC cd,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while printing insn.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while printing insn"),
abort (); opindex);
abort ();
} }
} }

View file

@ -753,8 +753,9 @@ xc16x_cgen_insert_operand (CGEN_CPU_DESC cd,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while building insn.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while building insn"),
opindex);
abort (); abort ();
} }
@ -973,8 +974,9 @@ xc16x_cgen_extract_operand (CGEN_CPU_DESC cd,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while decoding insn.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while decoding insn"),
opindex);
abort (); abort ();
} }
@ -1194,8 +1196,9 @@ xc16x_cgen_get_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while getting int operand.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while getting int operand"),
opindex);
abort (); abort ();
} }
@ -1397,8 +1400,9 @@ xc16x_cgen_get_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while getting vma operand.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while getting vma operand"),
opindex);
abort (); abort ();
} }
@ -1601,8 +1605,9 @@ xc16x_cgen_set_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while setting int operand.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while setting int operand"),
opindex);
abort (); abort ();
} }
} }
@ -1795,8 +1800,9 @@ xc16x_cgen_set_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while setting vma operand.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while setting vma operand"),
opindex);
abort (); abort ();
} }
} }

View file

@ -273,7 +273,9 @@ xstormy16_cgen_parse_operand (CGEN_CPU_DESC cd,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while parsing.\n"), opindex); opcodes_error_handler
(_("internal error: unrecognized field %d while parsing"),
opindex);
abort (); abort ();
} }

View file

@ -1147,6 +1147,11 @@ init_tables (void)
{ {
} }
#ifndef opcodes_error_handler
#define opcodes_error_handler(...) \
fprintf (stderr, __VA_ARGS__); fputc ('\n', stderr)
#endif
static const CGEN_MACH * lookup_mach_via_bfd_name (const CGEN_MACH *, const char *); static const CGEN_MACH * lookup_mach_via_bfd_name (const CGEN_MACH *, const char *);
static void build_hw_table (CGEN_CPU_TABLE *); static void build_hw_table (CGEN_CPU_TABLE *);
static void build_ifield_table (CGEN_CPU_TABLE *); static void build_ifield_table (CGEN_CPU_TABLE *);
@ -1307,8 +1312,11 @@ xstormy16_cgen_rebuild_tables (CGEN_CPU_TABLE *cd)
{ {
if (cd->insn_chunk_bitsize != 0 && cd->insn_chunk_bitsize != mach->insn_chunk_bitsize) if (cd->insn_chunk_bitsize != 0 && cd->insn_chunk_bitsize != mach->insn_chunk_bitsize)
{ {
fprintf (stderr, "xstormy16_cgen_rebuild_tables: conflicting insn-chunk-bitsize values: `%d' vs. `%d'\n", opcodes_error_handler
cd->insn_chunk_bitsize, mach->insn_chunk_bitsize); (/* xgettext:c-format */
_("internal error: xstormy16_cgen_rebuild_tables: "
"conflicting insn-chunk-bitsize values: `%d' vs. `%d'"),
cd->insn_chunk_bitsize, mach->insn_chunk_bitsize);
abort (); abort ();
} }
@ -1387,8 +1395,11 @@ xstormy16_cgen_cpu_open (enum cgen_cpu_open_arg arg_type, ...)
endian = va_arg (ap, enum cgen_endian); endian = va_arg (ap, enum cgen_endian);
break; break;
default : default :
fprintf (stderr, "xstormy16_cgen_cpu_open: unsupported argument `%d'\n", opcodes_error_handler
arg_type); (/* xgettext:c-format */
_("internal error: xstormy16_cgen_cpu_open: "
"unsupported argument `%d'"),
arg_type);
abort (); /* ??? return NULL? */ abort (); /* ??? return NULL? */
} }
arg_type = va_arg (ap, enum cgen_cpu_open_arg); arg_type = va_arg (ap, enum cgen_cpu_open_arg);
@ -1403,7 +1414,9 @@ xstormy16_cgen_cpu_open (enum cgen_cpu_open_arg arg_type, ...)
if (endian == CGEN_ENDIAN_UNKNOWN) if (endian == CGEN_ENDIAN_UNKNOWN)
{ {
/* ??? If target has only one, could have a default. */ /* ??? If target has only one, could have a default. */
fprintf (stderr, "xstormy16_cgen_cpu_open: no endianness specified\n"); opcodes_error_handler
(/* xgettext:c-format */
_("internal error: xstormy16_cgen_cpu_open: no endianness specified"));
abort (); abort ();
} }

View file

@ -165,9 +165,10 @@ xstormy16_cgen_print_operand (CGEN_CPU_DESC cd,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while printing insn.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while printing insn"),
abort (); opindex);
abort ();
} }
} }

View file

@ -679,8 +679,9 @@ xstormy16_cgen_insert_operand (CGEN_CPU_DESC cd,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while building insn.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while building insn"),
opindex);
abort (); abort ();
} }
@ -825,8 +826,9 @@ xstormy16_cgen_extract_operand (CGEN_CPU_DESC cd,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while decoding insn.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while decoding insn"),
opindex);
abort (); abort ();
} }
@ -935,8 +937,9 @@ xstormy16_cgen_get_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while getting int operand.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while getting int operand"),
opindex);
abort (); abort ();
} }
@ -1027,8 +1030,9 @@ xstormy16_cgen_get_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while getting vma operand.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while getting vma operand"),
opindex);
abort (); abort ();
} }
@ -1126,8 +1130,9 @@ xstormy16_cgen_set_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while setting int operand.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while setting int operand"),
opindex);
abort (); abort ();
} }
} }
@ -1215,8 +1220,9 @@ xstormy16_cgen_set_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
default : default :
/* xgettext:c-format */ /* xgettext:c-format */
fprintf (stderr, _("Unrecognized field %d while setting vma operand.\n"), opcodes_error_handler
opindex); (_("internal error: unrecognized field %d while setting vma operand"),
opindex);
abort (); abort ();
} }
} }