aboutsummaryrefslogtreecommitdiff
path: root/cpu
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2018-03-02 08:23:50 +1030
committerAlan Modra <amodra@gmail.com>2018-03-03 11:34:26 +1030
commita6743a5420aa02a0550b0f7be004f6c06e90ce21 (patch)
treec77d94209c8c3079ae8a19916bb82aad775b5941 /cpu
parent5c1f594e585818719d5c19346e73a1cca3bbce2b (diff)
downloadgdb-a6743a5420aa02a0550b0f7be004f6c06e90ce21.zip
gdb-a6743a5420aa02a0550b0f7be004f6c06e90ce21.tar.gz
gdb-a6743a5420aa02a0550b0f7be004f6c06e90ce21.tar.bz2
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.
Diffstat (limited to 'cpu')
-rw-r--r--cpu/ChangeLog7
-rw-r--r--cpu/frv.opc17
2 files changed, 16 insertions, 8 deletions
diff --git a/cpu/ChangeLog b/cpu/ChangeLog
index 74156f8..5581d87 100644
--- a/cpu/ChangeLog
+++ b/cpu/ChangeLog
@@ -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>
2.30 branch created.
diff --git a/cpu/frv.opc b/cpu/frv.opc
index 869155d..1b0b05c 100644
--- a/cpu/frv.opc
+++ b/cpu/frv.opc
@@ -78,6 +78,7 @@ int spr_valid (long);
/* -- */
/* -- opc.c */
+#include "opintl.h"
#include "elf/frv.h"
#include <stdio.h>
@@ -500,9 +501,9 @@ add_next_to_vliw (FRV_VLIW *vliw, CGEN_ATTR_VALUE_ENUM_TYPE unit)
if (next <= 0)
{
- fprintf (stderr, "frv-opc.c line %d: bad vliw->next_slot value.\n",
- __LINE__);
- abort (); /* Should never happen. */
+ /* xgettext:c-format */
+ opcodes_error_handler (_("internal error: bad vliw->next_slot value"));
+ abort ();
}
/* 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_7);
default:
- fprintf (stderr, "frv-opc.c, line %d: bad major code, aborting.\n",
- __LINE__);
+ /* xgettext:c-format */
+ opcodes_error_handler (_("internal error: bad major code"));
abort ();
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);
if (unit == UNIT_NIL)
{
- fprintf (stderr, "frv-opc.c line %d: bad insn unit.\n",
- __LINE__);
- abort (); /* No UNIT specified for this insn in frv.cpu. */
+ /* xgettext:c-format */
+ opcodes_error_handler (_("internal error: bad insn unit"));
+ abort ();
}
switch (vliw->mach)