]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
PicoJava: use is_whitespace()
authorJan Beulich <jbeulich@suse.com>
Mon, 3 Feb 2025 11:18:20 +0000 (12:18 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 3 Feb 2025 11:18:20 +0000 (12:18 +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). Also convert ISSPACE(). At the same time use
is_end_of_stmt() instead of an open-coded check in adjacent code.

gas/config/tc-pj.c

index c12437283013b680ed326cee08cb09f9839749e9..849f90565fd808f44c91e585c16028f062951c73 100644 (file)
@@ -236,13 +236,13 @@ md_assemble (char *str)
   int nlen = 0;
 
   /* Drop leading whitespace.  */
-  while (*str == ' ')
+  while (is_whitespace (*str))
     str++;
 
   /* Find the op code end.  */
   op_start = str;
   for (op_end = str;
-       *op_end && !is_end_of_line[*op_end & 0xff] && *op_end != ' ';
+       !is_end_of_stmt (*op_end) && !is_whitespace (*op_end);
        op_end++)
     nlen++;
 
@@ -301,7 +301,7 @@ md_assemble (char *str)
          pending_reloc = 0;
        }
 
-      while (ISSPACE (*op_end))
+      while (is_whitespace (*op_end))
        op_end++;
 
       if (*op_end != 0)