[v2,12/65] CRx: use is_whitespace()

Message ID 7d9b70d4-3fa4-412e-b221-b5331d2d42b5@suse.com
State New
Headers
Series gas: whitespace handling |

Commit Message

Jan Beulich Jan. 27, 2025, 4:12 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-crx.c
+++ b/gas/config/tc-crx.c
@@ -721,7 +721,7 @@  set_operand (char *operand, ins * crx_in
       operandS = ++operandE;
 
       /* Set register base.  */
-      while ((*operandE != ',') && (! ISSPACE (*operandE)))
+      while ((*operandE != ',') && (! is_whitespace (*operandE)))
 	operandE++;
       *operandE++ = '\0';
       if ((cur_arg->r = get_register (operandS)) == nullregister)
@@ -729,7 +729,7 @@  set_operand (char *operand, ins * crx_in
 		operandS, ins_parse);
 
       /* Skip leading white space.  */
-      while (ISSPACE (*operandE))
+      while (is_whitespace (*operandE))
 	operandE++;
       operandS = operandE;
 
@@ -744,7 +744,7 @@  set_operand (char *operand, ins * crx_in
 		operandS, ins_parse);
 
       /* Skip leading white space.  */
-      while (ISSPACE (*operandE))
+      while (is_whitespace (*operandE))
 	operandE++;
       operandS = operandE;
 
@@ -883,7 +883,7 @@  parse_operands (ins * crx_ins, char *ope
 	  continue;
 	}
 
-      if (*operandT == ' ')
+      if (is_whitespace (*operandT))
 	as_bad (_("Illegal operands (whitespace): `%s'"), ins_parse);
 
       if (*operandT == '(')
@@ -1030,7 +1030,7 @@  get_cinv_parameters (const char *operand
 
   while (*++p != ']')
     {
-      if (*p == ',' || *p == ' ')
+      if (*p == ',' || is_whitespace (*p))
 	continue;
 
       if (*p == 'd')
@@ -1927,7 +1927,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++)
     ;
   c = *param;
   *param++ = '\0';