From: Jan Beulich Date: Fri, 7 Mar 2025 07:23:23 +0000 (+0100) Subject: x86: use is_end_of_stmt() X-Git-Tag: binutils-2_45~1291 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d24cd317952ecd913056a716552fecb2253b6f6;p=thirdparty%2Fbinutils-gdb.git x86: use is_end_of_stmt() ... instead of open-coding it. --- diff --git a/gas/config/tc-i386-intel.c b/gas/config/tc-i386-intel.c index 531683b4ce7..2b86f88b8bc 100644 --- a/gas/config/tc-i386-intel.c +++ b/gas/config/tc-i386-intel.c @@ -669,7 +669,7 @@ i386_intel_operand (char *operand_string, int got_a_float) ret = 0; } - if (!is_end_of_line[(unsigned char) *input_line_pointer]) + if (!is_end_of_stmt (*input_line_pointer)) { if (ret) as_bad (_("junk `%s' after expression"), input_line_pointer); diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 1d07c2f1e37..2aab0e99f01 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -3077,7 +3077,7 @@ set_intel_syntax (int syntax_flag) int ask_naked_reg = 0; SKIP_WHITESPACE (); - if (!is_end_of_line[(unsigned char) *input_line_pointer]) + if (!is_end_of_stmt (*input_line_pointer)) { char *string; int e = get_symbol_name (&string); @@ -3132,7 +3132,7 @@ set_check (int what) SKIP_WHITESPACE (); - if (!is_end_of_line[(unsigned char) *input_line_pointer]) + if (!is_end_of_stmt (*input_line_pointer)) { char *string; int e = get_symbol_name (&string); @@ -3241,7 +3241,7 @@ set_cpu_arch (int dummy ATTRIBUTE_UNUSED) SKIP_WHITESPACE (); - if (is_end_of_line[(unsigned char) *input_line_pointer]) + if (is_end_of_stmt (*input_line_pointer)) { as_bad (_("missing cpu architecture")); input_line_pointer++; @@ -3452,7 +3452,7 @@ set_cpu_arch (int dummy ATTRIBUTE_UNUSED) no_cond_jump_promotion = 0; if (restore_line_pointer (e) == ',' - && !is_end_of_line[(unsigned char) input_line_pointer[1]]) + && !is_end_of_stmt (input_line_pointer[1])) { ++input_line_pointer; e = get_symbol_name (&s); @@ -13177,7 +13177,7 @@ lex_got (enum bfd_reloc_code_real *rel, unsigned int j; for (cp = input_line_pointer; *cp != '@'; cp++) - if (is_end_of_line[(unsigned char) *cp] || *cp == ',') + if (is_end_of_stmt (*cp) || *cp == ',') return NULL; for (j = 0; j < ARRAY_SIZE (gotrel); j++) @@ -13214,7 +13214,7 @@ lex_got (enum bfd_reloc_code_real *rel, (and including) an end_of_line char or comma. */ past_reloc = cp + 1 + len; cp = past_reloc; - while (!is_end_of_line[(unsigned char) *cp] && *cp != ',') + while (!is_end_of_stmt (*cp) && *cp != ',') ++cp; second = cp + 1 - past_reloc;