annotate gcc/config/powerpcspe/e6500.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 ;; Pipeline description for Freescale PowerPC e6500 core.
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
2 ;; Copyright (C) 2012-2018 Free Software Foundation, Inc.
111
kono
parents:
diff changeset
3 ;; Contributed by Edmar Wienskoski (edmar@freescale.com)
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 ;; e6500 64-bit SFX(2), CFX, LSU, FPU, BU, VSFX, VCFX, VFPU, VPERM
kono
parents:
diff changeset
22 ;; Max issue 3 insns/clock cycle (includes 1 branch)
kono
parents:
diff changeset
23
kono
parents:
diff changeset
24 (define_automaton "e6500_most,e6500_long,e6500_vec")
kono
parents:
diff changeset
25 (define_cpu_unit "e6500_decode_0,e6500_decode_1" "e6500_most")
kono
parents:
diff changeset
26
kono
parents:
diff changeset
27 ;; SFX.
kono
parents:
diff changeset
28 (define_cpu_unit "e6500_sfx_0,e6500_sfx_1" "e6500_most")
kono
parents:
diff changeset
29
kono
parents:
diff changeset
30 ;; CFX.
kono
parents:
diff changeset
31 (define_cpu_unit "e6500_cfx_stage0,e6500_cfx_stage1" "e6500_most")
kono
parents:
diff changeset
32
kono
parents:
diff changeset
33 ;; Non-pipelined division.
kono
parents:
diff changeset
34 (define_cpu_unit "e6500_cfx_div" "e6500_long")
kono
parents:
diff changeset
35
kono
parents:
diff changeset
36 ;; LSU.
kono
parents:
diff changeset
37 (define_cpu_unit "e6500_lsu" "e6500_most")
kono
parents:
diff changeset
38
kono
parents:
diff changeset
39 ;; FPU.
kono
parents:
diff changeset
40 (define_cpu_unit "e6500_fpu" "e6500_long")
kono
parents:
diff changeset
41
kono
parents:
diff changeset
42 ;; BU.
kono
parents:
diff changeset
43 (define_cpu_unit "e6500_bu" "e6500_most")
kono
parents:
diff changeset
44
kono
parents:
diff changeset
45 ;; Altivec unit
kono
parents:
diff changeset
46 (define_cpu_unit "e6500_vec,e6500_vecperm" "e6500_vec")
kono
parents:
diff changeset
47
kono
parents:
diff changeset
48 ;; The following units are used to make the automata deterministic.
kono
parents:
diff changeset
49 (define_cpu_unit "present_e6500_decode_0" "e6500_most")
kono
parents:
diff changeset
50 (define_cpu_unit "present_e6500_sfx_0" "e6500_most")
kono
parents:
diff changeset
51 (presence_set "present_e6500_decode_0" "e6500_decode_0")
kono
parents:
diff changeset
52 (presence_set "present_e6500_sfx_0" "e6500_sfx_0")
kono
parents:
diff changeset
53
kono
parents:
diff changeset
54 ;; Some useful abbreviations.
kono
parents:
diff changeset
55 (define_reservation "e6500_decode"
kono
parents:
diff changeset
56 "e6500_decode_0|e6500_decode_1+present_e6500_decode_0")
kono
parents:
diff changeset
57 (define_reservation "e6500_sfx"
kono
parents:
diff changeset
58 "e6500_sfx_0|e6500_sfx_1+present_e6500_sfx_0")
kono
parents:
diff changeset
59
kono
parents:
diff changeset
60 ;; SFX.
kono
parents:
diff changeset
61 (define_insn_reservation "e6500_sfx" 1
kono
parents:
diff changeset
62 (and (ior (eq_attr "type" "integer,insert,cntlz")
kono
parents:
diff changeset
63 (and (eq_attr "type" "add,logical,exts")
kono
parents:
diff changeset
64 (eq_attr "dot" "no"))
kono
parents:
diff changeset
65 (and (eq_attr "type" "shift")
kono
parents:
diff changeset
66 (eq_attr "dot" "no")
kono
parents:
diff changeset
67 (eq_attr "var_shift" "no")))
kono
parents:
diff changeset
68 (eq_attr "cpu" "ppce6500"))
kono
parents:
diff changeset
69 "e6500_decode,e6500_sfx")
kono
parents:
diff changeset
70
kono
parents:
diff changeset
71 (define_insn_reservation "e6500_sfx2" 2
kono
parents:
diff changeset
72 (and (ior (eq_attr "type" "cmp,trap")
kono
parents:
diff changeset
73 (and (eq_attr "type" "add,logical,exts")
kono
parents:
diff changeset
74 (eq_attr "dot" "yes"))
kono
parents:
diff changeset
75 (and (eq_attr "type" "shift")
kono
parents:
diff changeset
76 (eq_attr "dot" "yes")
kono
parents:
diff changeset
77 (eq_attr "var_shift" "no")))
kono
parents:
diff changeset
78 (eq_attr "cpu" "ppce6500"))
kono
parents:
diff changeset
79 "e6500_decode,e6500_sfx")
kono
parents:
diff changeset
80
kono
parents:
diff changeset
81 (define_insn_reservation "e6500_delayed" 2
kono
parents:
diff changeset
82 (and (eq_attr "type" "shift")
kono
parents:
diff changeset
83 (eq_attr "var_shift" "yes")
kono
parents:
diff changeset
84 (eq_attr "cpu" "ppce6500"))
kono
parents:
diff changeset
85 "e6500_decode,e6500_sfx*2")
kono
parents:
diff changeset
86
kono
parents:
diff changeset
87 (define_insn_reservation "e6500_two" 2
kono
parents:
diff changeset
88 (and (eq_attr "type" "two")
kono
parents:
diff changeset
89 (eq_attr "cpu" "ppce6500"))
kono
parents:
diff changeset
90 "e6500_decode,e6500_decode+e6500_sfx,e6500_sfx")
kono
parents:
diff changeset
91
kono
parents:
diff changeset
92 (define_insn_reservation "e6500_three" 3
kono
parents:
diff changeset
93 (and (eq_attr "type" "three")
kono
parents:
diff changeset
94 (eq_attr "cpu" "ppce6500"))
kono
parents:
diff changeset
95 "e6500_decode,(e6500_decode+e6500_sfx)*2,e6500_sfx")
kono
parents:
diff changeset
96
kono
parents:
diff changeset
97 ;; SFX - Mfcr.
kono
parents:
diff changeset
98 (define_insn_reservation "e6500_mfcr" 4
kono
parents:
diff changeset
99 (and (eq_attr "type" "mfcr")
kono
parents:
diff changeset
100 (eq_attr "cpu" "ppce6500"))
kono
parents:
diff changeset
101 "e6500_decode,e6500_sfx_0*4")
kono
parents:
diff changeset
102
kono
parents:
diff changeset
103 ;; SFX - Mtcrf.
kono
parents:
diff changeset
104 (define_insn_reservation "e6500_mtcrf" 1
kono
parents:
diff changeset
105 (and (eq_attr "type" "mtcr")
kono
parents:
diff changeset
106 (eq_attr "cpu" "ppce6500"))
kono
parents:
diff changeset
107 "e6500_decode,e6500_sfx_0")
kono
parents:
diff changeset
108
kono
parents:
diff changeset
109 ;; SFX - Mtjmpr.
kono
parents:
diff changeset
110 (define_insn_reservation "e6500_mtjmpr" 1
kono
parents:
diff changeset
111 (and (eq_attr "type" "mtjmpr,mfjmpr")
kono
parents:
diff changeset
112 (eq_attr "cpu" "ppce6500"))
kono
parents:
diff changeset
113 "e6500_decode,e6500_sfx")
kono
parents:
diff changeset
114
kono
parents:
diff changeset
115 ;; CFX - Multiply.
kono
parents:
diff changeset
116 (define_insn_reservation "e6500_multiply" 4
kono
parents:
diff changeset
117 (and (eq_attr "type" "mul")
kono
parents:
diff changeset
118 (eq_attr "dot" "no")
kono
parents:
diff changeset
119 (eq_attr "size" "32")
kono
parents:
diff changeset
120 (eq_attr "cpu" "ppce6500"))
kono
parents:
diff changeset
121 "e6500_decode,e6500_cfx_stage0,e6500_cfx_stage1")
kono
parents:
diff changeset
122
kono
parents:
diff changeset
123 (define_insn_reservation "e6500_multiply_i" 5
kono
parents:
diff changeset
124 (and (eq_attr "type" "mul")
kono
parents:
diff changeset
125 (ior (eq_attr "dot" "yes")
kono
parents:
diff changeset
126 (eq_attr "size" "8,16"))
kono
parents:
diff changeset
127 (eq_attr "cpu" "ppce6500"))
kono
parents:
diff changeset
128 "e6500_decode,e6500_cfx_stage0,\
kono
parents:
diff changeset
129 e6500_cfx_stage0+e6500_cfx_stage1,e6500_cfx_stage1")
kono
parents:
diff changeset
130
kono
parents:
diff changeset
131 ;; CFX - Divide.
kono
parents:
diff changeset
132 (define_insn_reservation "e6500_divide" 16
kono
parents:
diff changeset
133 (and (eq_attr "type" "div")
kono
parents:
diff changeset
134 (eq_attr "size" "32")
kono
parents:
diff changeset
135 (eq_attr "cpu" "ppce6500"))
kono
parents:
diff changeset
136 "e6500_decode,e6500_cfx_stage0+e6500_cfx_div,\
kono
parents:
diff changeset
137 e6500_cfx_div*15")
kono
parents:
diff changeset
138
kono
parents:
diff changeset
139 (define_insn_reservation "e6500_divide_d" 26
kono
parents:
diff changeset
140 (and (eq_attr "type" "div")
kono
parents:
diff changeset
141 (eq_attr "size" "64")
kono
parents:
diff changeset
142 (eq_attr "cpu" "ppce6500"))
kono
parents:
diff changeset
143 "e6500_decode,e6500_cfx_stage0+e6500_cfx_div,\
kono
parents:
diff changeset
144 e6500_cfx_div*25")
kono
parents:
diff changeset
145
kono
parents:
diff changeset
146 ;; LSU - Loads.
kono
parents:
diff changeset
147 (define_insn_reservation "e6500_load" 3
kono
parents:
diff changeset
148 (and (eq_attr "type" "load,load_l,sync")
kono
parents:
diff changeset
149 (eq_attr "cpu" "ppce6500"))
kono
parents:
diff changeset
150 "e6500_decode,e6500_lsu")
kono
parents:
diff changeset
151
kono
parents:
diff changeset
152 (define_insn_reservation "e6500_fpload" 4
kono
parents:
diff changeset
153 (and (eq_attr "type" "fpload")
kono
parents:
diff changeset
154 (eq_attr "cpu" "ppce6500"))
kono
parents:
diff changeset
155 "e6500_decode,e6500_lsu")
kono
parents:
diff changeset
156
kono
parents:
diff changeset
157 (define_insn_reservation "e6500_vecload" 4
kono
parents:
diff changeset
158 (and (eq_attr "type" "vecload")
kono
parents:
diff changeset
159 (eq_attr "cpu" "ppce6500"))
kono
parents:
diff changeset
160 "e6500_decode,e6500_lsu")
kono
parents:
diff changeset
161
kono
parents:
diff changeset
162 ;; LSU - Stores.
kono
parents:
diff changeset
163 (define_insn_reservation "e6500_store" 3
kono
parents:
diff changeset
164 (and (eq_attr "type" "store,store_c")
kono
parents:
diff changeset
165 (eq_attr "cpu" "ppce6500"))
kono
parents:
diff changeset
166 "e6500_decode,e6500_lsu")
kono
parents:
diff changeset
167
kono
parents:
diff changeset
168 (define_insn_reservation "e6500_fpstore" 3
kono
parents:
diff changeset
169 (and (eq_attr "type" "fpstore")
kono
parents:
diff changeset
170 (eq_attr "cpu" "ppce6500"))
kono
parents:
diff changeset
171 "e6500_decode,e6500_lsu")
kono
parents:
diff changeset
172
kono
parents:
diff changeset
173 (define_insn_reservation "e6500_vecstore" 4
kono
parents:
diff changeset
174 (and (eq_attr "type" "vecstore")
kono
parents:
diff changeset
175 (eq_attr "cpu" "ppce6500"))
kono
parents:
diff changeset
176 "e6500_decode,e6500_lsu")
kono
parents:
diff changeset
177
kono
parents:
diff changeset
178 ;; FP.
kono
parents:
diff changeset
179 (define_insn_reservation "e6500_float" 7
kono
parents:
diff changeset
180 (and (eq_attr "type" "fpsimple,fp,fpcompare,dmul")
kono
parents:
diff changeset
181 (eq_attr "cpu" "ppce6500"))
kono
parents:
diff changeset
182 "e6500_decode,e6500_fpu")
kono
parents:
diff changeset
183
kono
parents:
diff changeset
184 (define_insn_reservation "e6500_sdiv" 20
kono
parents:
diff changeset
185 (and (eq_attr "type" "sdiv")
kono
parents:
diff changeset
186 (eq_attr "cpu" "ppce6500"))
kono
parents:
diff changeset
187 "e6500_decode,e6500_fpu*20")
kono
parents:
diff changeset
188
kono
parents:
diff changeset
189 (define_insn_reservation "e6500_ddiv" 35
kono
parents:
diff changeset
190 (and (eq_attr "type" "ddiv")
kono
parents:
diff changeset
191 (eq_attr "cpu" "ppce6500"))
kono
parents:
diff changeset
192 "e6500_decode,e6500_fpu*35")
kono
parents:
diff changeset
193
kono
parents:
diff changeset
194 ;; BU.
kono
parents:
diff changeset
195 (define_insn_reservation "e6500_branch" 1
kono
parents:
diff changeset
196 (and (eq_attr "type" "jmpreg,branch,isync")
kono
parents:
diff changeset
197 (eq_attr "cpu" "ppce6500"))
kono
parents:
diff changeset
198 "e6500_decode,e6500_bu")
kono
parents:
diff changeset
199
kono
parents:
diff changeset
200 ;; BU - CR logical.
kono
parents:
diff changeset
201 (define_insn_reservation "e6500_cr_logical" 1
kono
parents:
diff changeset
202 (and (eq_attr "type" "cr_logical,delayed_cr")
kono
parents:
diff changeset
203 (eq_attr "cpu" "ppce6500"))
kono
parents:
diff changeset
204 "e6500_decode,e6500_bu")
kono
parents:
diff changeset
205
kono
parents:
diff changeset
206 ;; VSFX.
kono
parents:
diff changeset
207 (define_insn_reservation "e6500_vecsimple" 1
kono
parents:
diff changeset
208 (and (eq_attr "type" "vecsimple,veclogical,vecmove,veccmp,veccmpfx")
kono
parents:
diff changeset
209 (eq_attr "cpu" "ppce6500"))
kono
parents:
diff changeset
210 "e6500_decode,e6500_vec")
kono
parents:
diff changeset
211
kono
parents:
diff changeset
212 ;; VCFX.
kono
parents:
diff changeset
213 (define_insn_reservation "e6500_veccomplex" 4
kono
parents:
diff changeset
214 (and (eq_attr "type" "veccomplex")
kono
parents:
diff changeset
215 (eq_attr "cpu" "ppce6500"))
kono
parents:
diff changeset
216 "e6500_decode,e6500_vec")
kono
parents:
diff changeset
217
kono
parents:
diff changeset
218 ;; VFPU.
kono
parents:
diff changeset
219 (define_insn_reservation "e6500_vecfloat" 6
kono
parents:
diff changeset
220 (and (eq_attr "type" "vecfloat")
kono
parents:
diff changeset
221 (eq_attr "cpu" "ppce6500"))
kono
parents:
diff changeset
222 "e6500_decode,e6500_vec")
kono
parents:
diff changeset
223
kono
parents:
diff changeset
224 ;; VPERM.
kono
parents:
diff changeset
225 (define_insn_reservation "e6500_vecperm" 2
kono
parents:
diff changeset
226 (and (eq_attr "type" "vecperm")
kono
parents:
diff changeset
227 (eq_attr "cpu" "ppce6500"))
kono
parents:
diff changeset
228 "e6500_decode,e6500_vecperm")