aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorLingling Kong <lingling.kong@intel.com>2024-08-02 16:52:33 +0800
committerLingling Kong <lingling.kong@intel.com>2024-08-02 16:54:32 +0800
commit1fbce3252bc00b1678cdf62b8798a94962e99f76 (patch)
tree86ed30c312ff4ba2b796c89f9b713070d28d40c0 /gcc
parent06201faa6376cade5a286850370dd070c1573531 (diff)
downloadgcc-1fbce3252bc00b1678cdf62b8798a94962e99f76.zip
gcc-1fbce3252bc00b1678cdf62b8798a94962e99f76.tar.gz
gcc-1fbce3252bc00b1678cdf62b8798a94962e99f76.tar.bz2
i386: Fix comment/naming for APX NDD constraints
gcc/ChangeLog: * config/i386/constraints.md: Fixed the comment/naming for je/jM/jO. * config/i386/predicates.md (apx_ndd_memory_operand): Renamed and fixed the comment. (apx_evex_memory_operand): New name. (apx_ndd_add_memory_operand): Ditto. (apx_evex_add_memory_operand): Ditto.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/i386/constraints.md13
-rw-r--r--gcc/config/i386/predicates.md22
2 files changed, 19 insertions, 16 deletions
diff --git a/gcc/config/i386/constraints.md b/gcc/config/i386/constraints.md
index 18389c4..91a6308 100644
--- a/gcc/config/i386/constraints.md
+++ b/gcc/config/i386/constraints.md
@@ -463,14 +463,15 @@
"TARGET_APX_EGPR && !TARGET_AVX ? GENERAL_GPR16 : GENERAL_REGS")
(define_memory_constraint "je"
- "@internal Memory operand for APX NDD ADD."
- (match_operand 0 "apx_ndd_add_memory_operand"))
+ "@internal Memory operand for APX EVEX-encoded ADD (i.e. APX NDD/NF)."
+ (match_operand 0 "apx_evex_add_memory_operand"))
(define_memory_constraint "jM"
- "@internal Memory operand, with APX NDD check."
- (match_operand 0 "apx_ndd_memory_operand"))
+ "@internal Memory operand, with APX EVEX-encoded (i.e. APX NDD/NF) check."
+ (match_operand 0 "apx_evex_memory_operand"))
(define_memory_constraint "jO"
- "@internal Offsettable memory operand, with APX NDD check."
- (and (match_operand 0 "apx_ndd_memory_operand")
+ "@internal Offsettable memory operand, with APX EVEX-encoded
+ (i.e. APX NDD/NF) check."
+ (and (match_operand 0 "apx_evex_memory_operand")
(match_test "offsettable_nonstrict_memref_p (op)")))
diff --git a/gcc/config/i386/predicates.md b/gcc/config/i386/predicates.md
index 6805948..ab6a2e1 100644
--- a/gcc/config/i386/predicates.md
+++ b/gcc/config/i386/predicates.md
@@ -2265,10 +2265,10 @@
})
;; Return true if OP is a memory operand that can be also used in APX
-;; NDD patterns with immediate operand. With non-default address space,
-;; segment register or address size prefix, APX NDD instruction length
-;; can exceed the 15 byte size limit.
-(define_predicate "apx_ndd_memory_operand"
+;; EVEX-encoded patterns (i.e. APX NDD/NF) with immediate operand. With
+;; non-default address space, segment register or address size prefix,
+;; APX EVEX-encoded instruction length can exceed the 15 byte size limit.
+(define_predicate "apx_evex_memory_operand"
(match_operand 0 "memory_operand")
{
/* OK if immediate operand size < 4 bytes. */
@@ -2312,19 +2312,21 @@
return true;
})
-;; Return true if OP is a memory operand which can be used in APX NDD
-;; ADD with register source operand. UNSPEC_GOTNTPOFF memory operand
-;; is allowed with APX NDD ADD only if R_X86_64_CODE_6_GOTTPOFF works.
-(define_predicate "apx_ndd_add_memory_operand"
+;; Return true if OP is a memory operand which can be used in APX EVEX-encoded
+;; ADD patterns (i.e. APX NDD/NF) for with register source operand.
+;; UNSPEC_GOTNTPOFF memory operand is allowed with APX EVEX-encoded ADD only if
+;; R_X86_64_CODE_6_GOTTPOFF works.
+(define_predicate "apx_evex_add_memory_operand"
(match_operand 0 "memory_operand")
{
- /* OK if "add %reg1, name@gottpoff(%rip), %reg2" is supported. */
+ /* OK if "add %reg1, name@gottpoff(%rip), %reg2" or
+ "{nf} add name@gottpoff(%rip), %reg1" are supported. */
if (HAVE_AS_R_X86_64_CODE_6_GOTTPOFF)
return true;
op = XEXP (op, 0);
- /* Disallow APX NDD ADD with UNSPEC_GOTNTPOFF. */
+ /* Disallow APX EVEX-encoded ADD with UNSPEC_GOTNTPOFF. */
if (GET_CODE (op) == CONST
&& GET_CODE (XEXP (op, 0)) == UNSPEC
&& XINT (XEXP (op, 0), 1) == UNSPEC_GOTNTPOFF)