mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-24 04:00:07 +08:00
x86: simplify result processing of cpu_flags_match()
Make more obvious what the success and failure paths are, and in particular that what used to be at the "skip" label can't be reached by what used to be straight line code.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2018-03-08 Jan Beulich <jbeulich@suse.com>
|
||||||
|
|
||||||
|
* config/tc-i386.c (parse_insn): Move success return up. Combine
|
||||||
|
failure returns.
|
||||||
|
|
||||||
2018-03-08 Jan Beulich <jbeulich@suse.com>
|
2018-03-08 Jan Beulich <jbeulich@suse.com>
|
||||||
|
|
||||||
* config/tc-i386.c (cpu_flags_match): Add GFNI check to AVX
|
* config/tc-i386.c (cpu_flags_match): Add GFNI check to AVX
|
||||||
|
@ -4487,36 +4487,28 @@ check_suffix:
|
|||||||
{
|
{
|
||||||
supported |= cpu_flags_match (t);
|
supported |= cpu_flags_match (t);
|
||||||
if (supported == CPU_FLAGS_PERFECT_MATCH)
|
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))
|
if (!(supported & CPU_FLAGS_64BIT_MATCH))
|
||||||
{
|
|
||||||
as_bad (flag_code == CODE_64BIT
|
as_bad (flag_code == CODE_64BIT
|
||||||
? _("`%s' is not supported in 64-bit mode")
|
? _("`%s' is not supported in 64-bit mode")
|
||||||
: _("`%s' is only supported in 64-bit mode"),
|
: _("`%s' is only supported in 64-bit mode"),
|
||||||
current_templates->start->name);
|
current_templates->start->name);
|
||||||
return NULL;
|
else
|
||||||
}
|
|
||||||
if (supported != CPU_FLAGS_PERFECT_MATCH)
|
|
||||||
{
|
|
||||||
as_bad (_("`%s' is not supported on `%s%s'"),
|
as_bad (_("`%s' is not supported on `%s%s'"),
|
||||||
current_templates->start->name,
|
current_templates->start->name,
|
||||||
cpu_arch_name ? cpu_arch_name : default_arch,
|
cpu_arch_name ? cpu_arch_name : default_arch,
|
||||||
cpu_sub_arch_name ? cpu_sub_arch_name : "");
|
cpu_sub_arch_name ? cpu_sub_arch_name : "");
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
skip:
|
|
||||||
if (!cpu_arch_flags.bitfield.cpui386
|
|
||||||
&& (flag_code != CODE_16BIT))
|
|
||||||
{
|
|
||||||
as_warn (_("use .code16 to ensure correct addressing mode"));
|
|
||||||
}
|
|
||||||
|
|
||||||
return l;
|
|
||||||
}
|
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
parse_operands (char *l, const char *mnemonic)
|
parse_operands (char *l, const char *mnemonic)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user