[v2,40/65] PicoJava: use is_whitespace()

Message ID 6c1207ae-73d3-47ff-9793-178830b58654@suse.com
State New
Headers
Series gas: whitespace handling |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_binutils_build--master-arm success Build passed
linaro-tcwg-bot/tcwg_binutils_check--master-arm success Test passed
linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 fail Patch failed to apply

Commit Message

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

Patch

--- a/gas/config/tc-pj.c
+++ b/gas/config/tc-pj.c
@@ -236,13 +236,13 @@  md_assemble (char *str)
   int nlen = 0;
 
   /* Drop leading whitespace.  */
-  while (*str == ' ')
+  while (is_whitespace (*str))
     str++;
 
   /* Find the op code end.  */
   op_start = str;
   for (op_end = str;
-       *op_end && !is_end_of_line[*op_end & 0xff] && *op_end != ' ';
+       !is_end_of_stmt (*op_end) && !is_whitespace (*op_end);
        op_end++)
     nlen++;
 
@@ -301,7 +301,7 @@  md_assemble (char *str)
 	  pending_reloc = 0;
 	}
 
-      while (ISSPACE (*op_end))
+      while (is_whitespace (*op_end))
 	op_end++;
 
       if (*op_end != 0)