diff options
Diffstat (limited to 'cpu')
-rw-r--r-- | cpu/ChangeLog | 7 | ||||
-rw-r--r-- | cpu/frv.opc | 17 |
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) |