MIPS16/GAS: Fix forced size suffixes with argumentless instructions
authorMaciej W. Rozycki <macro@imgtec.com>
Fri, 23 Dec 2016 12:38:35 +0000 (12:38 +0000)
committerMaciej W. Rozycki <macro@imgtec.com>
Fri, 23 Dec 2016 19:28:23 +0000 (19:28 +0000)
commit3fb49709438e204177373646585a76116caf23fb
tree1988549ca34f15eb4248d8d19e47b0c80088e006
parent645c455650ed35460afdacb078c7c58308607fbe
MIPS16/GAS: Fix forced size suffixes with argumentless instructions

Correct the handling of `.e' and `.t' instruction size suffixes with
instruction mnemonics which are not followed by any text on the same
line, such as arguments or white space, e.g.:

$ cat test.s
.set mips16
foo:
entry.t # comment
entry.t
exit.t # comment
exit.t
nop.t # comment
nop.t
$ as -32 -o test.o test.s
test.s: Assembler messages:
test.s:4: Error: unrecognized opcode `entry.t'
test.s:6: Error: unrecognized opcode `exit.t'
test.s:8: Error: unrecognized opcode `nop.t'
$

gas/
* config/tc-mips.c (mips16_ip): Handle `.e' and `.t' instruction
suffixes followed by a null character rather than a space too.
* testsuite/gas/mips/mips16-insn-length-noargs.d: New test.
* testsuite/gas/mips/mips16-insn-length-noargs.s: New test
source.
* testsuite/gas/mips/mips.exp: Run the new test.
gas/ChangeLog
gas/config/tc-mips.c
gas/testsuite/gas/mips/mips.exp
gas/testsuite/gas/mips/mips16-insn-length-noargs.d [new file with mode: 0644]
gas/testsuite/gas/mips/mips16-insn-length-noargs.s [new file with mode: 0644]