Support APX NDD optimized encoding.
authorHu, Lin1 <lin1.hu@intel.com>
Thu, 28 Dec 2023 01:06:41 +0000 (01:06 +0000)
committerCui, Lili <lili.cui@intel.com>
Thu, 28 Dec 2023 11:45:28 +0000 (11:45 +0000)
commit6967f19dcd3d2794976b2a193a0c30b626c92c3b
tree74562862174d18799be06ad84b34139e759a90d3
parentac32c879b26af580e29ecaa152e3d9d999f34caa
Support APX NDD optimized encoding.

This patch aims to optimize:

add %r16, %r15, %r15 -> add %r16, %r15

gas/ChangeLog:

* config/tc-i386.c (check_Rex_required): New function.
(can_convert_NDD_to_legacy): Ditto.
(match_template): If we can optimzie APX NDD insns, so rematch
template.
* testsuite/gas/i386/x86-64.exp: Add test.
* testsuite/gas/i386/x86-64-apx-ndd-optimize.d: New test.
* testsuite/gas/i386/x86-64-apx-ndd-optimize.s: Ditto.
gas/config/tc-i386.c
gas/testsuite/gas/i386/x86-64-apx-ndd-optimize.d [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-apx-ndd-optimize.s [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64.exp