From ea9a39e63eba1ba72aa3608317d1c40ae6bcef55 Mon Sep 17 00:00:00 2001 From: Pat Haugen Date: Wed, 31 Mar 2021 14:37:24 -0500 Subject: Update prefixed attribute for Power10. This patch creates a new attribute, "maybe_prefixed", which is used to mark those instructions that may have a prefixed form. The existing "prefixed" attribute is now used to mark all instructions that are prefixed form. 2021-03-31 Pat Haugen gcc/ PR target/99133 * config/rs6000/altivec.md (xxspltiw_v4si, xxspltiw_v4sf_inst, xxspltidp_v2df_inst, xxsplti32dx_v4si_inst, xxsplti32dx_v4sf_inst, xxblend_, xxpermx_inst, xxeval): Mark prefixed. * config/rs6000/mma.md (mma_, mma_, mma_, mma_, mma_, mma_, mma_, mma_, mma_, mma_): Likewise. * config/rs6000/rs6000.c (rs6000_final_prescan_insn): Adjust test. * config/rs6000/rs6000.md (define_attr "maybe_prefixed"): New. (define_attr "prefixed"): Update initializer. --- gcc/config/rs6000/rs6000.md | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'gcc/config/rs6000/rs6000.md') diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index c71d343..c8cdc42 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -264,15 +264,22 @@ (define_attr "cannot_copy" "no,yes" (const_string "no")) -;; Whether an insn is a prefixed insn, and an initial 'p' should be printed -;; before the instruction. A prefixed instruction has a prefix instruction -;; word that extends the immediate value of the instructions from 12-16 bits to -;; 34 bits. The macro ASM_OUTPUT_OPCODE emits a leading 'p' for prefixed -;; insns. The default "length" attribute will also be adjusted by default to +;; Whether this insn has a prefixed form and a non-prefixed form. +(define_attr "maybe_prefixed" "no,yes" + (if_then_else (eq_attr "type" "load,fpload,vecload,store,fpstore,vecstore, + integer,add") + (const_string "yes") + (const_string "no"))) + +;; Whether an insn is a prefixed insn. A prefixed instruction has a prefix +;; instruction word that conveys additional information such as a larger +;; immediate, additional operands, etc., in addition to the normal instruction +;; word. The default "length" attribute will also be adjusted by default to ;; be 12 bytes. (define_attr "prefixed" "no,yes" (cond [(ior (match_test "!TARGET_PREFIXED") - (match_test "!NONJUMP_INSN_P (insn)")) + (match_test "!NONJUMP_INSN_P (insn)") + (eq_attr "maybe_prefixed" "no")) (const_string "no") (eq_attr "type" "load,fpload,vecload") -- cgit v1.1