binutils-gdb/opcodes/i386-dis-evex-reg.h
Mo, Zewei 08a98d4c13 Support APX Push2/Pop2
PPX functionality for PUSH/POP is not implemented in this patch
and will be implemented separately.

gas/ChangeLog:

2023-12-28  Zewei Mo <zewei.mo@intel.com>
            H.J. Lu  <hongjiu.lu@intel.com>
            Lili Cui <lili.cui@intel.com>

	* config/tc-i386.c: (enum i386_error):
	New unsupported_rsp_register and invalid_src_register_set.
	(md_assemble): Add handler for unsupported_rsp_register and
	invalid_src_register_set.
	(check_APX_operands): Add invalid check for push2/pop2.
	(match_template): Handle check_APX_operands.
	* testsuite/gas/i386/i386.exp: Add apx-push2pop2 tests.
	* testsuite/gas/i386/x86-64.exp: Ditto.
	* testsuite/gas/i386/x86-64-apx-push2pop2.d: New test.
	* testsuite/gas/i386/x86-64-apx-push2pop2.s: Ditto.
	* testsuite/gas/i386/x86-64-apx-push2pop2-intel.d: Ditto.
	* testsuite/gas/i386/x86-64-apx-push2pop2-inval.l: Ditto.
	* testsuite/gas/i386/x86-64-apx-push2pop2-inval.s: Ditto.
	* testsuite/gas/i386/apx-push2pop2-inval.s: Ditto.
	* testsuite/gas/i386/apx-push2pop2-inval.d: Ditto.
	* testsuite/gas/i386/x86-64-apx-evex-promoted-bad.d: Added bad
	testcases for POP2.
	* testsuite/gas/i386/x86-64-apx-evex-promoted-bad.s: Ditto.

opcodes/ChangeLog:

	* i386-dis-evex-reg.h: Add REG_EVEX_MAP4_8F.
	* i386-dis-evex-w.h: Add EVEX_W_MAP4_8F_R_0 and EVEX_W_MAP4_FF_R_6
	* i386-dis-evex.h: Add REG_EVEX_MAP4_8F.
	* i386-dis.c (PUSH2_POP2_Fixup): Add special handling for PUSH2/POP2.
	(get_valid_dis386): Add handler for vector length and address_mode for
	APX-Push2/Pop2 insn.
	(nd): define nd as b for EVEX-promoted instrutions.
	(OP_VEX): Add handler of 64-bit vvvv register for APX-Push2/Pop2 insn.
	* i386-gen.c: Add Push2Pop2 bitfield.
	* i386-opc.h: Regenerated.
	* i386-opc.tbl: Regenerated.
2023-12-28 11:41:45 +00:00

115 lines
3.4 KiB
C

/* REG_EVEX_0F71 */
{
{ Bad_Opcode },
{ Bad_Opcode },
{ "%XEvpsrlw", { Vex, EXx, Ib }, PREFIX_DATA },
{ Bad_Opcode },
{ "%XEvpsraw", { Vex, EXx, Ib }, PREFIX_DATA },
{ Bad_Opcode },
{ "%XEvpsllw", { Vex, EXx, Ib }, PREFIX_DATA },
},
/* REG_EVEX_0F72 */
{
{ "vpror%DQ", { Vex, EXx, Ib }, PREFIX_DATA },
{ "vprol%DQ", { Vex, EXx, Ib }, PREFIX_DATA },
{ VEX_W_TABLE (EVEX_W_0F72_R_2) },
{ Bad_Opcode },
{ "%XEvpsra%DQ", { Vex, EXx, Ib }, PREFIX_DATA },
{ Bad_Opcode },
{ VEX_W_TABLE (EVEX_W_0F72_R_6) },
},
/* REG_EVEX_0F73 */
{
{ Bad_Opcode },
{ Bad_Opcode },
{ VEX_W_TABLE (EVEX_W_0F73_R_2) },
{ "%XEvpsrldqY", { Vex, EXx, Ib }, PREFIX_DATA },
{ Bad_Opcode },
{ Bad_Opcode },
{ VEX_W_TABLE (EVEX_W_0F73_R_6) },
{ "%XEvpslldqY", { Vex, EXx, Ib }, PREFIX_DATA },
},
/* REG_EVEX_0F38C6_L_2 */
{
{ Bad_Opcode },
{ "vgatherpf0dp%XW", { MVexVSIBDWpX }, PREFIX_DATA },
{ "vgatherpf1dp%XW", { MVexVSIBDWpX }, PREFIX_DATA },
{ Bad_Opcode },
{ Bad_Opcode },
{ "vscatterpf0dp%XW", { MVexVSIBDWpX }, PREFIX_DATA },
{ "vscatterpf1dp%XW", { MVexVSIBDWpX }, PREFIX_DATA },
},
/* REG_EVEX_0F38C7_L_2 */
{
{ Bad_Opcode },
{ "vgatherpf0qp%XW", { MVexVSIBQWpX }, PREFIX_DATA },
{ "vgatherpf1qp%XW", { MVexVSIBQWpX }, PREFIX_DATA },
{ Bad_Opcode },
{ Bad_Opcode },
{ "vscatterpf0qp%XW", { MVexVSIBQWpX }, PREFIX_DATA },
{ "vscatterpf1qp%XW", { MVexVSIBQWpX }, PREFIX_DATA },
},
/* REG_EVEX_MAP4_80 */
{
{ "addA", { VexGb, Eb, Ib }, NO_PREFIX },
{ "orA", { VexGb, Eb, Ib }, NO_PREFIX },
{ "adcA", { VexGb, Eb, Ib }, NO_PREFIX },
{ "sbbA", { VexGb, Eb, Ib }, NO_PREFIX },
{ "andA", { VexGb, Eb, Ib }, NO_PREFIX },
{ "subA", { VexGb, Eb, Ib }, NO_PREFIX },
{ "xorA", { VexGb, Eb, Ib }, NO_PREFIX },
},
/* REG_EVEX_MAP4_81 */
{
{ "addQ", { VexGv, Ev, Iv }, PREFIX_NP_OR_DATA },
{ "orQ", { VexGv, Ev, Iv }, PREFIX_NP_OR_DATA },
{ "adcQ", { VexGv, Ev, Iv }, PREFIX_NP_OR_DATA },
{ "sbbQ", { VexGv, Ev, Iv }, PREFIX_NP_OR_DATA },
{ "andQ", { VexGv, Ev, Iv }, PREFIX_NP_OR_DATA },
{ "subQ", { VexGv, Ev, Iv }, PREFIX_NP_OR_DATA },
{ "xorQ", { VexGv, Ev, Iv }, PREFIX_NP_OR_DATA },
},
/* REG_EVEX_MAP4_83 */
{
{ "addQ", { VexGv, Ev, sIb }, PREFIX_NP_OR_DATA },
{ "orQ", { VexGv, Ev, sIb }, PREFIX_NP_OR_DATA },
{ "adcQ", { VexGv, Ev, sIb }, PREFIX_NP_OR_DATA },
{ "sbbQ", { VexGv, Ev, sIb }, PREFIX_NP_OR_DATA },
{ "andQ", { VexGv, Ev, sIb }, PREFIX_NP_OR_DATA },
{ "subQ", { VexGv, Ev, sIb }, PREFIX_NP_OR_DATA },
{ "xorQ", { VexGv, Ev, sIb }, PREFIX_NP_OR_DATA },
},
/* REG_EVEX_MAP4_8F */
{
{ VEX_W_TABLE (EVEX_W_MAP4_8F_R_0) },
},
/* REG_EVEX_MAP4_F6 */
{
{ Bad_Opcode },
{ Bad_Opcode },
{ "notA", { VexGb, Eb }, NO_PREFIX },
{ "negA", { VexGb, Eb }, NO_PREFIX },
},
/* REG_EVEX_MAP4_F7 */
{
{ Bad_Opcode },
{ Bad_Opcode },
{ "notQ", { VexGv, Ev }, PREFIX_NP_OR_DATA },
{ "negQ", { VexGv, Ev }, PREFIX_NP_OR_DATA },
},
/* REG_EVEX_MAP4_FE */
{
{ "incA", { VexGb, Eb }, NO_PREFIX },
{ "decA", { VexGb, Eb }, NO_PREFIX },
},
/* REG_EVEX_MAP4_FF */
{
{ "incQ", { VexGv, Ev }, PREFIX_NP_OR_DATA },
{ "decQ", { VexGv, Ev }, PREFIX_NP_OR_DATA },
{ Bad_Opcode },
{ Bad_Opcode },
{ Bad_Opcode },
{ Bad_Opcode },
{ VEX_W_TABLE (EVEX_W_MAP4_FF_R_6) },
},