4600.md revision 1.1.1.1
1234287Sdim;; R4600 and R4650 pipeline description.
2234287Sdim;;   Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
3234287Sdim;;
4234287Sdim;; This file is part of GCC.
5234287Sdim
6234287Sdim;; GCC is free software; you can redistribute it and/or modify it
7234287Sdim;; under the terms of the GNU General Public License as published
8234287Sdim;; by the Free Software Foundation; either version 3, or (at your
9234287Sdim;; option) any later version.
10234287Sdim
11234287Sdim;; GCC is distributed in the hope that it will be useful, but WITHOUT
12234287Sdim;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13234287Sdim;; or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
14234287Sdim;; License for more details.
15234287Sdim
16234287Sdim;; You should have received a copy of the GNU General Public License
17234287Sdim;; along with GCC; see the file COPYING3.  If not see
18234287Sdim;; <http://www.gnu.org/licenses/>.
19249423Sdim
20234287Sdim
21234287Sdim;; This file overrides parts of generic.md.  It is derived from the
22249423Sdim;; old define_function_unit description.
23234287Sdim;;
24234287Sdim;; We handle the R4600 and R4650 in much the same way.  The only difference
25234287Sdim;; is in the integer multiplication and division costs.
26234287Sdim
27234287Sdim(define_insn_reservation "r4600_imul" 10
28234287Sdim  (and (eq_attr "cpu" "r4600")
29234287Sdim       (eq_attr "type" "imul,imul3,imadd"))
30234287Sdim  "imuldiv*10")
31234287Sdim
32234287Sdim(define_insn_reservation "r4600_idiv" 42
33234287Sdim  (and (eq_attr "cpu" "r4600")
34276479Sdim       (eq_attr "type" "idiv"))
35234287Sdim  "imuldiv*42")
36234287Sdim
37234287Sdim
38234287Sdim(define_insn_reservation "r4650_imul" 4
39234287Sdim  (and (eq_attr "cpu" "r4650")
40234287Sdim       (eq_attr "type" "imul,imul3,imadd"))
41234287Sdim  "imuldiv*4")
42234287Sdim
43234287Sdim(define_insn_reservation "r4650_idiv" 36
44234287Sdim  (and (eq_attr "cpu" "r4650")
45234287Sdim       (eq_attr "type" "idiv"))
46234287Sdim  "imuldiv*36")
47234287Sdim
48234287Sdim
49234287Sdim(define_insn_reservation "r4600_load" 2
50234287Sdim  (and (eq_attr "cpu" "r4600,r4650")
51234287Sdim       (eq_attr "type" "load,fpload,fpidxload"))
52234287Sdim  "alu")
53234287Sdim
54234287Sdim(define_insn_reservation "r4600_fmove" 1
55234287Sdim  (and (eq_attr "cpu" "r4600,r4650")
56234287Sdim       (eq_attr "type" "fabs,fneg,fmove"))
57234287Sdim  "alu")
58234287Sdim
59234287Sdim(define_insn_reservation "r4600_fmul_single" 8
60234287Sdim  (and (eq_attr "cpu" "r4600,r4650")
61243830Sdim       (and (eq_attr "type" "fmul,fmadd")
62243830Sdim	    (eq_attr "mode" "SF")))
63234287Sdim  "alu")
64234287Sdim
65234287Sdim(define_insn_reservation "r4600_fdiv_single" 32
66234287Sdim  (and (eq_attr "cpu" "r4600,r4650")
67234287Sdim       (and (eq_attr "type" "fdiv,frdiv")
68234287Sdim	    (eq_attr "mode" "SF")))
69234287Sdim  "alu")
70234287Sdim
71234287Sdim(define_insn_reservation "r4600_fdiv_double" 61
72234287Sdim  (and (eq_attr "cpu" "r4600,r4650")
73234287Sdim       (and (eq_attr "type" "fdiv,frdiv")
74234287Sdim	    (eq_attr "mode" "DF")))
75234287Sdim  "alu")
76234287Sdim
77234287Sdim(define_insn_reservation "r4600_fsqrt_single" 31
78234287Sdim  (and (eq_attr "cpu" "r4600,r4650")
79234287Sdim       (and (eq_attr "type" "fsqrt,frsqrt")
80234287Sdim	    (eq_attr "mode" "SF")))
81234287Sdim  "alu")
82234287Sdim
83234287Sdim(define_insn_reservation "r4600_fsqrt_double" 60
84234287Sdim  (and (eq_attr "cpu" "r4600,r4650")
85276479Sdim       (and (eq_attr "type" "fsqrt,frsqrt")
86276479Sdim	    (eq_attr "mode" "DF")))
87234287Sdim  "alu")
88234287Sdim