From: Jan Beulich Date: Mon, 3 Feb 2025 11:02:09 +0000 (+0100) Subject: ft32: use is_whitespace() X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6cbfc6bf2356bc34db6aaa2aeda6356f4d9ca6b6;p=thirdparty%2Fbinutils-gdb.git ft32: 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 switch ISSPACE() uses over. At the same time use is_end_of_stmt() instead of open-coded checks in adjacent code. --- diff --git a/gas/config/tc-ft32.c b/gas/config/tc-ft32.c index 4c177e0b2c6..50958d5052f 100644 --- a/gas/config/tc-ft32.c +++ b/gas/config/tc-ft32.c @@ -212,15 +212,14 @@ md_assemble (char *str) bool can_sc; /* 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 != '.'; op_end++) nlen++; @@ -273,7 +272,7 @@ md_assemble (char *str) b |= dw << FT32_FLD_DW_BIT; } - while (ISSPACE (*op_end)) + while (is_whitespace (*op_end)) op_end++; output = frag_more (4); @@ -392,7 +391,7 @@ md_assemble (char *str) if (f) { - while (ISSPACE (*op_end)) + while (is_whitespace (*op_end)) op_end++; if (*op_end != ',') @@ -402,13 +401,13 @@ md_assemble (char *str) } op_end++; - while (ISSPACE (*op_end)) + while (is_whitespace (*op_end)) op_end++; } } } - if (*op_end != 0) + if (!is_end_of_stmt (*op_end)) as_warn (_("extra stuff on line ignored")); can_sc = ft32_shortcode (b, &sc); @@ -434,10 +433,10 @@ md_assemble (char *str) dwarf2_emit_insn (4); - while (ISSPACE (*op_end)) + while (is_whitespace (*op_end)) op_end++; - if (*op_end != 0) + if (!is_end_of_stmt (*op_end)) as_warn ("extra stuff on line ignored"); if (pending_reloc)