aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2016-04-07 12:34:06 +0100
committerNick Clifton <nickc@redhat.com>2016-04-07 12:34:06 +0100
commite140100a5da85568e83ffe8e77d3f5e4a59ddee8 (patch)
treec9dbe69c7bf5550b708733dcb153336c940bd541 /gas/config
parentdf154dc15f5385c9ec3b998788536dede9882393 (diff)
downloadgdb-e140100a5da85568e83ffe8e77d3f5e4a59ddee8.zip
gdb-e140100a5da85568e83ffe8e77d3f5e4a59ddee8.tar.gz
gdb-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')
-rw-r--r--gas/config/tc-sparc.c5
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;