[binutils-gdb] MicroBlaze: use is_whitespace()

Jan Beulich jbeulich@sourceware.org
Mon Feb 3 11:09:05 GMT 2025


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=49bf8777038702dd45d9080c5d63bf04bc5328fe

commit 49bf8777038702dd45d9080c5d63bf04bc5328fe
Author: Jan Beulich <jbeulich@suse.com>
Date:   Mon Feb 3 12:07:09 2025 +0100

    MicroBlaze: use is_whitespace()
    
    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.

Diff:
---
 gas/config/tc-microblaze.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/gas/config/tc-microblaze.c b/gas/config/tc-microblaze.c
index 5774eeaefb8..7e1b1671ab1 100644
--- 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.  */


More information about the Binutils-cvs mailing list