diff options
author | Alan Modra <amodra@gmail.com> | 2017-11-07 17:03:41 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2017-11-08 14:33:48 +1030 |
commit | 6e98b3428bdd0bf388c3c72eb205105926b15a64 (patch) | |
tree | 9e0b6e8ad90b6a3e0ec7b043e4d94ea30d39b7f3 | |
parent | b346cb961f729e2955391513a5b05eaf02b308ea (diff) | |
download | gdb-6e98b3428bdd0bf388c3c72eb205105926b15a64.zip gdb-6e98b3428bdd0bf388c3c72eb205105926b15a64.tar.gz gdb-6e98b3428bdd0bf388c3c72eb205105926b15a64.tar.bz2 |
xtensa message pluralization
* config/tc-xtensa.c (finish_vinsn): Properly pluralize error message.
-rw-r--r-- | gas/ChangeLog | 4 | ||||
-rw-r--r-- | gas/config/tc-xtensa.c | 18 |
2 files changed, 18 insertions, 4 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 80e9ea7..c13f9b1 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,7 @@ +2017-11-08 Alan Modra <amodra@gmail.com> + + * config/tc-xtensa.c (finish_vinsn): Properly pluralize error message. + 2017-11-07 Jim Wilson <jimw@sifive.com> * config/tc-riscv.c (append_insn): Call frag_wane and frag_new at diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c index a73abd0..3fe85d2 100644 --- a/gas/config/tc-xtensa.c +++ b/gas/config/tc-xtensa.c @@ -6358,10 +6358,20 @@ finish_vinsn (vliw_insn *vinsn) if (vinsn->num_slots != xtensa_format_num_slots (xtensa_default_isa, vinsn->format)) { - as_bad (_("format '%s' allows %d slots, but there are %d opcodes"), - xtensa_format_name (xtensa_default_isa, vinsn->format), - xtensa_format_num_slots (xtensa_default_isa, vinsn->format), - vinsn->num_slots); + char *msg; + int slots = xtensa_format_num_slots (xtensa_default_isa, vinsn->format); + + msg = concat (ngettext ("format '%s' allows %d slot, ", + "format '%s' allows %d slots, ", + slots), + ngettext ("but there is %d opcode", + "but there are %d opcodes", + vinsn->num_slots), + (const char *) 0); + + as_bad (msg, xtensa_format_name (xtensa_default_isa, vinsn->format), + slots, vinsn->num_slots); + free (msg); xg_clear_vinsn (vinsn); return; } |