annotate gcc/config/powerpcspe/6xx.md @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ;; Scheduling description for PowerPC 604, PowerPC 604e, PowerPC 620,
kono
parents:
diff changeset
2 ;; and PowerPC 630 processors.
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
3 ;; Copyright (C) 2003-2018 Free Software Foundation, Inc.
111
kono
parents:
diff changeset
4 ;;
kono
parents:
diff changeset
5 ;; This file is part of GCC.
kono
parents:
diff changeset
6
kono
parents:
diff changeset
7 ;; GCC is free software; you can redistribute it and/or modify it
kono
parents:
diff changeset
8 ;; under the terms of the GNU General Public License as published
kono
parents:
diff changeset
9 ;; by the Free Software Foundation; either version 3, or (at your
kono
parents:
diff changeset
10 ;; option) any later version.
kono
parents:
diff changeset
11
kono
parents:
diff changeset
12 ;; GCC is distributed in the hope that it will be useful, but WITHOUT
kono
parents:
diff changeset
13 ;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
kono
parents:
diff changeset
14 ;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
kono
parents:
diff changeset
15 ;; License for more details.
kono
parents:
diff changeset
16
kono
parents:
diff changeset
17 ;; You should have received a copy of the GNU General Public License
kono
parents:
diff changeset
18 ;; along with GCC; see the file COPYING3. If not see
kono
parents:
diff changeset
19 ;; <http://www.gnu.org/licenses/>.
kono
parents:
diff changeset
20
kono
parents:
diff changeset
21 (define_automaton "ppc6xx,ppc6xxfp,ppc6xxfp2")
kono
parents:
diff changeset
22 (define_cpu_unit "iu1_6xx,iu2_6xx,mciu_6xx" "ppc6xx")
kono
parents:
diff changeset
23 (define_cpu_unit "fpu_6xx" "ppc6xxfp")
kono
parents:
diff changeset
24 (define_cpu_unit "fpu1_6xx,fpu2_6xx" "ppc6xxfp2")
kono
parents:
diff changeset
25 (define_cpu_unit "lsu_6xx,bpu_6xx,cru_6xx" "ppc6xx")
kono
parents:
diff changeset
26
kono
parents:
diff changeset
27 ;; PPC604 32-bit 2xSCIU, MCIU, LSU, FPU, BPU
kono
parents:
diff changeset
28 ;; PPC604e 32-bit 2xSCIU, MCIU, LSU, FPU, BPU, CRU
kono
parents:
diff changeset
29 ;; MCIU used for imul/idiv and moves from/to spr
kono
parents:
diff changeset
30 ;; LSU 2 stage pipelined
kono
parents:
diff changeset
31 ;; FPU 3 stage pipelined
kono
parents:
diff changeset
32 ;; Max issue 4 insns/clock cycle
kono
parents:
diff changeset
33
kono
parents:
diff changeset
34 ;; PPC604e is PPC604 with larger caches and a CRU. In the 604
kono
parents:
diff changeset
35 ;; the CR logical operations are handled in the BPU.
kono
parents:
diff changeset
36 ;; In the 604e, the CRU shares bus with BPU so only one condition
kono
parents:
diff changeset
37 ;; register or branch insn can be issued per clock. Not modelled.
kono
parents:
diff changeset
38
kono
parents:
diff changeset
39 ;; PPC620 64-bit 2xSCIU, MCIU, LSU, FPU, BPU, CRU
kono
parents:
diff changeset
40 ;; PPC630 64-bit 2xSCIU, MCIU, LSU, 2xFPU, BPU, CRU
kono
parents:
diff changeset
41 ;; Max issue 4 insns/clock cycle
kono
parents:
diff changeset
42 ;; Out-of-order execution, in-order completion
kono
parents:
diff changeset
43
kono
parents:
diff changeset
44 ;; No following instruction can dispatch in the same cycle as a branch
kono
parents:
diff changeset
45 ;; instruction. Not modelled. This is no problem if RCSP is not
kono
parents:
diff changeset
46 ;; enabled since the scheduler stops a schedule when it gets to a branch.
kono
parents:
diff changeset
47
kono
parents:
diff changeset
48 ;; Four insns can be dispatched per cycle.
kono
parents:
diff changeset
49
kono
parents:
diff changeset
50 (define_insn_reservation "ppc604-load" 2
kono
parents:
diff changeset
51 (and (eq_attr "type" "load")
kono
parents:
diff changeset
52 (eq_attr "cpu" "ppc604,ppc604e,ppc620,ppc630"))
kono
parents:
diff changeset
53 "lsu_6xx")
kono
parents:
diff changeset
54
kono
parents:
diff changeset
55 (define_insn_reservation "ppc604-fpload" 3
kono
parents:
diff changeset
56 (and (eq_attr "type" "fpload")
kono
parents:
diff changeset
57 (eq_attr "cpu" "ppc604,ppc604e,ppc620,ppc630"))
kono
parents:
diff changeset
58 "lsu_6xx")
kono
parents:
diff changeset
59
kono
parents:
diff changeset
60 (define_insn_reservation "ppc604-store" 3
kono
parents:
diff changeset
61 (and (eq_attr "type" "store,fpstore")
kono
parents:
diff changeset
62 (eq_attr "cpu" "ppc604,ppc604e,ppc620,ppc630"))
kono
parents:
diff changeset
63 "lsu_6xx")
kono
parents:
diff changeset
64
kono
parents:
diff changeset
65 (define_insn_reservation "ppc604-llsc" 3
kono
parents:
diff changeset
66 (and (eq_attr "type" "load_l,store_c")
kono
parents:
diff changeset
67 (eq_attr "cpu" "ppc604,ppc604e"))
kono
parents:
diff changeset
68 "lsu_6xx")
kono
parents:
diff changeset
69
kono
parents:
diff changeset
70 (define_insn_reservation "ppc630-llsc" 4
kono
parents:
diff changeset
71 (and (eq_attr "type" "load_l,store_c")
kono
parents:
diff changeset
72 (eq_attr "cpu" "ppc620,ppc630"))
kono
parents:
diff changeset
73 "lsu_6xx")
kono
parents:
diff changeset
74
kono
parents:
diff changeset
75 (define_insn_reservation "ppc604-integer" 1
kono
parents:
diff changeset
76 (and (ior (eq_attr "type" "integer,insert,trap,cntlz,isel")
kono
parents:
diff changeset
77 (and (eq_attr "type" "add,logical,shift,exts")
kono
parents:
diff changeset
78 (eq_attr "dot" "no")))
kono
parents:
diff changeset
79 (eq_attr "cpu" "ppc604,ppc604e,ppc620,ppc630"))
kono
parents:
diff changeset
80 "iu1_6xx|iu2_6xx")
kono
parents:
diff changeset
81
kono
parents:
diff changeset
82 (define_insn_reservation "ppc604-two" 1
kono
parents:
diff changeset
83 (and (eq_attr "type" "two")
kono
parents:
diff changeset
84 (eq_attr "cpu" "ppc604,ppc604e,ppc620,ppc630"))
kono
parents:
diff changeset
85 "iu1_6xx|iu2_6xx,iu1_6xx|iu2_6xx")
kono
parents:
diff changeset
86
kono
parents:
diff changeset
87 (define_insn_reservation "ppc604-three" 1
kono
parents:
diff changeset
88 (and (eq_attr "type" "three")
kono
parents:
diff changeset
89 (eq_attr "cpu" "ppc604,ppc604e,ppc620,ppc630"))
kono
parents:
diff changeset
90 "iu1_6xx|iu2_6xx,iu1_6xx|iu2_6xx,iu1_6xx|iu2_6xx")
kono
parents:
diff changeset
91
kono
parents:
diff changeset
92 (define_insn_reservation "ppc604-imul" 4
kono
parents:
diff changeset
93 (and (eq_attr "type" "mul")
kono
parents:
diff changeset
94 (eq_attr "cpu" "ppc604"))
kono
parents:
diff changeset
95 "mciu_6xx*2")
kono
parents:
diff changeset
96
kono
parents:
diff changeset
97 (define_insn_reservation "ppc604e-imul" 2
kono
parents:
diff changeset
98 (and (eq_attr "type" "mul")
kono
parents:
diff changeset
99 (eq_attr "cpu" "ppc604e"))
kono
parents:
diff changeset
100 "mciu_6xx")
kono
parents:
diff changeset
101
kono
parents:
diff changeset
102 (define_insn_reservation "ppc620-imul" 5
kono
parents:
diff changeset
103 (and (eq_attr "type" "mul")
kono
parents:
diff changeset
104 (eq_attr "size" "32")
kono
parents:
diff changeset
105 (eq_attr "cpu" "ppc620,ppc630"))
kono
parents:
diff changeset
106 "mciu_6xx*3")
kono
parents:
diff changeset
107
kono
parents:
diff changeset
108 (define_insn_reservation "ppc620-imul2" 4
kono
parents:
diff changeset
109 (and (eq_attr "type" "mul")
kono
parents:
diff changeset
110 (eq_attr "size" "16")
kono
parents:
diff changeset
111 (eq_attr "cpu" "ppc620,ppc630"))
kono
parents:
diff changeset
112 "mciu_6xx*3")
kono
parents:
diff changeset
113
kono
parents:
diff changeset
114 (define_insn_reservation "ppc620-imul3" 3
kono
parents:
diff changeset
115 (and (eq_attr "type" "mul")
kono
parents:
diff changeset
116 (eq_attr "size" "8")
kono
parents:
diff changeset
117 (eq_attr "cpu" "ppc620,ppc630"))
kono
parents:
diff changeset
118 "mciu_6xx*3")
kono
parents:
diff changeset
119
kono
parents:
diff changeset
120 (define_insn_reservation "ppc620-lmul" 7
kono
parents:
diff changeset
121 (and (eq_attr "type" "mul")
kono
parents:
diff changeset
122 (eq_attr "size" "64")
kono
parents:
diff changeset
123 (eq_attr "cpu" "ppc620,ppc630"))
kono
parents:
diff changeset
124 "mciu_6xx*5")
kono
parents:
diff changeset
125
kono
parents:
diff changeset
126 (define_insn_reservation "ppc604-idiv" 20
kono
parents:
diff changeset
127 (and (eq_attr "type" "div")
kono
parents:
diff changeset
128 (eq_attr "cpu" "ppc604,ppc604e"))
kono
parents:
diff changeset
129 "mciu_6xx*19")
kono
parents:
diff changeset
130
kono
parents:
diff changeset
131 (define_insn_reservation "ppc620-idiv" 37
kono
parents:
diff changeset
132 (and (eq_attr "type" "div")
kono
parents:
diff changeset
133 (eq_attr "size" "32")
kono
parents:
diff changeset
134 (eq_attr "cpu" "ppc620"))
kono
parents:
diff changeset
135 "mciu_6xx*36")
kono
parents:
diff changeset
136
kono
parents:
diff changeset
137 (define_insn_reservation "ppc630-idiv" 21
kono
parents:
diff changeset
138 (and (eq_attr "type" "div")
kono
parents:
diff changeset
139 (eq_attr "size" "32")
kono
parents:
diff changeset
140 (eq_attr "cpu" "ppc630"))
kono
parents:
diff changeset
141 "mciu_6xx*20")
kono
parents:
diff changeset
142
kono
parents:
diff changeset
143 (define_insn_reservation "ppc620-ldiv" 37
kono
parents:
diff changeset
144 (and (eq_attr "type" "div")
kono
parents:
diff changeset
145 (eq_attr "size" "64")
kono
parents:
diff changeset
146 (eq_attr "cpu" "ppc620,ppc630"))
kono
parents:
diff changeset
147 "mciu_6xx*36")
kono
parents:
diff changeset
148
kono
parents:
diff changeset
149 (define_insn_reservation "ppc604-compare" 3
kono
parents:
diff changeset
150 (and (ior (eq_attr "type" "cmp")
kono
parents:
diff changeset
151 (and (eq_attr "type" "add,logical,shift,exts")
kono
parents:
diff changeset
152 (eq_attr "dot" "yes")))
kono
parents:
diff changeset
153 (eq_attr "cpu" "ppc604,ppc604e,ppc620,ppc630"))
kono
parents:
diff changeset
154 "(iu1_6xx|iu2_6xx)")
kono
parents:
diff changeset
155
kono
parents:
diff changeset
156 ; FPU PPC604{,e},PPC620
kono
parents:
diff changeset
157 (define_insn_reservation "ppc604-fpcompare" 5
kono
parents:
diff changeset
158 (and (eq_attr "type" "fpcompare")
kono
parents:
diff changeset
159 (eq_attr "cpu" "ppc604,ppc604e,ppc620"))
kono
parents:
diff changeset
160 "fpu_6xx")
kono
parents:
diff changeset
161
kono
parents:
diff changeset
162 (define_insn_reservation "ppc604-fp" 3
kono
parents:
diff changeset
163 (and (eq_attr "type" "fp,fpsimple")
kono
parents:
diff changeset
164 (eq_attr "cpu" "ppc604,ppc604e,ppc620"))
kono
parents:
diff changeset
165 "fpu_6xx")
kono
parents:
diff changeset
166
kono
parents:
diff changeset
167 (define_insn_reservation "ppc604-dmul" 3
kono
parents:
diff changeset
168 (and (eq_attr "type" "dmul")
kono
parents:
diff changeset
169 (eq_attr "cpu" "ppc604,ppc604e,ppc620"))
kono
parents:
diff changeset
170 "fpu_6xx")
kono
parents:
diff changeset
171
kono
parents:
diff changeset
172 ; Divides are not pipelined
kono
parents:
diff changeset
173 (define_insn_reservation "ppc604-sdiv" 18
kono
parents:
diff changeset
174 (and (eq_attr "type" "sdiv")
kono
parents:
diff changeset
175 (eq_attr "cpu" "ppc604,ppc604e,ppc620"))
kono
parents:
diff changeset
176 "fpu_6xx*18")
kono
parents:
diff changeset
177
kono
parents:
diff changeset
178 (define_insn_reservation "ppc604-ddiv" 32
kono
parents:
diff changeset
179 (and (eq_attr "type" "ddiv")
kono
parents:
diff changeset
180 (eq_attr "cpu" "ppc604,ppc604e,ppc620"))
kono
parents:
diff changeset
181 "fpu_6xx*32")
kono
parents:
diff changeset
182
kono
parents:
diff changeset
183 (define_insn_reservation "ppc620-ssqrt" 31
kono
parents:
diff changeset
184 (and (eq_attr "type" "ssqrt")
kono
parents:
diff changeset
185 (eq_attr "cpu" "ppc620"))
kono
parents:
diff changeset
186 "fpu_6xx*31")
kono
parents:
diff changeset
187
kono
parents:
diff changeset
188 (define_insn_reservation "ppc620-dsqrt" 31
kono
parents:
diff changeset
189 (and (eq_attr "type" "dsqrt")
kono
parents:
diff changeset
190 (eq_attr "cpu" "ppc620"))
kono
parents:
diff changeset
191 "fpu_6xx*31")
kono
parents:
diff changeset
192
kono
parents:
diff changeset
193
kono
parents:
diff changeset
194 ; 2xFPU PPC630
kono
parents:
diff changeset
195 (define_insn_reservation "ppc630-fpcompare" 5
kono
parents:
diff changeset
196 (and (eq_attr "type" "fpcompare")
kono
parents:
diff changeset
197 (eq_attr "cpu" "ppc630"))
kono
parents:
diff changeset
198 "fpu1_6xx|fpu2_6xx")
kono
parents:
diff changeset
199
kono
parents:
diff changeset
200 (define_insn_reservation "ppc630-fp" 3
kono
parents:
diff changeset
201 (and (eq_attr "type" "fp,dmul")
kono
parents:
diff changeset
202 (eq_attr "cpu" "ppc630"))
kono
parents:
diff changeset
203 "fpu1_6xx|fpu2_6xx")
kono
parents:
diff changeset
204
kono
parents:
diff changeset
205 (define_insn_reservation "ppc630-sdiv" 17
kono
parents:
diff changeset
206 (and (eq_attr "type" "sdiv")
kono
parents:
diff changeset
207 (eq_attr "cpu" "ppc630"))
kono
parents:
diff changeset
208 "fpu1_6xx*17|fpu2_6xx*17")
kono
parents:
diff changeset
209
kono
parents:
diff changeset
210 (define_insn_reservation "ppc630-ddiv" 21
kono
parents:
diff changeset
211 (and (eq_attr "type" "ddiv")
kono
parents:
diff changeset
212 (eq_attr "cpu" "ppc630"))
kono
parents:
diff changeset
213 "fpu1_6xx*21|fpu2_6xx*21")
kono
parents:
diff changeset
214
kono
parents:
diff changeset
215 (define_insn_reservation "ppc630-ssqrt" 18
kono
parents:
diff changeset
216 (and (eq_attr "type" "ssqrt")
kono
parents:
diff changeset
217 (eq_attr "cpu" "ppc630"))
kono
parents:
diff changeset
218 "fpu1_6xx*18|fpu2_6xx*18")
kono
parents:
diff changeset
219
kono
parents:
diff changeset
220 (define_insn_reservation "ppc630-dsqrt" 25
kono
parents:
diff changeset
221 (and (eq_attr "type" "dsqrt")
kono
parents:
diff changeset
222 (eq_attr "cpu" "ppc630"))
kono
parents:
diff changeset
223 "fpu1_6xx*25|fpu2_6xx*25")
kono
parents:
diff changeset
224
kono
parents:
diff changeset
225 (define_insn_reservation "ppc604-mfcr" 3
kono
parents:
diff changeset
226 (and (eq_attr "type" "mfcr")
kono
parents:
diff changeset
227 (eq_attr "cpu" "ppc604,ppc604e,ppc620,ppc630"))
kono
parents:
diff changeset
228 "mciu_6xx")
kono
parents:
diff changeset
229
kono
parents:
diff changeset
230 (define_insn_reservation "ppc604-mtcr" 2
kono
parents:
diff changeset
231 (and (eq_attr "type" "mtcr")
kono
parents:
diff changeset
232 (eq_attr "cpu" "ppc604,ppc604e,ppc620,ppc630"))
kono
parents:
diff changeset
233 "iu1_6xx|iu2_6xx")
kono
parents:
diff changeset
234
kono
parents:
diff changeset
235 (define_insn_reservation "ppc604-crlogical" 2
kono
parents:
diff changeset
236 (and (eq_attr "type" "cr_logical,delayed_cr")
kono
parents:
diff changeset
237 (eq_attr "cpu" "ppc604"))
kono
parents:
diff changeset
238 "bpu_6xx")
kono
parents:
diff changeset
239
kono
parents:
diff changeset
240 (define_insn_reservation "ppc604e-crlogical" 2
kono
parents:
diff changeset
241 (and (eq_attr "type" "cr_logical,delayed_cr")
kono
parents:
diff changeset
242 (eq_attr "cpu" "ppc604e,ppc620,ppc630"))
kono
parents:
diff changeset
243 "cru_6xx")
kono
parents:
diff changeset
244
kono
parents:
diff changeset
245 (define_insn_reservation "ppc604-mtjmpr" 2
kono
parents:
diff changeset
246 (and (eq_attr "type" "mtjmpr")
kono
parents:
diff changeset
247 (eq_attr "cpu" "ppc604,ppc604e,ppc620,ppc630"))
kono
parents:
diff changeset
248 "mciu_6xx")
kono
parents:
diff changeset
249
kono
parents:
diff changeset
250 (define_insn_reservation "ppc604-mfjmpr" 3
kono
parents:
diff changeset
251 (and (eq_attr "type" "mfjmpr")
kono
parents:
diff changeset
252 (eq_attr "cpu" "ppc604,ppc604e,ppc620"))
kono
parents:
diff changeset
253 "mciu_6xx")
kono
parents:
diff changeset
254
kono
parents:
diff changeset
255 (define_insn_reservation "ppc630-mfjmpr" 2
kono
parents:
diff changeset
256 (and (eq_attr "type" "mfjmpr")
kono
parents:
diff changeset
257 (eq_attr "cpu" "ppc630"))
kono
parents:
diff changeset
258 "mciu_6xx")
kono
parents:
diff changeset
259
kono
parents:
diff changeset
260 (define_insn_reservation "ppc604-jmpreg" 1
kono
parents:
diff changeset
261 (and (eq_attr "type" "jmpreg,branch")
kono
parents:
diff changeset
262 (eq_attr "cpu" "ppc604,ppc604e,ppc620,ppc630"))
kono
parents:
diff changeset
263 "bpu_6xx")
kono
parents:
diff changeset
264
kono
parents:
diff changeset
265 (define_insn_reservation "ppc604-isync" 0
kono
parents:
diff changeset
266 (and (eq_attr "type" "isync")
kono
parents:
diff changeset
267 (eq_attr "cpu" "ppc604,ppc604e"))
kono
parents:
diff changeset
268 "bpu_6xx")
kono
parents:
diff changeset
269
kono
parents:
diff changeset
270 (define_insn_reservation "ppc630-isync" 6
kono
parents:
diff changeset
271 (and (eq_attr "type" "isync")
kono
parents:
diff changeset
272 (eq_attr "cpu" "ppc620,ppc630"))
kono
parents:
diff changeset
273 "bpu_6xx")
kono
parents:
diff changeset
274
kono
parents:
diff changeset
275 (define_insn_reservation "ppc604-sync" 35
kono
parents:
diff changeset
276 (and (eq_attr "type" "sync")
kono
parents:
diff changeset
277 (eq_attr "cpu" "ppc604,ppc604e"))
kono
parents:
diff changeset
278 "lsu_6xx")
kono
parents:
diff changeset
279
kono
parents:
diff changeset
280 (define_insn_reservation "ppc630-sync" 26
kono
parents:
diff changeset
281 (and (eq_attr "type" "sync")
kono
parents:
diff changeset
282 (eq_attr "cpu" "ppc620,ppc630"))
kono
parents:
diff changeset
283 "lsu_6xx")
kono
parents:
diff changeset
284