aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2025-02-03 12:02:09 +0100
committerJan Beulich <jbeulich@suse.com>2025-02-03 12:02:09 +0100
commit6cbfc6bf2356bc34db6aaa2aeda6356f4d9ca6b6 (patch)
tree7f39586d141c757cf4abc43d0b7ce7e6ad81b20d
parent21c901a95d0e97ac5064f6a5ece039ebc7087e43 (diff)
downloadbinutils-6cbfc6bf2356bc34db6aaa2aeda6356f4d9ca6b6.zip
binutils-6cbfc6bf2356bc34db6aaa2aeda6356f4d9ca6b6.tar.gz
binutils-6cbfc6bf2356bc34db6aaa2aeda6356f4d9ca6b6.tar.bz2
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.
-rw-r--r--gas/config/tc-ft32.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/gas/config/tc-ft32.c b/gas/config/tc-ft32.c
index 4c177e0..50958d5 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)