diff options
author | Pat Haugen <pthaugen@linux.ibm.com> | 2021-03-31 14:37:24 -0500 |
---|---|---|
committer | Pat Haugen <pthaugen@linux.ibm.com> | 2021-03-31 14:37:24 -0500 |
commit | ea9a39e63eba1ba72aa3608317d1c40ae6bcef55 (patch) | |
tree | bc8628eaf7888f3631e1c6aa97d11cf0dfc1b87f /gcc/config/rs6000/rs6000.md | |
parent | 4b33c5aaab9e863da162942ab8bcd54070b705af (diff) | |
download | gcc-ea9a39e63eba1ba72aa3608317d1c40ae6bcef55.zip gcc-ea9a39e63eba1ba72aa3608317d1c40ae6bcef55.tar.gz gcc-ea9a39e63eba1ba72aa3608317d1c40ae6bcef55.tar.bz2 |
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 <pthaugen@linux.ibm.com>
gcc/
PR target/99133
* config/rs6000/altivec.md (xxspltiw_v4si, xxspltiw_v4sf_inst,
xxspltidp_v2df_inst, xxsplti32dx_v4si_inst, xxsplti32dx_v4sf_inst,
xxblend_<mode>, xxpermx_inst, xxeval): Mark prefixed.
* config/rs6000/mma.md (mma_<vvi4i4i8>, mma_<avvi4i4i8>,
mma_<vvi4i4i2>, mma_<avvi4i4i2>, mma_<vvi4i4>, mma_<avvi4i4>,
mma_<pvi4i2>, mma_<apvi4i2>, mma_<vvi4i4i4>, mma_<avvi4i4i4>):
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.
Diffstat (limited to 'gcc/config/rs6000/rs6000.md')
-rw-r--r-- | gcc/config/rs6000/rs6000.md | 19 |
1 files changed, 13 insertions, 6 deletions
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") |