]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Support APX NF
authorCui, Lili <lili.cui@intel.com>
Sun, 7 Apr 2024 09:28:25 +0000 (17:28 +0800)
committerCui, Lili <lili.cui@intel.com>
Sun, 7 Apr 2024 09:28:25 +0000 (17:28 +0800)
commitdd74a603376ea0c32d06ba18ba52b73e77530cde
treef304d02f00f07fcf639545d0f78bfa7b70617745
parentbc0d0a5596224491ac6f507f758c4be106b6b5b2
Support APX NF

For the case when NDD and NF are both 0 in evex-promoted format,
we will fully support and test it in another patch.

gas/ChangeLog:

       * NEWS: Support Intel APX NF.
       * config/tc-i386.c (enum i386_error): Add unsupported_nf.
       (struct _i386_insn): Add has_nf.
       (is_apx_evex_encoding): Ditto.
       (build_apx_evex_prefix): Encode the NF bit.
       (md_assemble): Handle unsupported_nf.
       (parse_insn): Handle Prefix_NF and report bad for illegal combination.
       (can_convert_NDD_to_legacy): Replace i.tm.opcode_modifier.nf with i.has_nf.
       (match_template): Support D for APX_F insns and check NF support.
       * testsuite/gas/i386/x86-64-apx-evex-promoted-bad.d: Add bad test for NF bit.
       * testsuite/gas/i386/x86-64-apx-evex-promoted-bad.s: Ditto.
       * testsuite/gas/i386/x86-64-apx-inval.l: Ditto.
       * testsuite/gas/i386/x86-64-apx-inval.s: Ditto.
       * testsuite/gas/i386/x86-64.exp: Add apx nf tests.
       * testsuite/gas/i386/x86-64-apx-nf-intel.d: New test.
       * testsuite/gas/i386/x86-64-apx-nf.d: Ditto.
       * testsuite/gas/i386/x86-64-apx-nf.s: Ditto.

opcodes/ChangeLog:

       * i386-dis-evex.h: Add %NF to the instructions that support APX NF and
       add new instruction imul, popcnt, tzcnt and lzcnt to EVEX table.
       * i386-dis-evex-reg.h: Ditto.
       * i386-dis.c (struct instr_info): Add nf.
       (struct dis386): Add "NF" for EVEX.NF.
       (get_valid_dis386): Set ins->vex.nf and report bad-nf for illegal case.
       (print_insn): Handle ins.vex.nf.
       (putop): Handle "%NF".
       * i386-opc.h (Prefix_NF): New.
       * i386-opc.tbl: Added new entries to support full APX NF instructions.
       * i386-mnem.h: Regenerated.
       * i386-tbl.h: Regenerated.
17 files changed:
gas/NEWS
gas/config/tc-i386.c
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-inval.l
gas/testsuite/gas/i386/x86-64-apx-inval.s
gas/testsuite/gas/i386/x86-64-apx-nf-intel.d [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-apx-nf.d [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-apx-nf.s [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64.exp
opcodes/i386-dis-evex-reg.h
opcodes/i386-dis-evex.h
opcodes/i386-dis.c
opcodes/i386-mnem.h
opcodes/i386-opc.h
opcodes/i386-opc.tbl
opcodes/i386-tbl.h