[v2,10/65] CR16: use is_whitespace()

Message ID 13f0a795-a8fa-45b2-932d-fd8cad2ef652@suse.com
State New
Headers
Series gas: whitespace handling |

Commit Message

Jan Beulich Jan. 27, 2025, 4:09 p.m. UTC
  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.
---
v2: New.
  

Patch

--- a/gas/config/tc-cr16.c
+++ b/gas/config/tc-cr16.c
@@ -1219,7 +1219,7 @@  set_operand (char *operand, ins * cr16_i
       /* 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 *op
 	  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';