]> git.ipfire.org Git - thirdparty/gcc.git/commit
[APX NDD] Disable seg_prefixed memory usage for NDD add
authorHongyu Wang <hongyu.wang@intel.com>
Mon, 13 Nov 2023 10:49:07 +0000 (18:49 +0800)
committerHongyu Wang <hongyu.wang@intel.com>
Thu, 7 Dec 2023 01:31:13 +0000 (09:31 +0800)
commitd564198f960a2f5994dde3f6b83d7a62021e49c3
treed18dec7a11f40ad8559046455ba2e23899657ab8
parent7abcef725e40589553a079df9258ae094b811751
[APX NDD] Disable seg_prefixed memory usage for NDD add

NDD uses evex prefix, so when segment prefix is also applied, the instruction
could excceed its 15byte limit, especially adding immediates. This could happen
when "e" constraint accepts any UNSPEC_TPOFF/UNSPEC_NTPOFF constant and it will
add the offset to segment register, which will be encoded using segment prefix.
Disable those *POFF constant usage in NDD add alternatives with new constraint.

gcc/ChangeLog:

* config/i386/constraints.md (je): New constraint.
* config/i386/i386-protos.h (x86_poff_operand_p): New function to
check any *POFF constant in operand.
* config/i386/i386.cc (x86_poff_operand_p): New prototype.
* config/i386/i386.md (*add<mode>_1): Split out je alternative for add.
gcc/config/i386/constraints.md
gcc/config/i386/i386-protos.h
gcc/config/i386/i386.cc
gcc/config/i386/i386.md