diff options
author | Jan Beulich <jbeulich@suse.com> | 2025-02-03 12:14:56 +0100 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2025-02-03 12:14:56 +0100 |
commit | 61c81ade8b40e8d0f525c14c7cefa4f5f315ce26 (patch) | |
tree | 83630e74a9c77c40f04fbeeb83288ed0587f3d83 | |
parent | 112cf77b1855f60a638543e06f6ce045d4231037 (diff) | |
download | binutils-61c81ade8b40e8d0f525c14c7cefa4f5f315ce26.zip binutils-61c81ade8b40e8d0f525c14c7cefa4f5f315ce26.tar.gz binutils-61c81ade8b40e8d0f525c14c7cefa4f5f315ce26.tar.bz2 |
mn10200: 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 convert open-coded checks as well as ISSPACE()
uses. At the same time use is_end_of_stmt() instead of kind-of-open-
coded checks in adjacent code.
-rw-r--r-- | gas/config/tc-mn10200.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gas/config/tc-mn10200.c b/gas/config/tc-mn10200.c index d630929..657f591 100644 --- a/gas/config/tc-mn10200.c +++ b/gas/config/tc-mn10200.c @@ -878,7 +878,7 @@ md_assemble (char *str) int match; /* Get the opcode. */ - for (s = str; *s != '\0' && !ISSPACE (*s); s++) + for (s = str; !is_end_of_stmt (*s) && !is_whitespace (*s); s++) ; if (*s != '\0') *s++ = '\0'; @@ -892,7 +892,7 @@ md_assemble (char *str) } str = s; - while (ISSPACE (*str)) + while (is_whitespace (*str)) ++str; input_line_pointer = str; @@ -929,7 +929,7 @@ md_assemble (char *str) errmsg = NULL; - while (*str == ' ' || *str == ',') + while (is_whitespace (*str) || *str == ',') ++str; if (operand->flags & MN10200_OPERAND_RELAX) @@ -1102,7 +1102,7 @@ md_assemble (char *str) str = input_line_pointer; input_line_pointer = hold; - while (*str == ' ' || *str == ',') + while (is_whitespace (*str) || *str == ',') ++str; } @@ -1127,10 +1127,10 @@ md_assemble (char *str) break; } - while (ISSPACE (*str)) + while (is_whitespace (*str)) ++str; - if (*str != '\0') + if (!is_end_of_stmt (*str)) as_bad (_("junk at end of line: `%s'"), str); input_line_pointer = str; |