mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-24 20:28:28 +08:00
Since the word to byte register conversion isn't active for x86-64
anyway, there's also no need to issue a separate, inconsistent diagnostic in some of the cases - non-matching operands will be complained about anyway. 2012-07-31 Jan Beulich <jbeulich@suse.com> * config/tc-i386.c (check_byte_reg): Check for I/O port register earlier, and just once. Drop diagnostic that got issued only for some registers.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
2012-07-31 Jan Beulich <jbeulich@suse.com>
|
||||||
|
|
||||||
|
* config/tc-i386.c (check_byte_reg): Check for I/O port
|
||||||
|
register earlier, and just once. Drop diagnostic that got
|
||||||
|
issued only for some registers.
|
||||||
|
|
||||||
2012-07-31 Jan Beulich <jbeulich@suse.com>
|
2012-07-31 Jan Beulich <jbeulich@suse.com>
|
||||||
|
|
||||||
* config/tc-i386.c (match_template): New local variable
|
* config/tc-i386.c (match_template): New local variable
|
||||||
|
@ -4734,6 +4734,10 @@ check_byte_reg (void)
|
|||||||
if (i.types[op].bitfield.reg8)
|
if (i.types[op].bitfield.reg8)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
/* I/O port address operands are OK too. */
|
||||||
|
if (i.tm.operand_types[op].bitfield.inoutportreg)
|
||||||
|
continue;
|
||||||
|
|
||||||
/* crc32 doesn't generate this warning. */
|
/* crc32 doesn't generate this warning. */
|
||||||
if (i.tm.base_opcode == 0xf20f38f0)
|
if (i.tm.base_opcode == 0xf20f38f0)
|
||||||
continue;
|
continue;
|
||||||
@ -4741,21 +4745,13 @@ check_byte_reg (void)
|
|||||||
if ((i.types[op].bitfield.reg16
|
if ((i.types[op].bitfield.reg16
|
||||||
|| i.types[op].bitfield.reg32
|
|| i.types[op].bitfield.reg32
|
||||||
|| i.types[op].bitfield.reg64)
|
|| i.types[op].bitfield.reg64)
|
||||||
&& i.op[op].regs->reg_num < 4)
|
&& i.op[op].regs->reg_num < 4
|
||||||
|
/* Prohibit these changes in 64bit mode, since the lowering
|
||||||
|
would be more complicated. */
|
||||||
|
&& flag_code != CODE_64BIT)
|
||||||
{
|
{
|
||||||
/* Prohibit these changes in the 64bit mode, since the
|
|
||||||
lowering is more complicated. */
|
|
||||||
if (flag_code == CODE_64BIT
|
|
||||||
&& !i.tm.operand_types[op].bitfield.inoutportreg)
|
|
||||||
{
|
|
||||||
as_bad (_("incorrect register `%s%s' used with `%c' suffix"),
|
|
||||||
register_prefix, i.op[op].regs->reg_name,
|
|
||||||
i.suffix);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#if REGISTER_WARNINGS
|
#if REGISTER_WARNINGS
|
||||||
if (!quiet_warnings
|
if (!quiet_warnings)
|
||||||
&& !i.tm.operand_types[op].bitfield.inoutportreg)
|
|
||||||
as_warn (_("using `%s%s' instead of `%s%s' due to `%c' suffix"),
|
as_warn (_("using `%s%s' instead of `%s%s' due to `%c' suffix"),
|
||||||
register_prefix,
|
register_prefix,
|
||||||
(i.op[op].regs + (i.types[op].bitfield.reg16
|
(i.op[op].regs + (i.types[op].bitfield.reg16
|
||||||
|
Reference in New Issue
Block a user