diff options
author | Nick Clifton <nickc@redhat.com> | 2016-04-07 12:34:06 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2016-04-07 12:34:06 +0100 |
commit | e140100a5da85568e83ffe8e77d3f5e4a59ddee8 (patch) | |
tree | c9dbe69c7bf5550b708733dcb153336c940bd541 /gas/config/tc-sparc.c | |
parent | df154dc15f5385c9ec3b998788536dede9882393 (diff) | |
download | binutils-e140100a5da85568e83ffe8e77d3f5e4a59ddee8.zip binutils-e140100a5da85568e83ffe8e77d3f5e4a59ddee8.tar.gz binutils-e140100a5da85568e83ffe8e77d3f5e4a59ddee8.tar.bz2 |
Allow integer contants to have a U suffix. Improve error reporting for missing closing parentheses.
PR gas/19910
* config/tc-sparc.c (sparc_ip): Report an error if the expression
inside a %-macro could not be fully parsed.
* expr.c (integer_constant): Accept and ignore U suffixes to
integers.
(operand): When a missing closing parenthesis is encountered,
report the character that was found instead.
* testsuite/gas/mips/tls-ill.l: Update expected error message.
* testsuite/gas/sparc/pr19910-1.d: New test driver.
* testsuite/gas/sparc/pr19910-1.s: New test.
* testsuite/gas/sparc/pr19910-2.l: Expected error output.
* testsuite/gas/sparc/pr19910-2.s: New test.
* testsuite/gas/sparc/sparc.exp: Run the new tests.
Diffstat (limited to 'gas/config/tc-sparc.c')
-rw-r--r-- | gas/config/tc-sparc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gas/config/tc-sparc.c b/gas/config/tc-sparc.c index 9526583..a51ca1f 100644 --- a/gas/config/tc-sparc.c +++ b/gas/config/tc-sparc.c @@ -2626,6 +2626,11 @@ sparc_ip (char *str, const struct sparc_opcode **pinsn) *s1 = '\0'; (void) get_expression (s); *s1 = ')'; + if (expr_end != s1) + { + as_bad (_("Expression inside %%%s could not be parsed"), op_arg); + return special_case; + } s = s1 + 1; if (*s == ',' || *s == ']' || !*s) continue; |