diff options
author | Jan Beulich <jbeulich@suse.com> | 2021-06-07 12:05:02 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2021-06-07 12:05:02 +0200 |
commit | e68c3d59acd09748a65233879033b947a9d1ad51 (patch) | |
tree | 8adbe25bd88ac510dff521a6619a90b0678805ea /gas/ChangeLog | |
parent | 014fbcda4c662c275532eb0e0e7ef57f46bd7321 (diff) | |
download | gdb-e68c3d59acd09748a65233879033b947a9d1ad51.zip gdb-e68c3d59acd09748a65233879033b947a9d1ad51.tar.gz gdb-e68c3d59acd09748a65233879033b947a9d1ad51.tar.bz2 |
x86: better respect quotes in parse_operands()
When d02603dc201f ("Allow symbol and label names to be enclosed in
double quotes") added the check for a double quote to the loop body
there, it didn't go quite far enough: Parentheses inside quotes
shouldn't be counted, and character restrictions also shouldn't apply
inside quoted regions.
In i386_att_operand(), which needs adjustment to remain in sync, besides
respecting double quotes now, also change the logic such that we don't
count parentheses anymore: Finding any opening or closing parenthesis or
any double quote means we're done, because the subsequent parsing code
wouldn't accept (extra) instances of these anyway.
Note that in parse_operands() this mimics get_symbol_name()'s
questionable behavior of treating \ specially only when ahead of ". (The
behavior is suspicious because the meaning of \\ then is ambiguous. It
is in particular impossible to have a (quoted) symbol name end in a
single \.) I would have used get_symbol_name() here, if that didn't
require fiddling with input_line_pointer.
Diffstat (limited to 'gas/ChangeLog')
-rw-r--r-- | gas/ChangeLog | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index cc6f332..f490eef 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,15 @@ 2021-06-07 Jan Beulich <jbeulich@suse.com> + * config/tc-i386.c (parse_operands): Reduce scope of + paren_not_balanced, to match the new in_quotes. Skip over quoted + regions of operands. + (i386_att_operand): Remove (mis-named) parens_balanced. Respect + double quote. + * testsuite/gas/i386/unary.s: Add more cases. + * testsuite/gas/i386/unary.d: Adjust expectations. + +2021-06-07 Jan Beulich <jbeulich@suse.com> + * config/tc-i386.c (digit_chars, is_digit_char): Delete. (md_begin): Fold digit and lower-case letter handling. (starts_memory_operand): Permit more characters. |