aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2025-02-03 12:25:01 +0100
committerJan Beulich <jbeulich@suse.com>2025-02-03 12:25:01 +0100
commit87f56f9149d4b1a78153f9f2fe381de39a12557e (patch)
tree364742a8188957c33f13b30e1a1d2b69db27f8ef
parent429b58ab66c3e09a234eeebeb78a3dfb7ef70205 (diff)
downloadbinutils-87f56f9149d4b1a78153f9f2fe381de39a12557e.zip
binutils-87f56f9149d4b1a78153f9f2fe381de39a12557e.tar.gz
binutils-87f56f9149d4b1a78153f9f2fe381de39a12557e.tar.bz2
C4x: 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). 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-tic4x.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gas/config/tc-tic4x.c b/gas/config/tc-tic4x.c
index c8afd16..d7d31ab 100644
--- a/gas/config/tc-tic4x.c
+++ b/gas/config/tc-tic4x.c
@@ -1472,7 +1472,7 @@ tic4x_indirect_parse (tic4x_operand_t *operand,
s++;
}
}
- if (*s != ' ' && *s != ',' && *s != '\0')
+ if (!is_whitespace (*s) && *s != ',' && !is_end_of_stmt (*s))
return 0;
input_line_pointer = s;
return 1;
@@ -2428,7 +2428,7 @@ md_assemble (char *str)
/* Find mnemonic (second part of parallel instruction). */
s = str;
/* Skip past instruction mnemonic. */
- while (*s && *s != ' ')
+ while (!is_end_of_stmt (*s) && !is_whitespace (*s))
s++;
if (*s) /* Null terminate for str_hash_find. */
*s++ = '\0'; /* and skip past null. */
@@ -2492,7 +2492,7 @@ md_assemble (char *str)
{
/* Find mnemonic. */
s = str;
- while (*s && *s != ' ') /* Skip past instruction mnemonic. */
+ while (!is_end_of_stmt (*s) && !is_whitespace (*s)) /* Skip past instruction mnemonic. */
s++;
if (*s) /* Null terminate for str_hash_find. */
*s++ = '\0'; /* and skip past null. */