aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2025-02-03 11:58:49 +0100
committerJan Beulich <jbeulich@suse.com>2025-02-03 11:58:49 +0100
commit8ea323741197db6eb8f69e19dbd7127f217f918b (patch)
treefbb40cce8e09c537c259ce8f24622c08c376f774
parent8075b3eb668d1239308c5610dc34f99edc4206f3 (diff)
downloadbinutils-8ea323741197db6eb8f69e19dbd7127f217f918b.zip
binutils-8ea323741197db6eb8f69e19dbd7127f217f918b.tar.gz
binutils-8ea323741197db6eb8f69e19dbd7127f217f918b.tar.bz2
CR16: 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.
-rw-r--r--gas/config/tc-cr16.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gas/config/tc-cr16.c b/gas/config/tc-cr16.c
index 4bc6a14..751a861 100644
--- a/gas/config/tc-cr16.c
+++ b/gas/config/tc-cr16.c
@@ -1219,7 +1219,7 @@ set_operand (char *operand, ins * cr16_ins)
/* Set register pair base. */
if ((strchr (operandS,'(') != NULL))
{
- while ((*operandE != '(') && (! ISSPACE (*operandE)))
+ while ((*operandE != '(') && (! is_whitespace (*operandE)))
operandE++;
if ((cur_arg->rp = get_index_register_pair (operandE)) == nullregister)
as_bad (_("Illegal register pair `%s' in Instruction `%s'"),
@@ -1400,7 +1400,7 @@ parse_operands (ins * cr16_ins, char *operands)
continue;
}
- if (*operandT == ' ')
+ if (is_whitespace (*operandT))
as_bad (_("Illegal operands (whitespace): `%s'"), ins_parse);
if (*operandT == '(')
@@ -1545,12 +1545,13 @@ check_cinv_options (char * operand)
switch (*p)
{
case ',':
- case ' ':
case 'i':
case 'u':
case 'd':
break;
default:
+ if (is_whitespace (*p))
+ break;
as_bad (_("Illegal `cinv' parameter: `%c'"), *p);
}
}
@@ -2503,7 +2504,7 @@ md_assemble (char *op)
reset_vars (op);
/* Strip the mnemonic. */
- for (param = op; *param != 0 && !ISSPACE (*param); param++)
+ for (param = op; *param != 0 && !is_whitespace (*param); param++)
;
*param++ = '\0';