Z8k: 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 an open-coded check in adjacent code.
diff --git a/gas/config/tc-z8k.c b/gas/config/tc-z8k.c index 75fbabb0..d73df4f 100644 --- a/gas/config/tc-z8k.c +++ b/gas/config/tc-z8k.c
@@ -429,7 +429,7 @@ char *src = *ptr; int i, l; - while (*src == ' ') + while (is_whitespace (*src)) src++; mode->mode = CLASS_CTRL; @@ -472,7 +472,7 @@ int i; int j; - while (*src == ' ') + while (is_whitespace (*src)) src++; mode->mode = CLASS_FLAGS; @@ -517,7 +517,7 @@ char *src = *ptr; int i, l; - while (*src == ' ') + while (is_whitespace (*src)) src++; mode->mode = CLASS_IMM; @@ -607,7 +607,7 @@ char *src = *ptr; int i, l; - while (*src == ' ') + while (is_whitespace (*src)) src++; mode->mode = CLASS_CC; @@ -634,7 +634,7 @@ mode->mode = 0; - while (*src == ' ') + while (is_whitespace (*src)) src++; if (*src == '#') { @@ -737,7 +737,7 @@ case 0: operand[0].mode = 0; operand[1].mode = 0; - while (*ptr == ' ') + while (is_whitespace (*ptr)) ptr++; break; @@ -745,7 +745,7 @@ if (opcode->arg_info[0] == CLASS_CC) { get_cc_operand (&ptr, operand + 0, 0); - while (*ptr == ' ') + while (is_whitespace (*ptr)) ptr++; if (*ptr && ! is_end_of_line[(unsigned char) *ptr]) { @@ -757,7 +757,7 @@ else if (opcode->arg_info[0] == CLASS_FLAGS) { get_flags_operand (&ptr, operand + 0, 0); - while (*ptr == ' ') + while (is_whitespace (*ptr)) ptr++; if (*ptr && ! is_end_of_line[(unsigned char) *ptr]) { @@ -779,7 +779,7 @@ if (opcode->arg_info[0] == CLASS_CC) { get_cc_operand (&ptr, operand + 0, 0); - while (*ptr == ' ') + while (is_whitespace (*ptr)) ptr++; if (*ptr != ',' && strchr (ptr + 1, ',')) { @@ -1219,12 +1219,12 @@ opcode_entry_type *opcode; /* Drop leading whitespace. */ - while (*str == ' ') + while (is_whitespace (*str)) str++; /* Find the op code end. */ for (op_start = op_end = str; - *op_end != 0 && *op_end != ' ' && ! is_end_of_line[(unsigned char) *op_end]; + ! is_whitespace (*op_end) && ! is_end_of_stmt (*op_end); op_end++) ; @@ -1258,7 +1258,7 @@ oc = *old; *old = '\n'; - while (*input_line_pointer == ' ') + while (is_whitespace (*input_line_pointer)) input_line_pointer++; p = (pseudo_typeS *) (opcode->func);