binutils-gdb/opcodes/i386-dis-evex-mod.h
Jan Beulich 97e6786a6e x86: utilize X macro in EVEX decoding
For major opcodes allowing only packed FP kinds of operands, i.e. the
ones where legacy and AVX decoding uses the X macro, we can do so for
AVX512 as well, by attaching to the checking logic the "EVEX.W must
match presence of embedded 66 prefix" rule. (Encodings not following
this general pattern simply may not gain the PREFIX_OPCODE attribute.)

Note that testing of the thus altered decoding has already been put in
place by "x86: correct decoding of packed-FP-only AVX encodings".

This can also be at least partly applied to scalar-FP-only insns (i.e.
V{,U}COMIS{S,D}) as well as the vector-FP forms of insns also allowing
scalar encodings (e.g. VADDP{S,D}).

Take the opportunity and also fix EVEX-encoded VMOVNTP{S,D} as well as
to-memory forms of VMOV{L,H}PS and both forms of VMOV{L,H}PD to wrongly
disassemble with only register operands.
2020-06-09 08:57:22 +02:00

63 lines
1.4 KiB
C

{
/* MOD_EVEX_0F12_PREFIX_0 */
{ "vmovlpX", { XMM, Vex, EXxmm_mq }, PREFIX_OPCODE },
{ VEX_W_TABLE (EVEX_W_0F12_P_0_M_1) },
},
{
/* MOD_EVEX_0F12_PREFIX_2 */
{ "vmovlpX", { XMM, Vex, EXxmm_mq }, PREFIX_OPCODE },
},
{
/* MOD_EVEX_0F13 */
{ "vmovlpX", { EXxmm_mq, XMM }, PREFIX_OPCODE },
},
{
/* MOD_EVEX_0F16_PREFIX_0 */
{ "vmovhpX", { XMM, Vex, EXxmm_mq }, PREFIX_OPCODE },
{ VEX_W_TABLE (EVEX_W_0F16_P_0_M_1) },
},
{
/* MOD_EVEX_0F16_PREFIX_2 */
{ "vmovhpX", { XMM, Vex, EXxmm_mq }, PREFIX_OPCODE },
},
{
/* MOD_EVEX_0F17 */
{ "vmovhpX", { EXxmm_mq, XMM }, PREFIX_OPCODE },
},
{
/* MOD_EVEX_0F2B */
{ "vmovntpX", { EXx, XM }, PREFIX_OPCODE },
},
{
/* MOD_EVEX_0F38C6_REG_1 */
{ PREFIX_TABLE (PREFIX_EVEX_0F38C6_REG_1) },
},
{
/* MOD_EVEX_0F38C6_REG_2 */
{ PREFIX_TABLE (PREFIX_EVEX_0F38C6_REG_2) },
},
{
/* MOD_EVEX_0F38C6_REG_5 */
{ PREFIX_TABLE (PREFIX_EVEX_0F38C6_REG_5) },
},
{
/* MOD_EVEX_0F38C6_REG_6 */
{ PREFIX_TABLE (PREFIX_EVEX_0F38C6_REG_6) },
},
{
/* MOD_EVEX_0F38C7_REG_1 */
{ PREFIX_TABLE (PREFIX_EVEX_0F38C7_REG_1) },
},
{
/* MOD_EVEX_0F38C7_REG_2 */
{ PREFIX_TABLE (PREFIX_EVEX_0F38C7_REG_2) },
},
{
/* MOD_EVEX_0F38C7_REG_5 */
{ PREFIX_TABLE (PREFIX_EVEX_0F38C7_REG_5) },
},
{
/* MOD_EVEX_0F38C7_REG_6 */
{ PREFIX_TABLE (PREFIX_EVEX_0F38C7_REG_6) },
},