[binutils-gdb] dlx: use is_whitespace()
Jan Beulich
jbeulich@sourceware.org
Mon Feb 3 10:57:55 GMT 2025
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=81675c78e246f61feb26d256ef565f2db5198db0
commit 81675c78e246f61feb26d256ef565f2db5198db0
Author: Jan Beulich <jbeulich@suse.com>
Date: Mon Feb 3 11:56:25 2025 +0100
dlx: 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 where tabs were
already included.
Diff:
---
gas/config/tc-dlx.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/gas/config/tc-dlx.c b/gas/config/tc-dlx.c
index a3922710a8b..b1ff09d77af 100644
--- a/gas/config/tc-dlx.c
+++ b/gas/config/tc-dlx.c
@@ -499,12 +499,12 @@ dlx_parse_storeop (char * str)
pb = comma;
/* Duplicate the first register. */
- for (i = comma + 1; (str[i] == ' ' || str[i] == '\t'); i++)
+ for (i = comma + 1; is_whitespace (str[i]); i++)
;
for (m2 = 0; (m2 < 7 && str[i] != '\0'); i++, m2++)
{
- if (str[i] != ' ' && str[i] != '\t')
+ if (!is_whitespace (str[i]))
rd[m2] = str[i];
else
goto badoperand_store;
@@ -672,12 +672,12 @@ machine_ip (char *str)
case '\0':
break;
- /* FIXME-SOMEDAY more whitespace. */
- case ' ':
- *s++ = '\0';
- break;
-
default:
+ if (is_whitespace (*s))
+ {
+ *s++ = '\0';
+ break;
+ }
as_bad (_("Unknown opcode: `%s'"), str);
return;
}
More information about the Binutils-cvs
mailing list