[PATCH v2 16/65] dlx: use is_whitespace()
Jan Beulich
jbeulich@suse.com
Mon Jan 27 16:15:13 GMT 2025
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.
---
v2: New.
--- 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
mailing list