diff options
author | Alan Modra <amodra@gmail.com> | 2017-11-21 10:25:18 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2017-11-21 11:20:24 +1030 |
commit | bf3d139947aa7f846b463db4a7c4b6059a183e11 (patch) | |
tree | b7a46c81db25880eb80ffed868400e3d36687209 /gas | |
parent | e6b2f5efa97c7f3de8a3947c6782c40ec6172686 (diff) | |
download | gdb-bf3d139947aa7f846b463db4a7c4b6059a183e11.zip gdb-bf3d139947aa7f846b463db4a7c4b6059a183e11.tar.gz gdb-bf3d139947aa7f846b463db4a7c4b6059a183e11.tar.bz2 |
xtensa error message
* config/tc-xtensa.c (finish_vinsn): Avoid multiple ngettext calls
in error message.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 5 | ||||
-rw-r--r-- | gas/config/tc-xtensa.c | 22 |
2 files changed, 11 insertions, 16 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 08553c2..24be569 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +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. diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c index 3fe85d2..a48ce1e 100644 --- a/gas/config/tc-xtensa.c +++ b/gas/config/tc-xtensa.c @@ -6323,6 +6323,7 @@ finish_vinsn (vliw_insn *vinsn) { IStack slotstack; int i; + int slots; if (find_vinsn_conflicts (vinsn)) { @@ -6334,7 +6335,8 @@ finish_vinsn (vliw_insn *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.")); @@ -6355,23 +6357,11 @@ finish_vinsn (vliw_insn *vinsn) 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; } |