]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Z80: use is_whitespace()
authorJan Beulich <jbeulich@suse.com>
Mon, 3 Feb 2025 11:29:29 +0000 (12:29 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 3 Feb 2025 11:29:29 +0000 (12:29 +0100)
Replace an open-coded check and convert ISSPACE() uses.

gas/config/tc-z80.c

index 3805e32b15ad44fb40d055313eb9d280fdeed38d..3abc0268699593ac01ac060e82fbf18a4d4986a9 100644 (file)
@@ -582,7 +582,7 @@ z80_elf_final_processing (void)
 static const char *
 skip_space (const char *s)
 {
-  while (*s == ' ' || *s == '\t')
+  while (is_whitespace (*s))
     ++s;
   return s;
 }
@@ -623,7 +623,7 @@ z80_start_line_hook (void)
        case '#': /* force to use next expression as immediate value in SDCC */
          if (!sdcc_compat)
           break;
-         if (ISSPACE(p[1]) && *skip_space (p + 1) == '(')
+         if (is_whitespace (p[1]) && *skip_space (p + 1) == '(')
            { /* ld a,# (expr)... -> ld a,0+(expr)... */
              *p++ = '0';
              *p = '+';
@@ -3384,7 +3384,7 @@ assemble_suffix (const char **suffix)
 
   for (i = 0; (i < 3) && (ISALPHA (*p)); i++)
     sbuf[i] = TOLOWER (*p++);
-  if (*p && !ISSPACE (*p))
+  if (*p && !is_whitespace (*p))
     return 0;
   *suffix = p;
   sbuf[i] = 0;
@@ -3670,7 +3670,7 @@ md_assemble (char *str)
   else
     {
       dwarf2_emit_insn (0);
-      if ((*p) && (!ISSPACE (*p)))
+      if ((*p) && !is_whitespace (*p))
         {
           if (*p != '.' || !(ins_ok & INS_EZ80) || !assemble_suffix (&p))
             {