]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Support APX CFCMOV
authorCui, Lili <lili.cui@intel.com>
Thu, 4 Jul 2024 07:49:16 +0000 (15:49 +0800)
committerCui, Lili <lili.cui@intel.com>
Thu, 4 Jul 2024 07:55:00 +0000 (15:55 +0800)
commitb0dd832fa45de3e8e2038e7564331476b80c42a5
tree36898c69fe4a6fc4237c1b743e3ca127fc019b2c
parent026eb0595f615f118d25be7f1297f071d20efa37
Support APX CFCMOV

The CMOVcc instruction proposed by EVEX has four different forms,
corresponding to the four possible combinations of EVEX.ND and EVEX.NF
values.

In the encoder part, when the CFCMOV template supports EVEX_NF, it means that
it requires EVEX.NF to be 1.

In the decoder part, CFCMOV_Fixup is used to reverse source and destination
operands in the 2-operand case.

gas/ChangeLog:

        * config/tc-i386.c (build_apx_evex_prefix): Set NF bit for cfcmov
        when the insn template supports EVEX_NF.
        * testsuite/gas/i386/x86-64-apx-inval.l: Add invalid tests for cfcmov.
        * testsuite/gas/i386/x86-64-apx-inval.s: Ditto.
        * testsuite/gas/i386/x86-64.exp: Add tests for cfcmov and cmov.
        * testsuite/gas/i386/x86-64-apx-cfcmov-intel.d: Ditto.
        * testsuite/gas/i386/x86-64-apx-cfcmov.d: Ditto.
        * testsuite/gas/i386/x86-64-apx-cfcmov.s: Ditto.

opcodes/ChangeLog:

        * i386-dis-evex-prefix.h: Add cfcmov instructions.
        * i386-dis.c (CFCMOV_Fixup): Special handling of cfcmov.
        (putop): Print 'cf' for cfcmov instructions.
        * i386-opc.h (EVEX_NF): New.
        * i386-opc.tbl: Add cfcmov instructions.
        * i386-mnem.h: Regerated.
        * i386-tbl.h: Regerated.
13 files changed:
gas/config/tc-i386.c
gas/testsuite/gas/i386/x86-64-apx-cfcmov-intel.d [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-apx-cfcmov.d [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-apx-cfcmov.s [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-apx-inval.l
gas/testsuite/gas/i386/x86-64-apx-inval.s
gas/testsuite/gas/i386/x86-64.exp
opcodes/i386-dis-evex-prefix.h
opcodes/i386-dis.c
opcodes/i386-mnem.h
opcodes/i386-opc.h
opcodes/i386-opc.tbl
opcodes/i386-tbl.h