[v2,30/65] MicroBlaze: use is_whitespace()

Message ID 9f2d724e-6dc3-4c32-ab1d-d8a1b1f7ba12@suse.com
State New
Headers
Series gas: whitespace handling |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_binutils_build--master-arm fail Patch failed to apply
linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 fail Patch failed to apply

Commit Message

Jan Beulich Jan. 27, 2025, 4:26 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 convert ISSPACE() uses. At the same time use
is_end_of_stmt() instead of an open-coded check in adjacent code.
---
v2: New.
  

Comments

Michael Eager Jan. 29, 2025, 11:56 p.m. UTC | #1
On 1/27/25 8:26 AM, Jan Beulich wrote:
> 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() uses. At the same time use
> is_end_of_stmt() instead of an open-coded check in adjacent code.
> ---
> v2: New.

Looks OK.
  

Patch

--- a/gas/config/tc-microblaze.c
+++ b/gas/config/tc-microblaze.c
@@ -400,7 +400,7 @@  parse_reg (char * s, unsigned * reg)
   unsigned tmpreg = 0;
 
   /* Strip leading whitespace.  */
-  while (ISSPACE (* s))
+  while (is_whitespace (* s))
     ++ s;
 
   if (strncasecmp (s, "rpc", 3) == 0)
@@ -573,7 +573,7 @@  parse_exp (char *s, expressionS *e)
   char *new_pointer;
 
   /* Skip whitespace.  */
-  while (ISSPACE (* s))
+  while (is_whitespace (* s))
     ++ s;
 
   save = input_line_pointer;
@@ -892,12 +892,12 @@  md_assemble (char * str)
   char name[20];
 
   /* Drop leading whitespace.  */
-  while (ISSPACE (* str))
+  while (is_whitespace (* str))
     str ++;
 
   /* Find the op code end.  */
   for (op_start = op_end = str;
-       *op_end && !is_end_of_line[(unsigned char) *op_end] && *op_end != ' ';
+       !is_end_of_stmt (*op_end) && !is_whitespace (*op_end);
        op_end++)
     {
       name[nlen] = op_start[nlen];
@@ -1808,7 +1808,7 @@  md_assemble (char * str)
     }
 
   /* Drop whitespace after all the operands have been parsed.  */
-  while (ISSPACE (* op_end))
+  while (is_whitespace (* op_end))
     op_end ++;
 
   /* Give warning message if the insn has more operands than required.  */