]> gcc.gnu.org Git - gcc.git/commitdiff
i386: Fix comment/naming for APX NDD constraints
authorLingling Kong <lingling.kong@intel.com>
Fri, 2 Aug 2024 08:52:33 +0000 (16:52 +0800)
committerLingling Kong <lingling.kong@intel.com>
Fri, 2 Aug 2024 08:54:32 +0000 (16:54 +0800)
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.

gcc/config/i386/constraints.md
gcc/config/i386/predicates.md

index 18389c478002827cd7b7f4dc2469a2e6645e6b5c..91a63089a9670d4420f4a0d52444f5f1396383a7 100644 (file)
  "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)")))
index 680594871de05c808578c6becbbfbc3136c1b00e..ab6a2e14d355b0b2add66c78edb5ea7d58eb8a23 100644 (file)
 })
 
 ;; 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.  */
   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)
This page took 0.066284 seconds and 5 git commands to generate.