]> git.ipfire.org Git - thirdparty/gcc.git/commit
[APX EGPR] Handle legacy insn that only support GPR16 (1/5)
authorKong Lingling <lingling.kong@intel.com>
Fri, 24 Mar 2023 01:54:46 +0000 (09:54 +0800)
committerHongyu Wang <hongyu.wang@intel.com>
Sat, 7 Oct 2023 08:34:31 +0000 (16:34 +0800)
commite4e8b60a4fc99e2aa399518f121a8a3d9f888520
treeda8605b0ee96fa219c67ac784463474484e21b56
parentf49886484691d6ecec38ee83353ca34cc71410b7
[APX EGPR] Handle legacy insn that only support GPR16 (1/5)

These legacy insn in opcode map0/1 only support GPR16,
and do not have vex/evex counterpart, directly adjust constraints and
add gpr32 attr to patterns.

insn list:
1. xsave/xsave64, xrstor/xrstor64
2. xsaves/xsaves64, xrstors/xrstors64
3. xsavec/xsavec64
4. xsaveopt/xsaveopt64
5. fxsave64/fxrstor64

gcc/ChangeLog:

* config/i386/i386.md (<xsave>): Set attr gpr32 0 and constraint
jm.
(<xsave>_rex64): Likewise.
(<xrstor>_rex64): Likewise.
(<xrstor>64): Likewise.
(fxsave64): Likewise.
(fxstore64): Likewise.

gcc/testsuite/ChangeLog:

* lib/target-supports.exp: Add apxf check.
* gcc.target/i386/apx-legacy-insn-check-norex2.c: New test.
* gcc.target/i386/apx-legacy-insn-check-norex2-asm.c: New assembler test.

Co-authored-by: Hongyu Wang <hongyu.wang@intel.com>
Co-authored-by: Hongtao Liu <hongtao.liu@intel.com>
gcc/config/i386/i386.md
gcc/testsuite/gcc.target/i386/apx-legacy-insn-check-norex2-asm.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/apx-legacy-insn-check-norex2.c [new file with mode: 0644]
gcc/testsuite/lib/target-supports.exp