mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-27 03:51:15 +08:00
d8ba1c4037
CCMP and CTEST are two new sets of instructions for conditional CMP and TEST, SCC and OSZC flags are given as suffixes of CCMP or CTEST in the instruction mnemonic, e.g.: ccmp<cc> { dfv=sf , cf , of } %eax, %ecx also add {evex} cmp/test %eax, %ecx as an alias for ccmpt. For the encoder part, add function check_Scc_OszcOperation to parse '{ dfv=of , sf, sf, cf}', store scc in the lower 4 bits of base_opcode, and adjust base_opcode to its normal meaning in install_template. For the decoder part, add 'SC' and 'DF' macros to add scc and oszc flags suffixes. gas/ChangeLog: * config/tc-i386.c (OSZC_CF): New. (OSZC_ZF): Ditto. (OSZC_SF): Ditto. (OSZC_OF): Ditto. (set_oszc_flags): Set oszc flags and report error for using the same oszc flags twice. (check_Scc_OszcOperations): Handle SCC OSZC flags. (install_template): Add scc and oszc_flags. (build_apx_evex_prefix): Encode SCC and oszc flags bits. (parse_insn): Handle check_Scc_OszcOperations. * testsuite/gas/i386/x86-64-apx-evex-promoted-bad.d: Add ivalid test case. * testsuite/gas/i386/x86-64-apx-evex-promoted-bad.s: Ditto. * testsuite/gas/i386/x86-64.exp: Add test for ccmp and ctest. * testsuite/gas/i386/x86-64-apx-ccmp-ctest-intel.d: New test. * testsuite/gas/i386/x86-64-apx-ccmp-ctest-inval.l: Ditto. * testsuite/gas/i386/x86-64-apx-ccmp-ctest-inval.s: Ditto. * testsuite/gas/i386/x86-64-apx-ccmp-ctest.d: Ditto. * testsuite/gas/i386/x86-64-apx-ccmp-ctest.s: Ditto. opcodes/ChangeLog: * i386-dis-evex-reg.h: Add ccmp and ctest. * i386-dis-evex.h: Ditto. * i386-dis.c (struct instr_info): add scc. (struct dis386): Add new micro 'NE','SC' and'DF'. (get_valid_dis386): Get scc value and move MAP4 invalid check to print_insn. (putop): Handle %NE, %SC and %DF. * i386-opc.h (SCC): New. * i386-opc.tbl: Add ccmp/ctest and evex format for cmp/test. * i386-mnem.h: Regenerated. * i386-tbl.h: Ditto.
126 lines
4.1 KiB
C
126 lines
4.1 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 */
|
|
{
|
|
{ "%NFaddA", { VexGb, Eb, Ib }, NO_PREFIX },
|
|
{ "%NForA", { VexGb, Eb, Ib }, NO_PREFIX },
|
|
{ "adcA", { VexGb, Eb, Ib }, NO_PREFIX },
|
|
{ "sbbA", { VexGb, Eb, Ib }, NO_PREFIX },
|
|
{ "%NFandA", { VexGb, Eb, Ib }, NO_PREFIX },
|
|
{ "%NFsubA", { VexGb, Eb, Ib }, NO_PREFIX },
|
|
{ "%NFxorA", { VexGb, Eb, Ib }, NO_PREFIX },
|
|
{ "%NEccmp%SCA%DF", { Eb, Ib }, NO_PREFIX },
|
|
},
|
|
/* REG_EVEX_MAP4_81 */
|
|
{
|
|
{ "%NFaddQ", { VexGv, Ev, Iv }, PREFIX_NP_OR_DATA },
|
|
{ "%NForQ", { VexGv, Ev, Iv }, PREFIX_NP_OR_DATA },
|
|
{ "adcQ", { VexGv, Ev, Iv }, PREFIX_NP_OR_DATA },
|
|
{ "sbbQ", { VexGv, Ev, Iv }, PREFIX_NP_OR_DATA },
|
|
{ "%NFandQ", { VexGv, Ev, Iv }, PREFIX_NP_OR_DATA },
|
|
{ "%NFsubQ", { VexGv, Ev, Iv }, PREFIX_NP_OR_DATA },
|
|
{ "%NFxorQ", { VexGv, Ev, Iv }, PREFIX_NP_OR_DATA },
|
|
{ "%NEccmp%SCQ%DF", { Ev, Iv }, PREFIX_NP_OR_DATA },
|
|
},
|
|
/* REG_EVEX_MAP4_83 */
|
|
{
|
|
{ "%NFaddQ", { VexGv, Ev, sIb }, PREFIX_NP_OR_DATA },
|
|
{ "%NForQ", { VexGv, Ev, sIb }, PREFIX_NP_OR_DATA },
|
|
{ "adcQ", { VexGv, Ev, sIb }, PREFIX_NP_OR_DATA },
|
|
{ "sbbQ", { VexGv, Ev, sIb }, PREFIX_NP_OR_DATA },
|
|
{ "%NFandQ", { VexGv, Ev, sIb }, PREFIX_NP_OR_DATA },
|
|
{ "%NFsubQ", { VexGv, Ev, sIb }, PREFIX_NP_OR_DATA },
|
|
{ "%NFxorQ", { VexGv, Ev, sIb }, PREFIX_NP_OR_DATA },
|
|
{ "%NEccmp%SCQ%DF", { Ev, sIb }, PREFIX_NP_OR_DATA },
|
|
},
|
|
/* REG_EVEX_MAP4_8F */
|
|
{
|
|
{ VEX_W_TABLE (EVEX_W_MAP4_8F_R_0) },
|
|
},
|
|
/* REG_EVEX_MAP4_F6 */
|
|
{
|
|
{ "%NEctest%SCA%DF", { Eb, Ib }, NO_PREFIX },
|
|
{ "%NEctest%SCA%DF", { Eb, Ib }, NO_PREFIX },
|
|
{ "notA", { VexGb, Eb }, NO_PREFIX },
|
|
{ "%NFnegA", { VexGb, Eb }, NO_PREFIX },
|
|
{ "%NFmulA", { Eb }, NO_PREFIX },
|
|
{ "%NFimulA", { Eb }, NO_PREFIX },
|
|
{ "%NFdivA", { Eb }, NO_PREFIX },
|
|
{ "%NFidivA", { Eb }, NO_PREFIX },
|
|
},
|
|
/* REG_EVEX_MAP4_F7 */
|
|
{
|
|
{ "%NEctest%SCQ%DF", { Ev, Iv }, PREFIX_NP_OR_DATA },
|
|
{ "%NEctest%SCQ%DF", { Ev, Iv }, PREFIX_NP_OR_DATA },
|
|
{ "notQ", { VexGv, Ev }, PREFIX_NP_OR_DATA },
|
|
{ "%NFnegQ", { VexGv, Ev }, PREFIX_NP_OR_DATA },
|
|
{ "%NFmulQ", { Ev }, PREFIX_NP_OR_DATA },
|
|
{ "%NFimulQ", { Ev }, PREFIX_NP_OR_DATA },
|
|
{ "%NFdivQ", { Ev }, PREFIX_NP_OR_DATA },
|
|
{ "%NFidivQ", { Ev }, PREFIX_NP_OR_DATA },
|
|
},
|
|
/* REG_EVEX_MAP4_FE */
|
|
{
|
|
{ "%NFincA", { VexGb, Eb }, NO_PREFIX },
|
|
{ "%NFdecA", { VexGb, Eb }, NO_PREFIX },
|
|
},
|
|
/* REG_EVEX_MAP4_FF */
|
|
{
|
|
{ "%NFincQ", { VexGv, Ev }, PREFIX_NP_OR_DATA },
|
|
{ "%NFdecQ", { VexGv, Ev }, PREFIX_NP_OR_DATA },
|
|
{ Bad_Opcode },
|
|
{ Bad_Opcode },
|
|
{ Bad_Opcode },
|
|
{ Bad_Opcode },
|
|
{ VEX_W_TABLE (EVEX_W_MAP4_FF_R_6) },
|
|
},
|