[v2,20/65] H8/300: use is_whitespace()

Message ID e7c6e3a7-60ac-46d4-90c4-f3e0dd1da232@suse.com
State New
Headers
Series gas: whitespace handling |

Commit Message

Jan Beulich Jan. 27, 2025, 4:20 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). 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-h8300.c
+++ b/gas/config/tc-h8300.c
@@ -1904,12 +1904,12 @@  md_assemble (char *str)
   int size, i;
 
   /* Drop leading whitespace.  */
-  while (*str == ' ')
+  while (is_whitespace (*str))
     str++;
 
   /* Find the op code end.  */
   for (op_start = op_end = str;
-       *op_end != 0 && *op_end != ' ';
+       !is_end_of_stmt (*op_end) && !is_whitespace (*op_end);
        op_end++)
     {
       if (*op_end == '.')