[PATCH 32/34] Z8k: use is_end_of_stmt()
Alan Modra
amodra@gmail.com
Wed Feb 19 23:32:09 GMT 2025
On Wed, Feb 19, 2025 at 04:40:13PM +0100, Jan Beulich wrote:
> ... instead of open-coding it.
These all can lose the *ptr (or **ptr) check.
> --- a/gas/config/tc-z8k.c
> +++ b/gas/config/tc-z8k.c
> @@ -536,7 +536,7 @@ get_interrupt_operand (char **ptr, struc
> *ptr = src + l;
> invalid:
> as_bad (_("unknown interrupt %s"), src);
> - while (**ptr && ! is_end_of_line[(unsigned char) **ptr])
> + while (**ptr && ! is_end_of_stmt (**ptr))
> (*ptr)++; /* Consume rest of line. */
> return;
> }
> @@ -747,10 +747,10 @@ get_operands (const opcode_entry_type *o
> get_cc_operand (&ptr, operand + 0, 0);
> while (is_whitespace (*ptr))
> ptr++;
> - if (*ptr && ! is_end_of_line[(unsigned char) *ptr])
> + if (*ptr && ! is_end_of_stmt (*ptr))
> {
> as_bad (_("invalid condition code '%s'"), ptr);
> - while (*ptr && ! is_end_of_line[(unsigned char) *ptr])
> + while (*ptr && ! is_end_of_stmt (*ptr))
> ptr++; /* Consume rest of line. */
> }
> }
> @@ -759,10 +759,10 @@ get_operands (const opcode_entry_type *o
> get_flags_operand (&ptr, operand + 0, 0);
> while (is_whitespace (*ptr))
> ptr++;
> - if (*ptr && ! is_end_of_line[(unsigned char) *ptr])
> + if (*ptr && ! is_end_of_stmt (*ptr))
> {
> as_bad (_("invalid flag '%s'"), ptr);
> - while (*ptr && ! is_end_of_line[(unsigned char) *ptr])
> + while (*ptr && ! is_end_of_stmt (*ptr))
> ptr++; /* Consume rest of line. */
> }
> }
--
Alan Modra
More information about the Binutils
mailing list