Support APX Push2/Pop2
authorMo, Zewei <zewei.mo@intel.com>
Thu, 28 Dec 2023 01:06:40 +0000 (01:06 +0000)
committerCui, Lili <lili.cui@intel.com>
Thu, 28 Dec 2023 11:41:45 +0000 (11:41 +0000)
commit08a98d4c1331cc726c8c76c14d9db34d6f0aadd6
treed9d3b9fb83d173f0cdc20ec55063ed582145cdd2
parent3083f376435662c747ab946bb84e6e6698985610
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.
19 files changed:
gas/config/tc-i386.c
gas/testsuite/gas/i386/apx-push2pop2-inval.l [new file with mode: 0644]
gas/testsuite/gas/i386/apx-push2pop2-inval.s [new file with mode: 0644]
gas/testsuite/gas/i386/i386.exp
gas/testsuite/gas/i386/x86-64-apx-evex-promoted-bad.d
gas/testsuite/gas/i386/x86-64-apx-evex-promoted-bad.s
gas/testsuite/gas/i386/x86-64-apx-push2pop2-intel.d [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-apx-push2pop2-inval.l [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-apx-push2pop2-inval.s [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-apx-push2pop2.d [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-apx-push2pop2.s [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64.exp
opcodes/i386-dis-evex-reg.h
opcodes/i386-dis-evex-w.h
opcodes/i386-dis-evex.h
opcodes/i386-dis.c
opcodes/i386-mnem.h
opcodes/i386-opc.tbl
opcodes/i386-tbl.h