+2017-11-21 Alan Modra <amodra@gmail.com>
+
+ * config/tc-xtensa.c (finish_vinsn): Avoid multiple ngettext calls
+ in error message.
+
2017-11-20 Alan Modra <amodra@gmail.com>
* testsuite/gas/i386/x86-64-reg-bad.l: Accept trailing padding.
{
IStack slotstack;
int i;
+ int slots;
if (find_vinsn_conflicts (vinsn))
{
if (vinsn->format == XTENSA_UNDEFINED)
vinsn->format = xg_find_narrowest_format (vinsn);
- if (xtensa_format_num_slots (xtensa_default_isa, vinsn->format) > 1
+ slots = xtensa_format_num_slots (xtensa_default_isa, vinsn->format);
+ if (slots > 1
&& produce_flix == FLIX_NONE)
{
as_bad (_("The option \"--no-allow-flix\" prohibits multi-slot flix."));
return;
}
- if (vinsn->num_slots
- != xtensa_format_num_slots (xtensa_default_isa, vinsn->format))
+ if (vinsn->num_slots != 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),
+ as_bad (_("mismatch for format '%s': #slots = %d, #opcodes = %d"),
+ xtensa_format_name (xtensa_default_isa, vinsn->format),
slots, vinsn->num_slots);
- free (msg);
xg_clear_vinsn (vinsn);
return;
}