From: Jan Beulich Date: Mon, 3 Feb 2025 10:58:49 +0000 (+0100) Subject: CR16: use is_whitespace() X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8ea323741197db6eb8f69e19dbd7127f217f918b;p=thirdparty%2Fbinutils-gdb.git 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. --- diff --git a/gas/config/tc-cr16.c b/gas/config/tc-cr16.c index 4bc6a14187e..751a861f074 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';