diff --git a/gas/ChangeLog b/gas/ChangeLog index d741855c2e9..d125b23a098 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2018-03-08 Jan Beulich + + * config/tc-i386.c (parse_insn): Move success return up. Combine + failure returns. + 2018-03-08 Jan Beulich * config/tc-i386.c (cpu_flags_match): Add GFNI check to AVX diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 7df5d028cc9..67e806920ef 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -4487,34 +4487,26 @@ check_suffix: { supported |= cpu_flags_match (t); if (supported == CPU_FLAGS_PERFECT_MATCH) - goto skip; + { + if (!cpu_arch_flags.bitfield.cpui386 && (flag_code != CODE_16BIT)) + as_warn (_("use .code16 to ensure correct addressing mode")); + + return l; + } } if (!(supported & CPU_FLAGS_64BIT_MATCH)) - { - as_bad (flag_code == CODE_64BIT - ? _("`%s' is not supported in 64-bit mode") - : _("`%s' is only supported in 64-bit mode"), - current_templates->start->name); - return NULL; - } - if (supported != CPU_FLAGS_PERFECT_MATCH) - { - as_bad (_("`%s' is not supported on `%s%s'"), - current_templates->start->name, - cpu_arch_name ? cpu_arch_name : default_arch, - cpu_sub_arch_name ? cpu_sub_arch_name : ""); - return NULL; - } + as_bad (flag_code == CODE_64BIT + ? _("`%s' is not supported in 64-bit mode") + : _("`%s' is only supported in 64-bit mode"), + current_templates->start->name); + else + as_bad (_("`%s' is not supported on `%s%s'"), + current_templates->start->name, + cpu_arch_name ? cpu_arch_name : default_arch, + cpu_sub_arch_name ? cpu_sub_arch_name : ""); -skip: - if (!cpu_arch_flags.bitfield.cpui386 - && (flag_code != CODE_16BIT)) - { - as_warn (_("use .code16 to ensure correct addressing mode")); - } - - return l; + return NULL; } static char *