]>
Commit | Line | Data |
---|---|---|
65b1d8ea AK |
1 | ;; Scheduling description for z196 (cpu 2817). |
2 | ;; Copyright (C) 2010 | |
3 | ;; Free Software Foundation, Inc. | |
4 | ;; Contributed by Christian Borntraeger (Christian.Borntraeger@de.ibm.com) | |
5 | ;; Andreas Krebbel (Andreas.Krebbel@de.ibm.com) | |
6 | ||
7 | ;; This file is part of GCC. | |
8 | ||
9 | ;; GCC is free software; you can redistribute it and/or modify it under | |
10 | ;; the terms of the GNU General Public License as published by the Free | |
11 | ;; Software Foundation; either version 3, or (at your option) any later | |
12 | ;; version. | |
13 | ||
14 | ;; GCC is distributed in the hope that it will be useful, but WITHOUT ANY | |
15 | ;; WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
16 | ;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
17 | ;; for more details. | |
18 | ||
19 | ;; You should have received a copy of the GNU General Public License | |
20 | ;; along with GCC; see the file COPYING3. If not see | |
21 | ;; <http://www.gnu.org/licenses/>. | |
22 | ||
23 | (define_automaton "z196_ipu") | |
24 | ||
25 | ;; Fetch + Decoder | |
26 | (define_cpu_unit "z196_g1" "z196_ipu") | |
27 | (define_cpu_unit "z196_g2" "z196_ipu") | |
28 | (define_cpu_unit "z196_g3" "z196_ipu") | |
29 | (define_cpu_unit "z196_cr1" "z196_ipu") | |
30 | (define_cpu_unit "z196_cr2" "z196_ipu") | |
31 | (define_cpu_unit "z196_cr3" "z196_ipu") | |
32 | ||
33 | (final_presence_set "z196_g2" "z196_g1") | |
34 | (final_presence_set "z196_g3" "z196_g2") | |
35 | (final_presence_set "z196_cr2" "z196_cr1") | |
36 | (final_presence_set "z196_cr3" "z196_cr2") | |
37 | (exclusion_set "z196_g1" "z196_cr1") | |
38 | ||
39 | ;; Instructions can be groupable, end a group, or be alone in a group. | |
40 | (define_reservation "z196_simple" "( z196_g1 | z196_g2 | z196_g3 )") | |
41 | (define_reservation "z196_ends" "( z196_g3 | ( z196_g2 + z196_g3 ) | ( z196_g1 + z196_g2 + z196_g3 ) )") | |
42 | ||
43 | ;; Try to keep cracked and alone ops together in a clump. | |
44 | (define_reservation "z196_crack" "( z196_cr1 | z196_cr2 | z196_cr3 )") | |
45 | (define_reservation "z196_alone" "( z196_cr1 | z196_cr2 | z196_cr3 )") | |
46 | ||
47 | ;; Most simple instruction a fast enough to be handled by OOO even with | |
48 | ;; latency == 0. This reduces life ranges and spilling. We want to increase | |
49 | ;; life range for longer running ops, though, thats why we do not use | |
50 | ;; -fno-schedule-insns. | |
51 | (define_insn_reservation "z196_simple_LSU" 0 | |
52 | (and (eq_attr "cpu" "z196") | |
53 | (and (eq_attr "type" "load,store,lr") | |
54 | (eq_attr "z196prop" "none"))) | |
55 | "z196_simple") | |
56 | ||
57 | (define_insn_reservation "z196_simple_FXU" 0 | |
58 | (and (eq_attr "cpu" "z196") | |
59 | (and (eq_attr "type" "integer,la,larl,other") | |
60 | (and (eq_attr "z196prop" "none") | |
61 | (eq_attr "op_type" "RR")))) | |
62 | "z196_simple") | |
63 | ||
64 | (define_insn_reservation "z196_simple_DUAL" 0 | |
65 | (and (eq_attr "cpu" "z196") | |
66 | (and (eq_attr "type" "integer,la,larl,other") | |
67 | (and (eq_attr "z196prop" "none") | |
68 | (eq_attr "op_type" "!RR")))) | |
69 | "z196_simple") | |
70 | ||
71 | (define_insn_reservation "z196_cracked" 0 | |
72 | (and (eq_attr "cpu" "z196") | |
73 | (and (eq_attr "type" "integer,la,larl,load,lr,store,other") | |
74 | (eq_attr "z196prop" "z196_cracked"))) | |
75 | "z196_crack") | |
76 | ||
77 | (define_insn_reservation "z196_alone" 0 | |
78 | (and (eq_attr "cpu" "z196") | |
79 | (and (eq_attr "type" "integer,la,larl,load,lr,store,other") | |
80 | (eq_attr "z196prop" "z196_alone"))) | |
81 | "z196_alone") | |
82 | ||
83 | (define_insn_reservation "z196_ends" 0 | |
84 | (and (eq_attr "cpu" "z196") | |
85 | (and (eq_attr "type" "integer,la,larl,load,lr,store,other") | |
86 | (eq_attr "z196prop" "z196_ends"))) | |
87 | "z196_ends") | |
88 | ||
89 | (define_insn_reservation "z196_branch" 0 | |
90 | (and (eq_attr "cpu" "z196") | |
91 | (eq_attr "type" "branch")) | |
92 | "z196_ends") | |
93 | ||
94 | (define_insn_reservation "z196_call" 0 | |
95 | (and (eq_attr "cpu" "z196") | |
96 | (eq_attr "type" "jsr")) | |
97 | "z196_ends") | |
98 | ||
99 | (define_insn_reservation "z196_mul_hi" 10 | |
100 | (and (eq_attr "cpu" "z196") | |
101 | (eq_attr "type" "imulhi")) | |
102 | "z196_simple") | |
103 | ||
104 | (define_insn_reservation "z196_mul_si" 12 | |
105 | (and (eq_attr "cpu" "z196") | |
106 | (eq_attr "type" "imulsi")) | |
107 | "z196_simple") | |
108 | ||
109 | (define_insn_reservation "z196_mul_di" 14 | |
110 | (and (eq_attr "cpu" "z196") | |
111 | (eq_attr "type" "imuldi")) | |
112 | "z196_simple") | |
113 | ||
114 | (define_insn_reservation "z196_div" 73 | |
115 | (and (eq_attr "cpu" "z196") | |
116 | (eq_attr "type" "idiv")) | |
117 | "z196_alone") | |
118 | ||
119 | (define_insn_reservation "z196_sem" 0 | |
120 | (and (eq_attr "cpu" "z196") | |
121 | (eq_attr "type" "sem")) | |
122 | "z196_crack") | |
123 | ||
124 | (define_insn_reservation "z196_cs" 0 | |
125 | (and (eq_attr "cpu" "z196") | |
126 | (eq_attr "type" "cs")) | |
127 | "z196_crack") | |
128 | ||
129 | (define_insn_reservation "z196_vs" 0 | |
130 | (and (eq_attr "cpu" "z196") | |
131 | (eq_attr "type" "vs")) | |
132 | "z196_alone") | |
133 | ||
134 | (define_insn_reservation "z196_lm_stm" 0 | |
135 | (and (eq_attr "cpu" "z196") | |
136 | (eq_attr "type" "stm,lm")) | |
137 | "z196_crack") | |
138 | ||
139 | ||
140 | ;; | |
141 | ;; Binary Floating Point | |
142 | ;; | |
143 | ||
144 | (define_insn_reservation "z196_fsimptf" 18 | |
145 | (and (eq_attr "cpu" "z196") | |
146 | (eq_attr "type" "fsimptf,fhex")) | |
147 | "z196_alone") | |
148 | ||
149 | (define_insn_reservation "z196_fmultf" 47 | |
150 | (and (eq_attr "cpu" "z196") | |
151 | (eq_attr "type" "fmultf")) | |
152 | "z196_alone") | |
153 | ||
154 | (define_insn_reservation "z196_fsimpdf" 7 | |
155 | (and (eq_attr "cpu" "z196") | |
156 | (eq_attr "type" "fsimpdf,fmuldf,fhex")) | |
157 | "z196_simple") | |
158 | ||
159 | (define_insn_reservation "z196_fmadddf" 7 | |
160 | (and (eq_attr "cpu" "z196") | |
161 | (eq_attr "type" "fmadddf")) | |
162 | "z196_alone") | |
163 | ||
164 | (define_insn_reservation "z196_fsimpsf" 7 | |
165 | (and (eq_attr "cpu" "z196") | |
166 | (eq_attr "type" "fsimpsf,fmulsf,fhex")) | |
167 | "z196_simple") | |
168 | ||
169 | (define_insn_reservation "z196_fmaddsf" 7 | |
170 | (and (eq_attr "cpu" "z196") | |
171 | (eq_attr "type" "fmaddsf")) | |
172 | "z196_alone") | |
173 | ||
174 | (define_insn_reservation "z196_fdivtf" 108 | |
175 | (and (eq_attr "cpu" "z196") | |
176 | (eq_attr "type" "fdivtf,fsqrttf")) | |
177 | "z196_alone") | |
178 | ||
179 | (define_insn_reservation "z196_fdivdf" 36 | |
180 | (and (eq_attr "cpu" "z196") | |
181 | (eq_attr "type" "fdivdf,fsqrtdf")) | |
182 | "z196_simple") | |
183 | ||
184 | (define_insn_reservation "z196_fdivsf" 29 | |
185 | (and (eq_attr "cpu" "z196") | |
186 | (eq_attr "type" "fdivsf,fsqrtsf")) | |
187 | "z196_simple") | |
188 | ||
189 | ||
190 | ;; Loads and stores are cheap as well. | |
191 | (define_insn_reservation "z196_floaddf" 0 | |
192 | (and (eq_attr "cpu" "z196") | |
193 | (eq_attr "type" "floaddf")) | |
194 | "z196_simple") | |
195 | ||
196 | (define_insn_reservation "z196_floadsf" 0 | |
197 | (and (eq_attr "cpu" "z196") | |
198 | (eq_attr "type" "floadsf")) | |
199 | "z196_simple") | |
200 | ||
201 | (define_insn_reservation "z196_fstoredf" 0 | |
202 | (and (eq_attr "cpu" "z196") | |
203 | (eq_attr "type" "fstoredf")) | |
204 | "z196_simple") | |
205 | ||
206 | (define_insn_reservation "z196_fstoresf" 0 | |
207 | (and (eq_attr "cpu" "z196") | |
208 | (eq_attr "type" "fstoresf")) | |
209 | "z196_simple") | |
210 | ||
211 | ||
212 | (define_insn_reservation "z196_ftrunctf" 9 | |
213 | (and (eq_attr "cpu" "z196") | |
214 | (eq_attr "type" "ftrunctf")) | |
215 | "z196_simple") | |
216 | ||
217 | (define_insn_reservation "z196_ftruncdf" 7 | |
218 | (and (eq_attr "cpu" "z196") | |
219 | (eq_attr "type" "ftruncdf")) | |
220 | "z196_simple") | |
221 | ||
222 | ||
223 | (define_insn_reservation "z196_ftoi" 7 | |
224 | (and (eq_attr "cpu" "z196") | |
225 | (eq_attr "type" "ftoi")) | |
226 | "z196_crack") | |
227 | ||
228 | (define_insn_reservation "z196_itof" 7 | |
229 | (and (eq_attr "cpu" "z196") | |
230 | (eq_attr "type" "itoftf,itofdf,itofsf")) | |
231 | "z196_crack") | |
232 | ||
233 | ;; | |
234 | ;; Decimal Floating Point | |
235 | ;; | |
236 | ||
237 | ;; DDTR | |
238 | (define_insn_reservation "z196_fdivdd" 33 | |
239 | (and (eq_attr "cpu" "z196") | |
240 | (eq_attr "type" "fdivdd")) | |
241 | "z196_simple") | |
242 | ||
243 | ;; DXTR | |
244 | (define_insn_reservation "z196_fdivtd" 35 | |
245 | (and (eq_attr "cpu" "z196") | |
246 | (eq_attr "type" "fdivtd")) | |
247 | "z196_alone") | |
248 | ||
249 | ;; LEDTR | |
250 | (define_insn_reservation "z196_ftruncsd" 34 | |
251 | (and (eq_attr "cpu" "z196") | |
252 | (eq_attr "type" "ftruncsd")) | |
253 | "z196_simple") | |
254 | ||
255 | ;; LDXTR | |
256 | (define_insn_reservation "z196_ftruncdd" 36 | |
257 | (and (eq_attr "cpu" "z196") | |
258 | (eq_attr "type" "ftruncdd")) | |
259 | "z196_simple") | |
260 | ||
261 | ;; These are normal fp loads/stores - which are cheap. | |
262 | (define_insn_reservation "z196_floadsddd" 0 | |
263 | (and (eq_attr "cpu" "z196") | |
264 | (eq_attr "type" "floadsd,floaddd,fstoredd,fstoresd")) | |
265 | "z196_simple") | |
266 | ||
267 | ;; MDTR | |
268 | (define_insn_reservation "z196_fmuldd" 23 | |
269 | (and (eq_attr "cpu" "z196") | |
270 | (eq_attr "type" "fmuldd")) | |
271 | "z196_simple") | |
272 | ||
273 | ;; MXTR | |
274 | (define_insn_reservation "z196_fmultd" 25 | |
275 | (and (eq_attr "cpu" "z196") | |
276 | (eq_attr "type" "fmultd")) | |
277 | "z196_alone") | |
278 | ||
279 | ;; multiple different isns like add, sub etc. | |
280 | ;; Just use the same defaults as z10. | |
281 | (define_insn_reservation "z196_fsimpsd" 17 | |
282 | (and (eq_attr "cpu" "z196") | |
283 | (eq_attr "type" "fsimpsd")) | |
284 | "z196_simple") | |
285 | (define_insn_reservation "z196_fsimpdd" 17 | |
286 | (and (eq_attr "cpu" "z196") | |
287 | (eq_attr "type" "fsimpdd")) | |
288 | "z196_simple") | |
289 | (define_insn_reservation "z196_fsimptd" 18 | |
290 | (and (eq_attr "cpu" "z196") | |
291 | (eq_attr "type" "fsimptd")) | |
292 | "z196_alone") | |
293 | ||
294 | ;; CDGTR | |
295 | (define_insn_reservation "z196_itofdd" 45 | |
296 | (and (eq_attr "cpu" "z196") | |
297 | (eq_attr "type" "itofdd")) | |
298 | "z196_crack") | |
299 | ||
300 | ;; CXGTR | |
301 | (define_insn_reservation "z196_itoftd" 33 | |
302 | (and (eq_attr "cpu" "z196") | |
303 | (eq_attr "type" "itoftd")) | |
304 | "z196_crack") | |
305 | ||
306 | ;; CGXTR, CGDTR | |
307 | (define_insn_reservation "z196_ftoidfp" 33 | |
308 | (and (eq_attr "cpu" "z196") | |
309 | (eq_attr "type" "ftoidfp")) | |
310 | "z196_crack") | |
311 | ||
312 | ||
313 |