OSDN Git Service

Replace "GNU CC" with "GCC"
[pf3gnuchains/gcc-fork.git] / gcc / config / rs6000 / rios1.md
1 ;; Scheduling description for IBM POWER processor.
2 ;;   Copyright (C) 2003 Free Software Foundation, Inc.
3 ;;
4 ;; This file is part of GCC.
5
6 ;; GCC is free software; you can redistribute it and/or modify it
7 ;; under the terms of the GNU General Public License as published
8 ;; by the Free Software Foundation; either version 2, or (at your
9 ;; option) any later version.
10
11 ;; GCC is distributed in the hope that it will be useful, but WITHOUT
12 ;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 ;; or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
14 ;; License for more details.
15
16 ;; You should have received a copy of the GNU General Public License
17 ;; along with GCC; see the file COPYING.  If not, write to the
18 ;; Free Software Foundation, 59 Temple Place - Suite 330, Boston,
19 ;; MA 02111-1307, USA.
20
21 (define_automaton "rios1,rios1fp")
22 (define_cpu_unit "iu_rios1" "rios1")
23 (define_cpu_unit "fpu_rios1" "rios1fp")
24 (define_cpu_unit "bpu_rios1" "rios1")
25
26 ;; RIOS1  32-bit IU, FPU, BPU
27
28 (define_insn_reservation "rios1-load" 2
29   (and (eq_attr "type" "load,load_ext,load_ext_u,load_ext_ux,load_ux,load_u")
30        (eq_attr "cpu" "rios1,ppc601"))
31   "iu_rios1")
32
33 (define_insn_reservation "rios1-store" 1
34   (and (eq_attr "type" "store,store_ux,store_u")
35        (eq_attr "cpu" "rios1,ppc601"))
36   "iu_rios1")
37
38 (define_insn_reservation "rios1-fpload" 2
39   (and (eq_attr "type" "fpload,fpload_ux,fpload_u")
40        (eq_attr "cpu" "rios1"))
41   "iu_rios1")
42
43 (define_insn_reservation "ppc601-fpload" 3
44   (and (eq_attr "type" "fpload,fpload_ux,fpload_u")
45        (eq_attr "cpu" "ppc601"))
46   "iu_rios1")
47
48 (define_insn_reservation "rios1-fpstore" 1
49   (and (eq_attr "type" "fpstore,fpstore_ux,fpstore_u")
50        (eq_attr "cpu" "rios1,ppc601"))
51   "iu_rios1+fpu_rios1")
52
53 (define_insn_reservation "rios1-integer" 1
54   (and (eq_attr "type" "integer,mfcr,mtcr")
55        (eq_attr "cpu" "rios1,ppc601"))
56   "iu_rios1")
57
58 (define_insn_reservation "rios1-imul" 5
59   (and (eq_attr "type" "imul,imul_compare")
60        (eq_attr "cpu" "rios1"))
61   "iu_rios1*5")
62
63 (define_insn_reservation "rios1-imul2" 4
64   (and (eq_attr "type" "imul2")
65        (eq_attr "cpu" "rios1"))
66   "iu_rios1*4")
67
68 (define_insn_reservation "rios1-imul3" 3
69   (and (eq_attr "type" "imul")
70        (eq_attr "cpu" "rios1"))
71   "iu_rios1*3")
72
73 (define_insn_reservation "ppc601-imul" 5
74   (and (eq_attr "type" "imul,imul2,imul3,imul_compare")
75        (eq_attr "cpu" "ppc601"))
76   "iu_rios1*5")
77
78 (define_insn_reservation "rios1-idiv" 19
79   (and (eq_attr "type" "idiv")
80        (eq_attr "cpu" "rios1"))
81   "iu_rios1*19")
82
83 (define_insn_reservation "ppc601-idiv" 36
84   (and (eq_attr "type" "idiv")
85        (eq_attr "cpu" "ppc601"))
86   "iu_rios1*36")
87
88 ; compare executes on integer unit, but feeds insns which
89 ; execute on the branch unit.
90 (define_insn_reservation "rios1-compare" 4
91   (and (eq_attr "type" "cmp,fast_compare,compare")
92        (eq_attr "cpu" "rios1"))
93   "iu_rios1,nothing*2,bpu_rios1")
94
95 (define_insn_reservation "rios1-delayed_compare" 5
96   (and (eq_attr "type" "delayed_compare")
97        (eq_attr "cpu" "rios1"))
98   "iu_rios1,nothing*3,bpu_rios1")
99
100 (define_insn_reservation "ppc601-compare" 3
101   (and (eq_attr "type" "cmp,compare,delayed_compare")
102        (eq_attr "cpu" "ppc601"))
103   "iu_rios1,nothing,bpu_rios1")
104
105 (define_insn_reservation "rios1-fpcompare" 9
106   (and (eq_attr "type" "fpcompare")
107        (eq_attr "cpu" "rios1"))
108   "fpu_rios1,nothing*3,bpu_rios1")
109
110 (define_insn_reservation "ppc601-fpcompare" 5
111   (and (eq_attr "type" "fpcompare")
112        (eq_attr "cpu" "ppc601"))
113   "(fpu_rios1+iu_rios1*2),nothing*2,bpu_rios1")
114
115 (define_insn_reservation "rios1-fp" 2
116   (and (eq_attr "type" "fp,dmul")
117        (eq_attr "cpu" "rios1"))
118   "fpu_rios1")
119
120 (define_insn_reservation "ppc601-fp" 4
121   (and (eq_attr "type" "fp")
122        (eq_attr "cpu" "ppc601"))
123   "fpu_rios1")
124
125 (define_insn_reservation "rios1-dmul" 5
126   (and (eq_attr "type" "dmul")
127        (eq_attr "cpu" "ppc601"))
128   "fpu_rios1*2")
129
130 (define_insn_reservation "rios1-sdiv" 19
131   (and (eq_attr "type" "sdiv,ddiv")
132        (eq_attr "cpu" "rios1"))
133   "fpu_rios1*19")
134
135 (define_insn_reservation "ppc601-sdiv" 17
136   (and (eq_attr "type" "sdiv")
137        (eq_attr "cpu" "ppc601"))
138   "fpu_rios1*17")
139
140 (define_insn_reservation "ppc601-ddiv" 31
141   (and (eq_attr "type" "ddiv")
142        (eq_attr "cpu" "ppc601"))
143   "fpu_rios1*31")
144
145 (define_insn_reservation "rios1-crlogical" 4
146   (and (eq_attr "type" "cr_logical,delayed_cr")
147        (eq_attr "cpu" "rios1,ppc601"))
148   "bpu_rios1")
149
150 (define_insn_reservation "rios1-mtjmpr" 5
151   (and (eq_attr "type" "mtjmpr")
152        (eq_attr "cpu" "rios1"))
153   "bpu_rios1")
154
155 (define_insn_reservation "ppc601-mtjmpr" 4
156   (and (eq_attr "type" "mtjmpr")
157        (eq_attr "cpu" "ppc601"))
158   "bpu_rios1")
159
160 (define_insn_reservation "rios1-branch" 1
161   (and (eq_attr "type" "jmpreg,branch")
162        (eq_attr "cpu" "rios1,ppc601"))
163   "bpu_rios1")
164