]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
CR16: use is_whitespace()
authorJan Beulich <jbeulich@suse.com>
Mon, 3 Feb 2025 10:58:49 +0000 (11:58 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 3 Feb 2025 10:58:49 +0000 (11:58 +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 switch ISSPACE() uses over.

gas/config/tc-cr16.c

index 4bc6a14187ee07c88fda7fd1251b86f8f614a80d..751a861f074fcf0ba3589e0162867b69f27f66db 100644 (file)
@@ -1219,7 +1219,7 @@ set_operand (char *operand, ins * cr16_ins)
       /* Set register pair base.  */
       if ((strchr (operandS,'(') != NULL))
        {
-         while ((*operandE != '(') && (! ISSPACE (*operandE)))
+         while ((*operandE != '(') && (! is_whitespace (*operandE)))
            operandE++;
          if ((cur_arg->rp = get_index_register_pair (operandE)) == nullregister)
            as_bad (_("Illegal register pair `%s' in Instruction `%s'"),
@@ -1400,7 +1400,7 @@ parse_operands (ins * cr16_ins, char *operands)
          continue;
        }
 
-      if (*operandT == ' ')
+      if (is_whitespace (*operandT))
        as_bad (_("Illegal operands (whitespace): `%s'"), ins_parse);
 
       if (*operandT == '(')
@@ -1545,12 +1545,13 @@ check_cinv_options (char * operand)
       switch (*p)
        {
        case ',':
-       case ' ':
        case 'i':
        case 'u':
        case 'd':
          break;
        default:
+         if (is_whitespace (*p))
+           break;
          as_bad (_("Illegal `cinv' parameter: `%c'"), *p);
        }
     }
@@ -2503,7 +2504,7 @@ md_assemble (char *op)
   reset_vars (op);
 
   /* Strip the mnemonic.  */
-  for (param = op; *param != 0 && !ISSPACE (*param); param++)
+  for (param = op; *param != 0 && !is_whitespace (*param); param++)
     ;
   *param++ = '\0';