mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-22 19:09:31 +08:00
x86: Swap destination/source to encode VEX only if possible
When encoding VEX, we can swap destination and source only if there are more than 1 register operand. * config/tc-i386.c (build_vex_prefix): Swap destination and source only if there are more than 1 register operand.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2018-09-13 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
|
* config/tc-i386.c (build_vex_prefix): Swap destination and
|
||||||
|
source only if there are more than 1 register operand.
|
||||||
|
|
||||||
2018-09-13 Jan Beulich <jbeulich@suse.com>
|
2018-09-13 Jan Beulich <jbeulich@suse.com>
|
||||||
|
|
||||||
* config/tc-i386.c (operand_size_match): Also deal with three
|
* config/tc-i386.c (operand_size_match): Also deal with three
|
||||||
|
@ -3364,9 +3364,10 @@ build_vex_prefix (const insn_template *t)
|
|||||||
else
|
else
|
||||||
register_specifier = 0xf;
|
register_specifier = 0xf;
|
||||||
|
|
||||||
/* Use 2-byte VEX prefix by swapping destination and source
|
/* Use 2-byte VEX prefix by swapping destination and source operand
|
||||||
operand. */
|
if there are more than 1 register operand. */
|
||||||
if (i.vec_encoding != vex_encoding_vex3
|
if (i.reg_operands > 1
|
||||||
|
&& i.vec_encoding != vex_encoding_vex3
|
||||||
&& i.dir_encoding == dir_encoding_default
|
&& i.dir_encoding == dir_encoding_default
|
||||||
&& i.operands == i.reg_operands
|
&& i.operands == i.reg_operands
|
||||||
&& operand_type_equal (&i.types[0], &i.types[i.operands - 1])
|
&& operand_type_equal (&i.types[0], &i.types[i.operands - 1])
|
||||||
|
Reference in New Issue
Block a user