aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-xtensa.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2017-11-07 17:03:41 +1030
committerAlan Modra <amodra@gmail.com>2017-11-08 14:33:48 +1030
commit6e98b3428bdd0bf388c3c72eb205105926b15a64 (patch)
tree9e0b6e8ad90b6a3e0ec7b043e4d94ea30d39b7f3 /gas/config/tc-xtensa.c
parentb346cb961f729e2955391513a5b05eaf02b308ea (diff)
downloadgdb-6e98b3428bdd0bf388c3c72eb205105926b15a64.zip
gdb-6e98b3428bdd0bf388c3c72eb205105926b15a64.tar.gz
gdb-6e98b3428bdd0bf388c3c72eb205105926b15a64.tar.bz2
xtensa message pluralization
* config/tc-xtensa.c (finish_vinsn): Properly pluralize error message.
Diffstat (limited to 'gas/config/tc-xtensa.c')
-rw-r--r--gas/config/tc-xtensa.c18
1 files changed, 14 insertions, 4 deletions
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;
}