From: Jan Beulich Date: Mon, 3 Feb 2025 11:29:29 +0000 (+0100) Subject: Z80: use is_whitespace() X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=716680bc55e22dbf01a78cce903e7bb262a1aa7e;p=thirdparty%2Fbinutils-gdb.git Z80: use is_whitespace() Replace an open-coded check and convert ISSPACE() uses. --- diff --git a/gas/config/tc-z80.c b/gas/config/tc-z80.c index 3805e32b15a..3abc0268699 100644 --- a/gas/config/tc-z80.c +++ b/gas/config/tc-z80.c @@ -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)) {