Fix the MSP430 assembler so that it detects and reports extraneous text at the end...
authorNick Clifton <nickc@redhat.com>
Thu, 5 Oct 2017 15:17:22 +0000 (16:17 +0100)
committerNick Clifton <nickc@redhat.com>
Thu, 5 Oct 2017 15:17:22 +0000 (16:17 +0100)
commit2bfa0cdfadd313f3cc35329a17ba3c62865208a3
treed6fc935991b31ebd04dc78a00fc44b870d681d69
parent97953bab05cca82bd3119de4d5cf26103b649597
Fix the MSP430 assembler so that it detects and reports extraneous text at the end of operands.

PR 22133
* config/tc-msp430.c (parse_exp): Skip an 'h' suffix to constant
expressions.
(msp430_srcoperand): Check that the entire text was parsed by
parse_exp.
(msp430_operands): Likewise.
* testsuite/gas/msp430/pr22133.s: New test file.
* testsuite/gas/msp430/pr22133.d: New test driver.
* testsuite/gas/msp430/pr22133.s: Expected error output.
* testsuite/gas/msp430/msp430.exp: Run the new test.
gas/ChangeLog
gas/config/tc-msp430.c
gas/testsuite/gas/msp430/msp430.exp
gas/testsuite/gas/msp430/pr22133.d [new file with mode: 0644]
gas/testsuite/gas/msp430/pr22133.l [new file with mode: 0644]
gas/testsuite/gas/msp430/pr22133.s [new file with mode: 0644]