This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] x86: drop vex_encoding_vex2 enumerator
- From: Jan Beulich <jbeulich at suse dot com>
- To: "binutils at sourceware dot org" <binutils at sourceware dot org>
- Cc: "H.J. Lu" <hjl dot tools at gmail dot com>
- Date: Wed, 15 Jan 2020 08:42:12 +0100
- Subject: [PATCH] x86: drop vex_encoding_vex2 enumerator
Documentation clearly says "prefer {2,3}-byte VEX prefix for VEX
instruction", as opposed to "encode with EVEX prefix" for {evex}. Hence
there not being a way to VEX-encode an insn should not be an error (not
even a warning), and with this the separate enumerator becomes unneeded.
(Really I'm having trouble seeing what {vex2} would be useful for when
it's just a suggestion hint, not one allowing the programmer to mandate
the used encoding.)
gas/
2020-01-XX Jan Beulich <jbeulich@suse.com>
* config/tc-i386.c (struct _i386_insn): Drop vex_encoding_vex2
enumerator from vec_encoding enumeration.
(parse_insn): Use vex_encoding_default for {vex2}.
(VEX_check_operands): Don't error when {vex2} or {vex3} cannot
be honored.
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -419,7 +419,6 @@ struct _i386_insn
enum
{
vex_encoding_default = 0,
- vex_encoding_vex2,
vex_encoding_vex3,
vex_encoding_evex
} vec_encoding;
@@ -4723,7 +4722,7 @@ parse_insn (char *line, char *mnemonic)
break;
case 0x4:
/* {vex2} */
- i.vec_encoding = vex_encoding_vex2;
+ i.vec_encoding = vex_encoding_default;
break;
case 0x5:
/* {vex3} */
@@ -5707,15 +5706,7 @@ VEX_check_operands (const insn_template
}
if (!t->opcode_modifier.vex)
- {
- /* This instruction template doesn't have VEX prefix. */
- if (i.vec_encoding != vex_encoding_default)
- {
- i.error = unsupported;
- return 1;
- }
- return 0;
- }
+ return 0;
/* Check the special Imm4 cases; must be the first operand. */
if (t->cpu_flags.bitfield.cpuxop && t->operands == 5)