]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
H8/300: use is_whitespace()
authorJan Beulich <jbeulich@suse.com>
Mon, 3 Feb 2025 11:02:38 +0000 (12:02 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 3 Feb 2025 11:02:38 +0000 (12:02 +0100)
Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input). At the same time use is_end_of_stmt() instead of an
open-coded check in adjacent code.

gas/config/tc-h8300.c

index 105461da92bf82a15e0e18c076a959cff6eead9d..eeee4c845dbecf28929d92c7c23806b518da9f63 100644 (file)
@@ -1904,12 +1904,12 @@ md_assemble (char *str)
   int size, i;
 
   /* Drop leading whitespace.  */
-  while (*str == ' ')
+  while (is_whitespace (*str))
     str++;
 
   /* Find the op code end.  */
   for (op_start = op_end = str;
-       *op_end != 0 && *op_end != ' ';
+       !is_end_of_stmt (*op_end) && !is_whitespace (*op_end);
        op_end++)
     {
       if (*op_end == '.')