rs6000.md (define_attr "type"): Add mfjmpr.
authorDavid Edelsohn <edelsohn@gnu.org>
Thu, 1 May 2003 17:05:18 +0000 (17:05 +0000)
committerDavid Edelsohn <dje@gcc.gnu.org>
Thu, 1 May 2003 17:05:18 +0000 (13:05 -0400)
        * config/rs6000/rs6000.md (define_attr "type"): Add mfjmpr.
        (movsi_internal1): Use new mfjmpr attribute.
        (movhi_internal): Same.
        (movqi_internal): Same.
        (movcc_internal1): Same.
        (movdi_internal64): Same.
        * config/rs6000/{40x.md,603.md,6xx.md,7450.md,7xx.md,mpc.md,
        power4.md,rios1.md,rios2.md,rs64.md}: Add mfjmpr.
        * config/rs6000/40x.md: Add fpu_405.
        * config/rs6000/power4.md: Merge power4lsu and power4disp automata
        into power4misc automata.  Remove extraneous parentheses.
        * config/rs6000/440.md: New file.
        * config/rs6000/rs6000.c (processor_target_table): Add 440,
        440fp.  Rename 405f to 405fp.
        (function_arg_padding): Correct formatting.
        (rs6000_rtx_costs): Add PROCESSOR_PPC440 cases.

From-SVN: r66336

15 files changed:
gcc/ChangeLog
gcc/config/rs6000/40x.md
gcc/config/rs6000/440.md [new file with mode: 0644]
gcc/config/rs6000/603.md
gcc/config/rs6000/6xx.md
gcc/config/rs6000/7450.md
gcc/config/rs6000/7xx.md
gcc/config/rs6000/8540.md
gcc/config/rs6000/mpc.md
gcc/config/rs6000/power4.md
gcc/config/rs6000/rios1.md
gcc/config/rs6000/rios2.md
gcc/config/rs6000/rs6000.c
gcc/config/rs6000/rs6000.md
gcc/config/rs6000/rs64.md

index e2148345cd2dfb9ced15a5f56d3f516f6560ae91..9e779770d12553b946c8513ae88c45460f0dfbe5 100644 (file)
@@ -1,3 +1,22 @@
+2003-05-01  David Edelsohn  <edelsohn@gnu.org>
+
+       * config/rs6000/rs6000.md (define_attr "type"): Add mfjmpr.
+       (movsi_internal1): Use new mfjmpr attribute.
+       (movhi_internal): Same.
+       (movqi_internal): Same.
+       (movcc_internal1): Same.
+       (movdi_internal64): Same.
+       * config/rs6000/{40x.md,603.md,6xx.md,7450.md,7xx.md,mpc.md,
+       power4.md,rios1.md,rios2.md,rs64.md}: Add mfjmpr.
+       * config/rs6000/40x.md: Add fpu_405.
+       * config/rs6000/power4.md: Merge power4lsu and power4disp automata
+       into power4misc automata.  Remove extraneous parentheses.
+       * config/rs6000/440.md: New file.
+       * config/rs6000/rs6000.c (processor_target_table): Add 440,
+       440fp.  Rename 405f to 405fp.
+       (function_arg_padding): Correct formatting.
+       (rs6000_rtx_costs): Add PROCESSOR_PPC440 cases.
+
 2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>
 
        * input.h (lineno): Rename to ...
index b809a9f1439da23c22c3623cdb06f075d11eeaed..bc42e396d1f594ed09cb9b8a91925a8fd7c92cbf 100644 (file)
@@ -19,7 +19,7 @@
 ;; MA 02111-1307, USA.
 
 (define_automaton "ppc40x")
-(define_cpu_unit "iu_40x,bpu_40x" "ppc40x")
+(define_cpu_unit "iu_40x,bpu_40x,fpu_405" "ppc40x")
 
 ;; PPC401 / PPC403 / PPC405 32-bit integer only  IU BPU
 ;; Embedded PowerPC controller
   "iu_40x*33")
 
 (define_insn_reservation "ppc403-mfcr" 2
-  (and (eq_attr "type" "mfcr,mtcr")
+  (and (eq_attr "type" "mfcr")
+       (eq_attr "cpu" "ppc403,ppc405"))
+  "iu_40x")
+
+(define_insn_reservation "ppc403-mtcr" 3
+  (and (eq_attr "type" "mtcr")
        (eq_attr "cpu" "ppc403,ppc405"))
   "iu_40x")
 
 (define_insn_reservation "ppc403-mtjmpr" 4
   (and (eq_attr "type" "mtjmpr")
        (eq_attr "cpu" "ppc403,ppc405"))
-  "bpu_40x")
+  "iu_40x")
+
+(define_insn_reservation "ppc403-mfjmpr" 2
+  (and (eq_attr "type" "mfjmpr")
+       (eq_attr "cpu" "ppc403,ppc405"))
+  "iu_40x")
 
 (define_insn_reservation "ppc403-jmpreg" 1
-  (and (eq_attr "type" "jmpreg,branch,cr_logical,delayed_cr")
+  (and (eq_attr "type" "jmpreg,branch")
+       (eq_attr "cpu" "ppc403,ppc405"))
+  "bpu_40x")
+
+(define_insn_reservation "ppc403-cr" 2
+  (and (eq_attr "type" "cr_logical,delayed_cr")
        (eq_attr "cpu" "ppc403,ppc405"))
   "bpu_40x")
 
+(define_insn_reservation "ppc405-float" 11
+  (and (eq_attr "type" "fpload,fpload_ux,fpload_u,fpstore,fpstore_ux,fpstore_u,fpcompare,fp,dmul,sdiv,ddiv")
+       (eq_attr "cpu" "ppc405"))
+  "fpu_405*10")
+
diff --git a/gcc/config/rs6000/440.md b/gcc/config/rs6000/440.md
new file mode 100644 (file)
index 0000000..92ce3fe
--- /dev/null
@@ -0,0 +1,120 @@
+;; Scheduling description for IBM PowerPC 440 processor.
+;;   Copyright (C) 2003 Free Software Foundation, Inc.
+;;
+;; This file is part of GNU CC.
+;;
+;; GNU CC is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+;;
+;; GNU CC is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with GNU CC; see the file COPYING.  If not, write to
+;; the Free Software Foundation, 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;; PPC440 Embedded PowerPC controller
+;; dual issue
+;; i_pipe - complex integer / compare / branch
+;; j_pipe - simple integer arithmetic
+;; l_pipe - load-store
+;; f_pipe - floating point arithmetic
+
+(define_automaton "ppc440_core,ppc440_apu")
+(define_cpu_unit "ppc440_i_pipe,ppc440_j_pipe,ppc440_l_pipe" "ppc440_core")
+(define_cpu_unit "ppc440_f_pipe" "ppc440_apu")
+(define_cpu_unit "ppc440_issue_0,ppc440_issue_1" "ppc440_core")
+
+(define_reservation "ppc440_issue" "ppc440_issue_0|ppc440_issue_1")
+
+
+(define_insn_reservation "ppc440-load" 3
+  (and (eq_attr "type" "load,load_ext,load_ext_u,load_ext_ux,load_ux,load_u")
+       (eq_attr "cpu" "ppc440"))
+  "ppc440_issue,ppc440_l_pipe")
+
+(define_insn_reservation "ppc440-store" 1
+  (and (eq_attr "type" "store,store_ux,store_u")
+       (eq_attr "cpu" "ppc440"))
+  "ppc440_issue,ppc440_l_pipe")
+
+(define_insn_reservation "ppc440-fpload" 4
+  (and (eq_attr "type" "fpload,fpload_ux,fpload_u")
+       (eq_attr "cpu" "ppc440"))
+  "ppc440_issue,ppc440_l_pipe")
+
+(define_insn_reservation "ppc440-fpstore" 3
+  (and (eq_attr "type" "fpstore,fpstore_ux,fpstore_u")
+       (eq_attr "cpu" "ppc440"))
+  "ppc440_issue,ppc440_l_pipe")
+
+(define_insn_reservation "ppc440-integer" 1
+  (and (eq_attr "type" "integer")
+       (eq_attr "cpu" "ppc440"))
+  "ppc440_issue,ppc440_i_pipe|ppc440_j_pipe")
+
+(define_insn_reservation "ppc440-imul" 3
+  (and (eq_attr "type" "imul,imul_compare")
+       (eq_attr "cpu" "ppc440"))
+  "ppc440_issue,ppc440_i_pipe")
+
+(define_insn_reservation "ppc440-imul2" 2
+  (and (eq_attr "type" "imul2,imul3")
+       (eq_attr "cpu" "ppc440"))
+  "ppc440_issue,ppc440_i_pipe")
+
+(define_insn_reservation "ppc440-idiv" 34
+  (and (eq_attr "type" "idiv")
+       (eq_attr "cpu" "ppc440"))
+  "ppc440_issue,ppc440_i_pipe*33")
+
+(define_insn_reservation "ppc440-branch" 1
+  (and (eq_attr "type" "branch,jmpreg")
+       (eq_attr "cpu" "ppc440"))
+  "ppc440_issue,ppc440_i_pipe")
+
+(define_insn_reservation "ppc440-compare" 2
+  (and (eq_attr "type" "cmp,fast_compare,compare,cr_logical,delayed_cr,mfcr")
+       (eq_attr "cpu" "ppc440"))
+  "ppc440_issue,ppc440_i_pipe")
+
+(define_insn_reservation "ppc440-fpcompare" 3 ; 2
+  (and (eq_attr "type" "fpcompare")
+       (eq_attr "cpu" "ppc440"))
+  "ppc440_issue,ppc440_f_pipe+ppc440_i_pipe")
+
+(define_insn_reservation "ppc440-fp" 5
+  (and (eq_attr "type" "fp,dmul")
+       (eq_attr "cpu" "ppc440"))
+  "ppc440_issue,ppc440_f_pipe")
+
+(define_insn_reservation "ppc440-sdiv" 19
+  (and (eq_attr "type" "sdiv")
+       (eq_attr "cpu" "ppc440"))
+  "ppc440_issue,ppc440_f_pipe*15")
+
+(define_insn_reservation "ppc440-ddiv" 33
+  (and (eq_attr "type" "ddiv")
+       (eq_attr "cpu" "ppc440"))
+  "ppc440_issue,ppc440_f_pipe*29")
+
+(define_insn_reservation "ppc440-mtcr" 3
+  (and (eq_attr "type" "mtcr")
+       (eq_attr "cpu" "ppc440"))
+  "ppc440_issue,ppc440_i_pipe")
+
+(define_insn_reservation "ppc440-mtjmpr" 4
+  (and (eq_attr "type" "mtjmpr")
+       (eq_attr "cpu" "ppc440"))
+  "ppc440_issue,ppc440_i_pipe")
+
+(define_insn_reservation "ppc440-mfjmpr" 2
+  (and (eq_attr "type" "mfjmpr")
+       (eq_attr "cpu" "ppc440"))
+  "ppc440_issue,ppc440_i_pipe")
+
index 873bc7a71e38584b63df2eb9c3d1996aa5ea12dd..7605c69024db3b256a5020f730c15017c10ac9ca 100644 (file)
        (eq_attr "cpu" "ppc603"))
   "fpu_603*33")
 
-(define_insn_reservation "ppc603-mtcr" 2
-  (and (eq_attr "type" "mtcr")
+(define_insn_reservation "ppc603-crlogical" 2
+  (and (eq_attr "type" "cr_logical,delayed_cr,mfcr,mtcr")
        (eq_attr "cpu" "ppc603"))
   "sru_603")
 
-(define_insn_reservation "ppc603-crlogical" 1
-  (and (eq_attr "type" "cr_logical,delayed_cr,mfcr")
+(define_insn_reservation "ppc603-mtjmpr" 4
+  (and (eq_attr "type" "mtjmpr")
        (eq_attr "cpu" "ppc603"))
   "sru_603")
 
-(define_insn_reservation "ppc603-mtjmpr" 4
-  (and (eq_attr "type" "mtjmpr")
+(define_insn_reservation "ppc603-mfjmpr" 2
+  (and (eq_attr "type" "mfjmpr")
        (eq_attr "cpu" "ppc603"))
-  "bpu_603")
+  "sru_603")
 
 (define_insn_reservation "ppc603-jmpreg" 1
   (and (eq_attr "type" "jmpreg,branch")
index ac53a089045c11592f08ae98b4808cb884248cf7..6ad7c73e5d24bf3681fc9cdef24c9b8539e6a43f 100644 (file)
 (define_insn_reservation "ppc630-fpcompare" 5
   (and (eq_attr "type" "fpcompare")
        (eq_attr "cpu" "ppc630"))
-  "(fpu1_6xx|fpu2_6xx)")
+  "fpu1_6xx|fpu2_6xx")
 
 (define_insn_reservation "ppc630-fp" 3
   (and (eq_attr "type" "fp,dmul")
 (define_insn_reservation "ppc604-mtcr" 2
   (and (eq_attr "type" "mtcr")
        (eq_attr "cpu" "ppc604,ppc604e,ppc620,ppc630"))
-  "mciu_6xx")
+  "iu1_6xx|iu2_6xx")
 
-(define_insn_reservation "ppc604-crlogical" 1
+(define_insn_reservation "ppc604-crlogical" 2
   (and (eq_attr "type" "cr_logical,delayed_cr")
        (eq_attr "cpu" "ppc604"))
   "bpu_6xx")
 
-(define_insn_reservation "ppc604e-crlogical" 1
+(define_insn_reservation "ppc604e-crlogical" 2
   (and (eq_attr "type" "cr_logical,delayed_cr")
        (eq_attr "cpu" "ppc604e,ppc620,ppc630"))
   "cru_6xx")
 
-(define_insn_reservation "ppc604-mtjmpr" 4
+(define_insn_reservation "ppc604-mtjmpr" 2
   (and (eq_attr "type" "mtjmpr")
        (eq_attr "cpu" "ppc604,ppc604e,ppc620,ppc630"))
-  "bpu_6xx")
+  "mciu_6xx")
+
+(define_insn_reservation "ppc604-mfjmpr" 3
+  (and (eq_attr "type" "mfjmpr")
+       (eq_attr "cpu" "ppc604,ppc604e,ppc620"))
+  "mciu_6xx")
+
+(define_insn_reservation "ppc630-mfjmpr" 2
+  (and (eq_attr "type" "mfjmpr")
+       (eq_attr "cpu" "ppc630"))
+  "mciu_6xx")
 
 (define_insn_reservation "ppc604-jmpreg" 1
   (and (eq_attr "type" "jmpreg,branch")
index 668fd06bd07ba1ec5e95c6cc00f52337bbb457a4..5b5168233aceeac74b984817a339ef3aa0b93729 100644 (file)
        (eq_attr "cpu" "ppc7450"))
   "nothing,mciu_7450*2")
 
+(define_insn_reservation "ppc7450-mfjmpr" 3
+  (and (eq_attr "type" "mfjmpr")
+       (eq_attr "cpu" "ppc7450"))
+  "nothing,mciu_7450*2")
+
 (define_insn_reservation "ppc7450-jmpreg" 1
   (and (eq_attr "type" "jmpreg,branch")
        (eq_attr "cpu" "ppc7450"))
index 8ec84ce049504bb58867b62e7784d5a6a4f698f4..2da9ba538f8f21959868e83ce2b103812a2b4dad 100644 (file)
        (eq_attr "cpu" "ppc750,ppc7400"))
   "nothing,sru_7xx*2")
 
+(define_insn_reservation "ppc750-mfjmpr" 3
+  (and (eq_attr "type" "mfjmpr")
+       (eq_attr "cpu" "ppc750,ppc7400"))
+  "nothing,sru_7xx*2")
+
 (define_insn_reservation "ppc750-jmpreg" 1
   (and (eq_attr "type" "jmpreg,branch")
        (eq_attr "cpu" "ppc750,ppc7400"))
index ce3dd333c79efbc312f67aa06f990a93c11c689c..3ed69d17e538aef766a10ba4c28a2511a17a1ff2 100644 (file)
 
 ;; Mtjmpr
 (define_insn_reservation "ppc8540_mtjmpr" 1
-  (and (eq_attr "type" "mtjmpr")
+  (and (eq_attr "type" "mtjmpr,mfjmpr")
        (eq_attr "cpu" "ppc8540"))
   "ppc8540_decode,ppc8540_issue+ppc8540_su_stage0+ppc8540_retire")
 
index 57a6da03efe2e85ec638fe964505887057ab5826..a97b2b8ac4abcd4f35ce597f948f1424c1a733bc 100644 (file)
@@ -88,7 +88,7 @@
   "fpu_mpc*17")
 
 (define_insn_reservation "mpccore-mtjmpr" 4
-  (and (eq_attr "type" "mtjmpr")
+  (and (eq_attr "type" "mtjmpr,mfjmpr")
        (eq_attr "cpu" "mpccore"))
   "bpu_mpc")
 
index afb0cd8c1764704c6b67239541e04418efe2ac96..b6af77bc0dbd3b33c341caccba7e181687740313 100644 (file)
 ;; (split) or more internal ops.  The chip can issue up to 5
 ;; internal ops per cycle.
 
-(define_automaton "power4iu,power4lsu,power4fpu,power4misc,power4vec,power4disp")
+(define_automaton "power4iu,power4fpu,power4vec,power4misc")
 
 (define_cpu_unit "iu1_power4,iu2_power4" "power4iu")
-(define_cpu_unit "lsu1_power4,lsu2_power4" "power4lsu")
+(define_cpu_unit "lsu1_power4,lsu2_power4" "power4misc")
 (define_cpu_unit "fpu1_power4,fpu2_power4" "power4fpu")
 (define_cpu_unit "bpu_power4,cru_power4" "power4misc")
 (define_cpu_unit "vec_power4,vecperm_power4" "power4vec")
 (define_cpu_unit "du1_power4,du2_power4,du3_power4,du4_power4,du5_power4"
-                "power4disp")
+                "power4misc")
 
 (define_reservation "lsq_power4"
                    "(du1_power4,lsu1_power4)\
                    |(du4_power4,nothing,lsu1_power4)")
 
 (define_reservation "lsuq_power4"
-                   "((du1_power4+du2_power4),lsu1_power4+iu2_power4)\
-                   |((du2_power4+du3_power4),lsu2_power4+iu2_power4)\
-                   |((du3_power4+du4_power4),lsu2_power4+iu1_power4)")
-;                  |((du2_power4+du3_power4),nothing,lsu2_power4,iu2_power4)
+                   "(du1_power4+du2_power4,lsu1_power4+iu2_power4)\
+                   |(du2_power4+du3_power4,lsu2_power4+iu2_power4)\
+                   |(du3_power4+du4_power4,lsu2_power4+iu1_power4)")
+;                  |(du2_power4+du3_power4,nothing,lsu2_power4,iu2_power4)
 
 (define_reservation "iq_power4"
                    "(du1_power4,iu1_power4)\
 (define_insn_reservation "power4-load-ext-update" 5
   (and (eq_attr "type" "load_ext_u")
        (eq_attr "cpu" "power4"))
-  "(du1_power4+du2_power4+du3_power4+du4_power4),\
-   (lsu1_power4+iu2_power4),nothing,nothing,iu2_power4")
+  "du1_power4+du2_power4+du3_power4+du4_power4,\
+   lsu1_power4+iu2_power4,nothing,nothing,iu2_power4")
 
 (define_insn_reservation "power4-load-ext-update-indexed" 5
   (and (eq_attr "type" "load_ext_ux")
        (eq_attr "cpu" "power4"))
-  "(du1_power4+du2_power4+du3_power4+du4_power4),\
+  "du1_power4+du2_power4+du3_power4+du4_power4,\
    iu1_power4,lsu2_power4+iu1_power4,nothing,nothing,iu2_power4")
 
 (define_insn_reservation "power4-load-update-indexed" 3
   (and (eq_attr "type" "load_ux")
        (eq_attr "cpu" "power4"))
-   "du1_power4+du2_power4+du3_power4+du4_power4,\
+  "du1_power4+du2_power4+du3_power4+du4_power4,\
    iu1_power4,lsu2_power4+iu2_power4")
 
 (define_insn_reservation "power4-load-update" 4 ; 3
 (define_insn_reservation "power4-idiv" 36
   (and (eq_attr "type" "idiv")
        (eq_attr "cpu" "power4"))
-  "(du1_power4+du2_power4),iu2_power4*35")
+  "du1_power4+du2_power4,iu2_power4*35")
 
 (define_insn_reservation "power4-ldiv" 68
   (and (eq_attr "type" "ldiv")
        (eq_attr "cpu" "power4"))
-  "(du1_power4+du2_power4),iu2_power4*67")
+  "du1_power4+du2_power4,iu2_power4*67")
 
 
 (define_insn_reservation "power4-mtjmpr" 3
-  (and (eq_attr "type" "mtjmpr")
+  (and (eq_attr "type" "mtjmpr,mfjmpr")
        (eq_attr "cpu" "power4"))
   "du1_power4,bpu_power4")
 
 (define_insn_reservation "power4-delayedcr" 4
   (and (eq_attr "type" "delayed_cr")
        (eq_attr "cpu" "power4"))
-  "(du1_power4+du2_power4),cru_power4,cru_power4")
+  "du1_power4+du2_power4,cru_power4,cru_power4")
 
 ; 4 mfcrf (each 3 cyc, 1/cyc) + 3 fxu
 (define_insn_reservation "power4-mfcr" 6
   (and (eq_attr "type" "mfcr")
        (eq_attr "cpu" "power4"))
-  "(du1_power4+du2_power4+du3_power4+du4_power4),\
-   (du1_power4+du2_power4+du3_power4+du4_power4+cru_power4),\
-    cru_power4,cru_power4,cru_power4")
+  "du1_power4+du2_power4+du3_power4+du4_power4,\
+   du1_power4+du2_power4+du3_power4+du4_power4+cru_power4,\
+   cru_power4,cru_power4,cru_power4")
 
 ; mtcrf (1 field)
 (define_insn_reservation "power4-mtcr" 4
index 467a291515ef85ec9880f3fbbd996ff3f2922382..5d370b036ef50a571ea9bd684028fe3be58ca477 100644 (file)
@@ -51,7 +51,7 @@
   "iu_rios1+fpu_rios1")
 
 (define_insn_reservation "rios1-integer" 1
-  (and (eq_attr "type" "integer,mfcr,mtcr")
+  (and (eq_attr "type" "integer")
        (eq_attr "cpu" "rios1,ppc601"))
   "iu_rios1")
 
        (eq_attr "cpu" "ppc601"))
   "fpu_rios1*31")
 
+(define_insn_reservation "rios1-mfcr" 2
+  (and (eq_attr "type" "mfcr")
+       (eq_attr "cpu" "rios1,ppc601"))
+  "iu_rios1,bpu_rios1")
+
+(define_insn_reservation "rios1-mtcr" 4
+  (and (eq_attr "type" "mtcr")
+       (eq_attr "cpu" "rios1,ppc601"))
+  "iu_rios1,bpu_rios1")
+
 (define_insn_reservation "rios1-crlogical" 4
   (and (eq_attr "type" "cr_logical,delayed_cr")
        (eq_attr "cpu" "rios1,ppc601"))
 (define_insn_reservation "rios1-mtjmpr" 5
   (and (eq_attr "type" "mtjmpr")
        (eq_attr "cpu" "rios1"))
-  "bpu_rios1")
+  "iu_rios1,bpu_rios1")
 
 (define_insn_reservation "ppc601-mtjmpr" 4
   (and (eq_attr "type" "mtjmpr")
        (eq_attr "cpu" "ppc601"))
-  "bpu_rios1")
+  "iu_rios1,bpu_rios1")
+
+(define_insn_reservation "rios1-mfjmpr" 2
+  (and (eq_attr "type" "mfjmpr")
+       (eq_attr "cpu" "rios1,ppc601"))
+  "iu_rios1,bpu_rios1")
 
 (define_insn_reservation "rios1-branch" 1
   (and (eq_attr "type" "jmpreg,branch")
index 58c5d4cec4394d500a0450b9d07857467afbd701..219127f641cbb3aa0cb4e432dc59dc67e6ad1f05 100644 (file)
@@ -39,7 +39,7 @@
   "iu1_rios2|iu2_rios2")
 
 (define_insn_reservation "rios2-integer" 1
-  (and (eq_attr "type" "integer,mfcr,mtcr")
+  (and (eq_attr "type" "integer")
        (eq_attr "cpu" "rios2"))
   "iu1_rios2|iu2_rios2")
 
        (eq_attr "cpu" "rios2"))
   "(fpu1_rios2*26)|(fpu2_rios2*26)")
 
-(define_insn_reservation "rios2-crlogical" 4
+(define_insn_reservation "rios2-mfcr" 2
+  (and (eq_attr "type" "mfcr")
+       (eq_attr "cpu" "rios2"))
+  "iu1_rios2,bpu_rios2")
+
+(define_insn_reservation "rios2-mtcr" 3
+  (and (eq_attr "type" "mtcr")
+       (eq_attr "cpu" "rios2"))
+  "iu1_rios2,bpu_rios2")
+
+(define_insn_reservation "rios2-crlogical" 3
   (and (eq_attr "type" "cr_logical,delayed_cr")
        (eq_attr "cpu" "rios2"))
   "bpu_rios2")
 (define_insn_reservation "rios2-mtjmpr" 5
   (and (eq_attr "type" "mtjmpr")
        (eq_attr "cpu" "rios2"))
-  "bpu_rios2")
+  "iu1_rios2,bpu_rios2")
+
+(define_insn_reservation "rios2-mfjmpr" 2
+  (and (eq_attr "type" "mfjmpr")
+       (eq_attr "cpu" "rios2"))
+  "iu1_rios2,bpu_rios2")
 
-(define_insn_reservation "rios2-jmpreg" 1
+(define_insn_reservation "rios2-branch" 1
   (and (eq_attr "type" "jmpreg,branch")
        (eq_attr "cpu" "rios2"))
   "bpu_rios2")
index a2186cfe94f5fd38995acb0a1da3ab83701dff05..43763fd7f57a4d78eb1bcf418a0e2a5377574c08 100644 (file)
@@ -527,7 +527,13 @@ rs6000_override_options (default_cpu)
         {"405", PROCESSOR_PPC405,
            MASK_POWERPC | MASK_SOFT_FLOAT | MASK_NEW_MNEMONICS,
            POWER_MASKS | POWERPC_OPT_MASKS | MASK_POWERPC64},
-        {"405f", PROCESSOR_PPC405,
+        {"405fp", PROCESSOR_PPC405,
+           MASK_POWERPC | MASK_NEW_MNEMONICS,
+           POWER_MASKS | POWERPC_OPT_MASKS | MASK_POWERPC64},
+        {"440", PROCESSOR_PPC440,
+           MASK_POWERPC | MASK_SOFT_FLOAT | MASK_NEW_MNEMONICS,
+           POWER_MASKS | POWERPC_OPT_MASKS | MASK_POWERPC64},
+        {"440fp", PROCESSOR_PPC440,
            MASK_POWERPC | MASK_NEW_MNEMONICS,
            POWER_MASKS | POWERPC_OPT_MASKS | MASK_POWERPC64},
         {"505", PROCESSOR_MPCCORE,
@@ -3175,12 +3181,12 @@ function_arg_padding (mode, type)
 
   /* This is the default definition.  */
   return (! BYTES_BIG_ENDIAN
-          ? upward
-          : ((mode == BLKmode
-              ? (type && TREE_CODE (TYPE_SIZE (type)) == INTEGER_CST
-                 && int_size_in_bytes (type) < (PARM_BOUNDARY / BITS_PER_UNIT))
-              : GET_MODE_BITSIZE (mode) < PARM_BOUNDARY)
-             ? downward : upward));
+         ? upward
+         : ((mode == BLKmode
+             ? (type && TREE_CODE (TYPE_SIZE (type)) == INTEGER_CST
+                && int_size_in_bytes (type) < (PARM_BOUNDARY / BITS_PER_UNIT))
+             : GET_MODE_BITSIZE (mode) < PARM_BOUNDARY)
+            ? downward : upward));
 }
 
 /* If defined, a C expression that gives the alignment boundary, in bits,
@@ -13664,6 +13670,12 @@ rs6000_rtx_costs (x, code, outer_code, total)
                    ? COSTS_N_INSNS (3) : COSTS_N_INSNS (4));
          return true;
 
+       case PROCESSOR_PPC440:
+         *total = (GET_CODE (XEXP (x, 1)) != CONST_INT
+                   ? COSTS_N_INSNS (3)
+                   : COSTS_N_INSNS (2));
+         return true;
+
        case PROCESSOR_RS64A:
          *total = (GET_CODE (XEXP (x, 1)) != CONST_INT
                    ? GET_MODE (XEXP (x, 1)) != DImode
@@ -13766,6 +13778,10 @@ rs6000_rtx_costs (x, code, outer_code, total)
          *total = COSTS_N_INSNS (35);
          return true;
 
+       case PROCESSOR_PPC440:
+         *total = COSTS_N_INSNS (34);
+         return true;
+
        case PROCESSOR_PPC601:
          *total = COSTS_N_INSNS (36);
          return true;
index 462eca9dd1e45d32ac180261d93f0e3cdfeb9445..625355282eabb2df60809f747cd9bbb8484612ef 100644 (file)
@@ -62,7 +62,7 @@
 \f
 ;; 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,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,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).
@@ -91,6 +91,7 @@
 (include "rs64.md")
 (include "mpc.md")
 (include "40x.md")
+(include "440.md")
 (include "603.md")
 (include "6xx.md")
 (include "7xx.md")
    mt%0 %1
    mt%0 %1
    {cror 0,0,0|nop}"
-  [(set_attr "type" "*,*,load,store,*,*,*,*,*,*,mtjmpr,*,*")
+  [(set_attr "type" "*,*,load,store,*,*,*,*,mfjmpr,*,mtjmpr,*,*")
    (set_attr "length" "4,4,4,4,4,4,8,4,4,4,4,4,4")])
 
 ;; Split a load of a large constant into the appropriate two-insn
    mt%0 %1
    mt%0 %1
    {cror 0,0,0|nop}"
-  [(set_attr "type" "*,load,store,*,*,*,mtjmpr,*")])
+  [(set_attr "type" "*,load,store,*,mfjmpr,*,mtjmpr,*")])
 
 (define_expand "movqi"
   [(set (match_operand:QI 0 "general_operand" "")
    mt%0 %1
    mt%0 %1
    {cror 0,0,0|nop}"
-  [(set_attr "type" "*,load,store,*,*,*,mtjmpr,*")])
+  [(set_attr "type" "*,load,store,*,mfjmpr,*,mtjmpr,*")])
 \f
 ;; Here is how to move condition codes around.  When we store CC data in
 ;; an integer register or memory, we store just the high-order 4 bits.
    mt%0 %1
    {l%U1%X1|lwz%U1%X1} %0,%1
    {st%U0%U1|stw%U0%U1} %1,%0"
-  [(set_attr "type" "cr_logical,mtcr,mtcr,mfcr,mfcr,*,*,*,mtjmpr,load,store")
+  [(set_attr "type" "cr_logical,mtcr,mtcr,mfcr,mfcr,*,mfjmpr,*,mtjmpr,load,store")
    (set_attr "length" "4,4,12,4,8,4,4,4,4,4,4")])
 \f
 ;; For floating-point, we normally deal with the floating-point registers
    mf%1 %0
    mt%0 %1
    {cror 0,0,0|nop}"
-  [(set_attr "type" "*,load,store,*,*,*,*,fp,fpload,fpstore,*,mtjmpr,*")
+  [(set_attr "type" "*,load,store,*,*,*,*,fp,fpload,fpstore,mfjmpr,mtjmpr,*")
    (set_attr "length" "4,4,4,4,4,20,4,4,4,4,4,4,4")])
 
 ;; immediate value valid for a single instruction hiding in a const_double
index 820022f24ae82cdf07fc7c3cd4573d875d93d27d..c1ef52a06278d7dc83e7854bff5183230613bf52 100644 (file)
 (define_insn_reservation "rs64a-mfcr" 2
   (and (eq_attr "type" "mfcr")
        (eq_attr "cpu" "rs64a"))
-  "mciu_rs64")
+  "lsu_rs64")
 
 (define_insn_reservation "rs64a-mtcr" 3
   (and (eq_attr "type" "mtcr")
        (eq_attr "cpu" "rs64a"))
-  "mciu_rs64")
+  "lsu_rs64")
 
-(define_insn_reservation "rs64a-mtjmpr" 5
+(define_insn_reservation "rs64a-mtjmpr" 3
   (and (eq_attr "type" "mtjmpr")
        (eq_attr "cpu" "rs64a"))
-  "bpu_rs64")
+  "lsu_rs64")
+
+(define_insn_reservation "rs64a-mfjmpr" 2
+  (and (eq_attr "type" "mfjmpr")
+       (eq_attr "cpu" "rs64a"))
+  "lsu_rs64")
 
 (define_insn_reservation "rs64a-jmpreg" 1
   (and (eq_attr "type" "jmpreg,branch,cr_logical,delayed_cr")