1169689Skan;; R4600 and R4650 pipeline description.
2169689Skan;;   Copyright (C) 2004, 2005 Free Software Foundation, Inc.
3169689Skan;;
4169689Skan;; This file is part of GCC.
5169689Skan
6169689Skan;; GCC is free software; you can redistribute it and/or modify it
7169689Skan;; under the terms of the GNU General Public License as published
8169689Skan;; by the Free Software Foundation; either version 2, or (at your
9169689Skan;; option) any later version.
10169689Skan
11169689Skan;; GCC is distributed in the hope that it will be useful, but WITHOUT
12169689Skan;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13169689Skan;; or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
14169689Skan;; License for more details.
15169689Skan
16169689Skan;; You should have received a copy of the GNU General Public License
17169689Skan;; along with GCC; see the file COPYING.  If not, write to the
18169689Skan;; Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
19169689Skan;; MA 02110-1301, USA.
20169689Skan
21169689Skan
22169689Skan;; This file overrides parts of generic.md.  It is derived from the
23169689Skan;; old define_function_unit description.
24169689Skan;;
25169689Skan;; We handle the R4600 and R4650 in much the same way.  The only difference
26169689Skan;; is in the integer multiplication and division costs.
27169689Skan
28169689Skan(define_insn_reservation "r4600_imul" 10
29169689Skan  (and (eq_attr "cpu" "r4600")
30169689Skan       (eq_attr "type" "imul,imul3,imadd"))
31169689Skan  "imuldiv*10")
32169689Skan
33169689Skan(define_insn_reservation "r4600_idiv" 42
34169689Skan  (and (eq_attr "cpu" "r4600")
35169689Skan       (eq_attr "type" "idiv"))
36169689Skan  "imuldiv*42")
37169689Skan
38169689Skan
39169689Skan(define_insn_reservation "r4650_imul" 4
40169689Skan  (and (eq_attr "cpu" "r4650")
41169689Skan       (eq_attr "type" "imul,imul3,imadd"))
42169689Skan  "imuldiv*4")
43169689Skan
44169689Skan(define_insn_reservation "r4650_idiv" 36
45169689Skan  (and (eq_attr "cpu" "r4650")
46169689Skan       (eq_attr "type" "idiv"))
47169689Skan  "imuldiv*36")
48169689Skan
49169689Skan
50169689Skan(define_insn_reservation "r4600_load" 2
51169689Skan  (and (eq_attr "cpu" "r4600,r4650")
52169689Skan       (eq_attr "type" "load,fpload,fpidxload"))
53169689Skan  "alu")
54169689Skan
55169689Skan(define_insn_reservation "r4600_fmove" 1
56169689Skan  (and (eq_attr "cpu" "r4600,r4650")
57169689Skan       (eq_attr "type" "fabs,fneg,fmove"))
58169689Skan  "alu")
59169689Skan
60169689Skan(define_insn_reservation "r4600_fmul_single" 8
61169689Skan  (and (eq_attr "cpu" "r4600,r4650")
62169689Skan       (and (eq_attr "type" "fmul,fmadd")
63169689Skan	    (eq_attr "mode" "SF")))
64169689Skan  "alu")
65169689Skan
66169689Skan(define_insn_reservation "r4600_fdiv_single" 32
67169689Skan  (and (eq_attr "cpu" "r4600,r4650")
68169689Skan       (and (eq_attr "type" "fdiv,frdiv")
69169689Skan	    (eq_attr "mode" "SF")))
70169689Skan  "alu")
71169689Skan
72169689Skan(define_insn_reservation "r4600_fdiv_double" 61
73169689Skan  (and (eq_attr "cpu" "r4600,r4650")
74169689Skan       (and (eq_attr "type" "fdiv,frdiv")
75169689Skan	    (eq_attr "mode" "DF")))
76169689Skan  "alu")
77169689Skan
78169689Skan(define_insn_reservation "r4600_fsqrt_single" 31
79169689Skan  (and (eq_attr "cpu" "r4600,r4650")
80169689Skan       (and (eq_attr "type" "fsqrt,frsqrt")
81169689Skan	    (eq_attr "mode" "SF")))
82169689Skan  "alu")
83169689Skan
84169689Skan(define_insn_reservation "r4600_fsqrt_double" 60
85169689Skan  (and (eq_attr "cpu" "r4600,r4650")
86169689Skan       (and (eq_attr "type" "fsqrt,frsqrt")
87169689Skan	    (eq_attr "mode" "DF")))
88169689Skan  "alu")
89