From: David Edelsohn Date: Mon, 9 Jun 2003 17:16:15 +0000 (+0000) Subject: rs6000.md (define_attr "type"): Add insert_word. X-Git-Tag: releases/gcc-3.4.0~6017 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8e8238f181f8b65ba5730fe93a998ef45021f595;p=thirdparty%2Fgcc.git rs6000.md (define_attr "type"): Add insert_word. * config/rs6000/rs6000.md (define_attr "type"): Add insert_word. (insvsi*): Add insert_word attribute. * config/rs6000/rs6000.c (rs6000_variable_issue): Add TYPE_INSERT_WORD. * config/rs6000/{40x.md,603.md,6xx.md,7450.md,7xx.md,mpc.md, power4.md,rios1.md,rios2.md,rs64.md}: Add insert_word. Co-Authored-By: Ayal Zaks From-SVN: r67668 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 91346e014457..ac969be79840 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2003-06-09 David Edelsohn + Ayal Zaks + + * config/rs6000/rs6000.md (define_attr "type"): Add insert_word. + (insvsi*): Add insert_word attribute. + * config/rs6000/rs6000.c (rs6000_variable_issue): Add TYPE_INSERT_WORD. + * config/rs6000/{40x.md,603.md,6xx.md,7450.md,7xx.md,mpc.md, + power4.md,rios1.md,rios2.md,rs64.md}: Add insert_word. + 2003-06-09 Kazu Hirata * fold-const.c (fold): Fix a comment typo. diff --git a/gcc/config/rs6000/40x.md b/gcc/config/rs6000/40x.md index bc42e396d1f5..9d229b4c8d7e 100644 --- a/gcc/config/rs6000/40x.md +++ b/gcc/config/rs6000/40x.md @@ -36,7 +36,7 @@ "iu_40x") (define_insn_reservation "ppc403-integer" 1 - (and (eq_attr "type" "integer") + (and (eq_attr "type" "integer,insert_word") (eq_attr "cpu" "ppc403,ppc405")) "iu_40x") diff --git a/gcc/config/rs6000/440.md b/gcc/config/rs6000/440.md index 660fc196d7c2..e98d5be782d1 100644 --- a/gcc/config/rs6000/440.md +++ b/gcc/config/rs6000/440.md @@ -54,7 +54,7 @@ "ppc440_issue,ppc440_l_pipe") (define_insn_reservation "ppc440-integer" 1 - (and (eq_attr "type" "integer") + (and (eq_attr "type" "integer,insert_word") (eq_attr "cpu" "ppc440")) "ppc440_issue,ppc440_i_pipe|ppc440_j_pipe") diff --git a/gcc/config/rs6000/603.md b/gcc/config/rs6000/603.md index 5420cb917740..fe37fbedfddd 100644 --- a/gcc/config/rs6000/603.md +++ b/gcc/config/rs6000/603.md @@ -54,7 +54,7 @@ "lsu_603") (define_insn_reservation "ppc603-integer" 1 - (and (eq_attr "type" "integer") + (and (eq_attr "type" "integer,insert_word") (eq_attr "cpu" "ppc603")) "iu_603") diff --git a/gcc/config/rs6000/6xx.md b/gcc/config/rs6000/6xx.md index a4ac520e37f0..d28d3738bb79 100644 --- a/gcc/config/rs6000/6xx.md +++ b/gcc/config/rs6000/6xx.md @@ -64,7 +64,7 @@ "lsu_6xx") (define_insn_reservation "ppc604-integer" 1 - (and (eq_attr "type" "integer") + (and (eq_attr "type" "integer,insert_word") (eq_attr "cpu" "ppc604,ppc604e,ppc620,ppc630")) "iu1_6xx|iu2_6xx") diff --git a/gcc/config/rs6000/7450.md b/gcc/config/rs6000/7450.md index 7c136a5b8a8c..55bd4d863686 100644 --- a/gcc/config/rs6000/7450.md +++ b/gcc/config/rs6000/7450.md @@ -64,7 +64,7 @@ "ppc7450_du,lsu_7450*3") (define_insn_reservation "ppc7450-integer" 1 - (and (eq_attr "type" "integer") + (and (eq_attr "type" "integer,insert_word") (eq_attr "cpu" "ppc7450")) "ppc7450_du,(iu1_7450|iu2_7450|iu3_7450)") diff --git a/gcc/config/rs6000/7xx.md b/gcc/config/rs6000/7xx.md index e46366929d04..eb84f29fbacf 100644 --- a/gcc/config/rs6000/7xx.md +++ b/gcc/config/rs6000/7xx.md @@ -59,7 +59,7 @@ "ppc750_du,lsu_7xx") (define_insn_reservation "ppc750-integer" 1 - (and (eq_attr "type" "integer") + (and (eq_attr "type" "integer,insert_word") (eq_attr "cpu" "ppc750,ppc7400")) "ppc750_du,(iu1_7xx|iu2_7xx)") diff --git a/gcc/config/rs6000/8540.md b/gcc/config/rs6000/8540.md index 3ed69d17e538..737c39958978 100644 --- a/gcc/config/rs6000/8540.md +++ b/gcc/config/rs6000/8540.md @@ -85,7 +85,7 @@ ;; Simple SU insns (define_insn_reservation "ppc8540_su" 1 - (and (eq_attr "type" "integer,cmp,compare,delayed_compare,fast_compare") + (and (eq_attr "type" "integer,insert_word,cmp,compare,delayed_compare,fast_compare") (eq_attr "cpu" "ppc8540")) "ppc8540_decode,ppc8540_issue+ppc8540_su_stage0+ppc8540_retire") diff --git a/gcc/config/rs6000/mpc.md b/gcc/config/rs6000/mpc.md index a97b2b8ac4ab..b95bba5c33a0 100644 --- a/gcc/config/rs6000/mpc.md +++ b/gcc/config/rs6000/mpc.md @@ -42,7 +42,7 @@ "lsu_mpc") (define_insn_reservation "mpccore-integer" 1 - (and (eq_attr "type" "integer") + (and (eq_attr "type" "integer,insert_word") (eq_attr "cpu" "mpccore")) "iu_mpc") diff --git a/gcc/config/rs6000/power4.md b/gcc/config/rs6000/power4.md index b6af77bc0dbd..e19df2ddade1 100644 --- a/gcc/config/rs6000/power4.md +++ b/gcc/config/rs6000/power4.md @@ -183,6 +183,13 @@ (eq_attr "cpu" "power4")) "iq_power4") +(define_insn_reservation "power4-insert" 4 + (and (eq_attr "type" "insert_word") + (eq_attr "cpu" "power4")) + "(du1_power4+du2_power4,iu1_power4,nothing,iu2_power4)\ + |(du2_power4+du3_power4,iu2_power4,nothing,iu2_power4)\ + |(du3_power4+du4_power4,iu2_power4,nothing,iu1_power4)") + (define_insn_reservation "power4-cmp" 3 (and (eq_attr "type" "cmp,fast_compare") (eq_attr "cpu" "power4")) diff --git a/gcc/config/rs6000/rios1.md b/gcc/config/rs6000/rios1.md index 5d370b036ef5..5e77a67fe2c9 100644 --- a/gcc/config/rs6000/rios1.md +++ b/gcc/config/rs6000/rios1.md @@ -51,7 +51,7 @@ "iu_rios1+fpu_rios1") (define_insn_reservation "rios1-integer" 1 - (and (eq_attr "type" "integer") + (and (eq_attr "type" "integer,insert_word") (eq_attr "cpu" "rios1,ppc601")) "iu_rios1") diff --git a/gcc/config/rs6000/rios2.md b/gcc/config/rs6000/rios2.md index 219127f641cb..36690acf06e7 100644 --- a/gcc/config/rs6000/rios2.md +++ b/gcc/config/rs6000/rios2.md @@ -39,7 +39,7 @@ "iu1_rios2|iu2_rios2") (define_insn_reservation "rios2-integer" 1 - (and (eq_attr "type" "integer") + (and (eq_attr "type" "integer,insert_word") (eq_attr "cpu" "rios2")) "iu1_rios2|iu2_rios2") diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 68d0e964ace2..1fa2ede8851d 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -13055,7 +13055,8 @@ rs6000_variable_issue (stream, verbose, insn, more) || type == TYPE_LOAD_EXT || type == TYPE_DELAYED_CR || type == TYPE_COMPARE || type == TYPE_DELAYED_COMPARE || type == TYPE_IMUL_COMPARE || type == TYPE_LMUL_COMPARE - || type == TYPE_IDIV || type == TYPE_LDIV) + || type == TYPE_IDIV || type == TYPE_LDIV + || type == TYPE_INSERT_WORD) return more > 2 ? more - 2 : 0; } diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index fc4d2a762857..ef98de053320 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -62,7 +62,7 @@ ;; Define an insn type attribute. This is used in function unit delay ;; computations. -(define_attr "type" "integer,load,load_ext,load_ext_u,load_ext_ux,load_ux,load_u,store,store_ux,store_u,fpload,fpload_ux,fpload_u,fpstore,fpstore_ux,fpstore_u,vecload,vecstore,imul,imul2,imul3,lmul,idiv,ldiv,branch,cmp,fast_compare,compare,delayed_compare,imul_compare,lmul_compare,fpcompare,cr_logical,delayed_cr,mfcr,mtcr,mfjmpr,mtjmpr,fp,fpsimple,dmul,sdiv,ddiv,ssqrt,dsqrt,jmpreg,brinc,vecsimple,veccomplex,vecdiv,veccmp,veccmpsimple,vecperm,vecfloat,vecfdiv" +(define_attr "type" "integer,load,load_ext,load_ext_u,load_ext_ux,load_ux,load_u,store,store_ux,store_u,fpload,fpload_ux,fpload_u,fpstore,fpstore_ux,fpstore_u,vecload,vecstore,imul,imul2,imul3,lmul,idiv,ldiv,insert_word,branch,cmp,fast_compare,compare,delayed_compare,imul_compare,lmul_compare,fpcompare,cr_logical,delayed_cr,mfcr,mtcr,mfjmpr,mtjmpr,fp,fpsimple,dmul,sdiv,ddiv,ssqrt,dsqrt,jmpreg,brinc,vecsimple,veccomplex,vecdiv,veccmp,veccmpsimple,vecperm,vecfloat,vecfdiv" (const_string "integer")) ;; Length (in bytes). @@ -2951,7 +2951,8 @@ operands[4] = GEN_INT (32 - start - size); operands[1] = GEN_INT (start + size - 1); return \"{rlimi|rlwimi} %0,%3,%h4,%h2,%h1\"; -}") +}" + [(set_attr "type" "insert_word")]) (define_insn "*insvsi_internal1" [(set (zero_extract:SI (match_operand:SI 0 "gpc_reg_operand" "+r") @@ -2969,7 +2970,8 @@ operands[4] = GEN_INT (shift - start - size); operands[1] = GEN_INT (start + size - 1); return \"{rlimi|rlwimi} %0,%3,%h4,%h2,%h1\"; -}") +}" + [(set_attr "type" "insert_word")]) (define_insn "*insvsi_internal2" [(set (zero_extract:SI (match_operand:SI 0 "gpc_reg_operand" "+r") @@ -2987,7 +2989,8 @@ operands[4] = GEN_INT (32 - shift - start - size); operands[1] = GEN_INT (start + size - 1); return \"{rlimi|rlwimi} %0,%3,%h4,%h2,%h1\"; -}") +}" + [(set_attr "type" "insert_word")]) (define_insn "*insvsi_internal3" [(set (zero_extract:SI (match_operand:SI 0 "gpc_reg_operand" "+r") @@ -3005,7 +3008,8 @@ operands[4] = GEN_INT (32 - shift - start - size); operands[1] = GEN_INT (start + size - 1); return \"{rlimi|rlwimi} %0,%3,%h4,%h2,%h1\"; -}") +}" + [(set_attr "type" "insert_word")]) (define_insn "*insvsi_internal4" [(set (zero_extract:SI (match_operand:SI 0 "gpc_reg_operand" "+r") @@ -3026,7 +3030,8 @@ operands[5] = GEN_INT (extract_start + extract_size - insert_start - insert_size); operands[1] = GEN_INT (insert_start + insert_size - 1); return \"{rlimi|rlwimi} %0,%3,%h5,%h2,%h1\"; -}") +}" + [(set_attr "type" "insert_word")]) (define_insn "insvdi" [(set (zero_extract:DI (match_operand:DI 0 "gpc_reg_operand" "+r") diff --git a/gcc/config/rs6000/rs64.md b/gcc/config/rs6000/rs64.md index 3de2bddcee04..4d9987523f46 100644 --- a/gcc/config/rs6000/rs64.md +++ b/gcc/config/rs6000/rs64.md @@ -42,7 +42,7 @@ "lsu_rs64") (define_insn_reservation "rs64a-integer" 1 - (and (eq_attr "type" "integer") + (and (eq_attr "type" "integer,insert_word") (eq_attr "cpu" "rs64a")) "iu_rs64")