]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
dlx: use is_whitespace()
authorJan Beulich <jbeulich@suse.com>
Mon, 3 Feb 2025 10:56:25 +0000 (11:56 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 3 Feb 2025 10:56:25 +0000 (11:56 +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 open-coded checks where tabs were
already included.

gas/config/tc-dlx.c

index a3922710a8b4116bea24562a3ca725fe8a1b3918..b1ff09d77aff14787e09521bfe938a4f968269fe 100644 (file)
@@ -499,12 +499,12 @@ dlx_parse_storeop (char * str)
        pb = comma;
 
       /* Duplicate the first register.  */
-      for (i = comma + 1; (str[i] == ' ' || str[i] == '\t'); i++)
+      for (i = comma + 1; is_whitespace (str[i]); i++)
        ;
 
       for (m2 = 0; (m2 < 7 && str[i] != '\0'); i++, m2++)
        {
-         if (str[i] != ' ' && str[i] != '\t')
+         if (!is_whitespace (str[i]))
            rd[m2] = str[i];
          else
            goto badoperand_store;
@@ -672,12 +672,12 @@ machine_ip (char *str)
     case '\0':
       break;
 
-      /* FIXME-SOMEDAY more whitespace.  */
-    case ' ':
-      *s++ = '\0';
-      break;
-
     default:
+      if (is_whitespace (*s))
+       {
+         *s++ = '\0';
+         break;
+       }
       as_bad (_("Unknown opcode: `%s'"), str);
       return;
     }