Fix segfault processing nios2 pseudo-instructions with too few arguments.
authorSandra Loosemore <sandra@codesourcery.com>
Tue, 17 Oct 2017 03:45:55 +0000 (20:45 -0700)
committerSandra Loosemore <sandra@codesourcery.com>
Tue, 17 Oct 2017 03:45:55 +0000 (20:45 -0700)
commit487958d1e995ab05420f9a8468535b4399602a3f
tree27fa5129ee50a721b15ab890efa28271ec00f262
parentc191a6875b118fce30e7dc4d9e4bd20eff850270
Fix segfault processing nios2 pseudo-instructions with too few arguments.

2017-10-16  Sandra Loosemore  <sandra@codesourcery.com>
    Henry Wong  <henry@stuffedcow.net>

gas/
* config/tc-nios2.c (nios2_translate_pseudo_insn): Check for
correct number of arguments.
(md_assemble): Handle failure of nios2_translate_pseudo_insn.
* testsuite/gas/nios2/illegal_pseudoinst.l: New file.
* testsuite/gas/nios2/illegal_pseudoinst.s: New file.
* testsuite/gas/nios2/nios2.exp: Add illegal_pseudoinst test.
gas/ChangeLog
gas/config/tc-nios2.c
gas/testsuite/gas/nios2/illegal_pseudoinst.l [new file with mode: 0644]
gas/testsuite/gas/nios2/illegal_pseudoinst.s [new file with mode: 0644]
gas/testsuite/gas/nios2/nios2.exp