annotate gcc/config/powerpcspe/e500mc64.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 e500mc64 core.
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
2 ;; Copyright (C) 2009-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 ;; e500mc64 64-bit SU(2), LSU, FPU, BPU
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 "e500mc64_most,e500mc64_long,e500mc64_retire")
kono
parents:
diff changeset
25 (define_cpu_unit "e500mc64_decode_0,e500mc64_decode_1" "e500mc64_most")
kono
parents:
diff changeset
26 (define_cpu_unit "e500mc64_issue_0,e500mc64_issue_1" "e500mc64_most")
kono
parents:
diff changeset
27 (define_cpu_unit "e500mc64_retire_0,e500mc64_retire_1" "e500mc64_retire")
kono
parents:
diff changeset
28
kono
parents:
diff changeset
29 ;; SU.
kono
parents:
diff changeset
30 (define_cpu_unit "e500mc64_su0_stage0,e500mc64_su1_stage0" "e500mc64_most")
kono
parents:
diff changeset
31
kono
parents:
diff changeset
32 ;; MU.
kono
parents:
diff changeset
33 (define_cpu_unit "e500mc64_mu_stage0,e500mc64_mu_stage1" "e500mc64_most")
kono
parents:
diff changeset
34 (define_cpu_unit "e500mc64_mu_stage2,e500mc64_mu_stage3" "e500mc64_most")
kono
parents:
diff changeset
35
kono
parents:
diff changeset
36 ;; Non-pipelined division.
kono
parents:
diff changeset
37 (define_cpu_unit "e500mc64_mu_div" "e500mc64_long")
kono
parents:
diff changeset
38
kono
parents:
diff changeset
39 ;; LSU.
kono
parents:
diff changeset
40 (define_cpu_unit "e500mc64_lsu" "e500mc64_most")
kono
parents:
diff changeset
41
kono
parents:
diff changeset
42 ;; FPU.
kono
parents:
diff changeset
43 (define_cpu_unit "e500mc64_fpu" "e500mc64_most")
kono
parents:
diff changeset
44
kono
parents:
diff changeset
45 ;; Branch unit.
kono
parents:
diff changeset
46 (define_cpu_unit "e500mc64_bu" "e500mc64_most")
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_e500mc64_decode_0" "e500mc64_most")
kono
parents:
diff changeset
50 (define_cpu_unit "present_e500mc64_issue_0" "e500mc64_most")
kono
parents:
diff changeset
51 (define_cpu_unit "present_e500mc64_retire_0" "e500mc64_retire")
kono
parents:
diff changeset
52 (define_cpu_unit "present_e500mc64_su0_stage0" "e500mc64_most")
kono
parents:
diff changeset
53
kono
parents:
diff changeset
54 ;; The following sets to make automata deterministic when option ndfa is used.
kono
parents:
diff changeset
55 (presence_set "present_e500mc64_decode_0" "e500mc64_decode_0")
kono
parents:
diff changeset
56 (presence_set "present_e500mc64_issue_0" "e500mc64_issue_0")
kono
parents:
diff changeset
57 (presence_set "present_e500mc64_retire_0" "e500mc64_retire_0")
kono
parents:
diff changeset
58 (presence_set "present_e500mc64_su0_stage0" "e500mc64_su0_stage0")
kono
parents:
diff changeset
59
kono
parents:
diff changeset
60 ;; Some useful abbreviations.
kono
parents:
diff changeset
61 (define_reservation "e500mc64_decode"
kono
parents:
diff changeset
62 "e500mc64_decode_0|e500mc64_decode_1+present_e500mc64_decode_0")
kono
parents:
diff changeset
63 (define_reservation "e500mc64_issue"
kono
parents:
diff changeset
64 "e500mc64_issue_0|e500mc64_issue_1+present_e500mc64_issue_0")
kono
parents:
diff changeset
65 (define_reservation "e500mc64_retire"
kono
parents:
diff changeset
66 "e500mc64_retire_0|e500mc64_retire_1+present_e500mc64_retire_0")
kono
parents:
diff changeset
67 (define_reservation "e500mc64_su_stage0"
kono
parents:
diff changeset
68 "e500mc64_su0_stage0|e500mc64_su1_stage0+present_e500mc64_su0_stage0")
kono
parents:
diff changeset
69
kono
parents:
diff changeset
70 ;; Simple SU insns.
kono
parents:
diff changeset
71 (define_insn_reservation "e500mc64_su" 1
kono
parents:
diff changeset
72 (and (ior (eq_attr "type" "integer,insert,cntlz")
kono
parents:
diff changeset
73 (and (eq_attr "type" "add,logical,exts")
kono
parents:
diff changeset
74 (eq_attr "dot" "no"))
kono
parents:
diff changeset
75 (and (eq_attr "type" "shift")
kono
parents:
diff changeset
76 (eq_attr "dot" "no")
kono
parents:
diff changeset
77 (eq_attr "var_shift" "no")))
kono
parents:
diff changeset
78 (eq_attr "cpu" "ppce500mc64"))
kono
parents:
diff changeset
79 "e500mc64_decode,e500mc64_issue+e500mc64_su_stage0+e500mc64_retire")
kono
parents:
diff changeset
80
kono
parents:
diff changeset
81 (define_insn_reservation "e500mc64_su2" 2
kono
parents:
diff changeset
82 (and (ior (eq_attr "type" "cmp,trap")
kono
parents:
diff changeset
83 (and (eq_attr "type" "add,logical,exts")
kono
parents:
diff changeset
84 (eq_attr "dot" "yes"))
kono
parents:
diff changeset
85 (and (eq_attr "type" "shift")
kono
parents:
diff changeset
86 (eq_attr "dot" "yes")
kono
parents:
diff changeset
87 (eq_attr "var_shift" "no")))
kono
parents:
diff changeset
88 (eq_attr "cpu" "ppce500mc64"))
kono
parents:
diff changeset
89 "e500mc64_decode,e500mc64_issue+e500mc64_su_stage0,e500mc64_retire")
kono
parents:
diff changeset
90
kono
parents:
diff changeset
91 (define_insn_reservation "e500mc64_delayed" 2
kono
parents:
diff changeset
92 (and (eq_attr "type" "shift")
kono
parents:
diff changeset
93 (eq_attr "var_shift" "yes")
kono
parents:
diff changeset
94 (eq_attr "cpu" "ppce500mc64"))
kono
parents:
diff changeset
95 "e500mc64_decode,e500mc64_issue+e500mc64_su_stage0,e500mc64_retire")
kono
parents:
diff changeset
96
kono
parents:
diff changeset
97 (define_insn_reservation "e500mc64_two" 2
kono
parents:
diff changeset
98 (and (eq_attr "type" "two")
kono
parents:
diff changeset
99 (eq_attr "cpu" "ppce500mc64"))
kono
parents:
diff changeset
100 "e500mc64_decode,e500mc64_issue+e500mc64_su_stage0+e500mc64_retire,\
kono
parents:
diff changeset
101 e500mc64_issue+e500mc64_su_stage0+e500mc64_retire")
kono
parents:
diff changeset
102
kono
parents:
diff changeset
103 (define_insn_reservation "e500mc64_three" 3
kono
parents:
diff changeset
104 (and (eq_attr "type" "three")
kono
parents:
diff changeset
105 (eq_attr "cpu" "ppce500mc64"))
kono
parents:
diff changeset
106 "e500mc64_decode,e500mc64_issue+e500mc64_su_stage0+e500mc64_retire,\
kono
parents:
diff changeset
107 e500mc64_issue+e500mc64_su_stage0+e500mc64_retire,\
kono
parents:
diff changeset
108 e500mc64_issue+e500mc64_su_stage0+e500mc64_retire")
kono
parents:
diff changeset
109
kono
parents:
diff changeset
110 ;; Multiply.
kono
parents:
diff changeset
111 (define_insn_reservation "e500mc64_multiply" 4
kono
parents:
diff changeset
112 (and (eq_attr "type" "mul")
kono
parents:
diff changeset
113 (eq_attr "cpu" "ppce500mc64"))
kono
parents:
diff changeset
114 "e500mc64_decode,e500mc64_issue+e500mc64_mu_stage0,e500mc64_mu_stage1,\
kono
parents:
diff changeset
115 e500mc64_mu_stage2,e500mc64_mu_stage3+e500mc64_retire")
kono
parents:
diff changeset
116
kono
parents:
diff changeset
117 ;; Divide. We use the average latency time here.
kono
parents:
diff changeset
118 (define_insn_reservation "e500mc64_divide" 14
kono
parents:
diff changeset
119 (and (eq_attr "type" "div")
kono
parents:
diff changeset
120 (eq_attr "cpu" "ppce500mc64"))
kono
parents:
diff changeset
121 "e500mc64_decode,e500mc64_issue+e500mc64_mu_stage0+e500mc64_mu_div,\
kono
parents:
diff changeset
122 e500mc64_mu_div*13")
kono
parents:
diff changeset
123
kono
parents:
diff changeset
124 ;; Branch.
kono
parents:
diff changeset
125 (define_insn_reservation "e500mc64_branch" 1
kono
parents:
diff changeset
126 (and (eq_attr "type" "jmpreg,branch,isync")
kono
parents:
diff changeset
127 (eq_attr "cpu" "ppce500mc64"))
kono
parents:
diff changeset
128 "e500mc64_decode,e500mc64_bu,e500mc64_retire")
kono
parents:
diff changeset
129
kono
parents:
diff changeset
130 ;; CR logical.
kono
parents:
diff changeset
131 (define_insn_reservation "e500mc64_cr_logical" 1
kono
parents:
diff changeset
132 (and (eq_attr "type" "cr_logical,delayed_cr")
kono
parents:
diff changeset
133 (eq_attr "cpu" "ppce500mc64"))
kono
parents:
diff changeset
134 "e500mc64_decode,e500mc64_bu,e500mc64_retire")
kono
parents:
diff changeset
135
kono
parents:
diff changeset
136 ;; Mfcr.
kono
parents:
diff changeset
137 (define_insn_reservation "e500mc64_mfcr" 4
kono
parents:
diff changeset
138 (and (eq_attr "type" "mfcr")
kono
parents:
diff changeset
139 (eq_attr "cpu" "ppce500mc64"))
kono
parents:
diff changeset
140 "e500mc64_decode,e500mc64_issue+e500mc64_su1_stage0,e500mc64_su1_stage0*3+e500mc64_retire")
kono
parents:
diff changeset
141
kono
parents:
diff changeset
142 ;; Mtcrf.
kono
parents:
diff changeset
143 (define_insn_reservation "e500mc64_mtcrf" 1
kono
parents:
diff changeset
144 (and (eq_attr "type" "mtcr")
kono
parents:
diff changeset
145 (eq_attr "cpu" "ppce500mc64"))
kono
parents:
diff changeset
146 "e500mc64_decode,e500mc64_issue+e500mc64_su1_stage0+e500mc64_retire")
kono
parents:
diff changeset
147
kono
parents:
diff changeset
148 ;; Mtjmpr.
kono
parents:
diff changeset
149 (define_insn_reservation "e500mc64_mtjmpr" 1
kono
parents:
diff changeset
150 (and (eq_attr "type" "mtjmpr,mfjmpr")
kono
parents:
diff changeset
151 (eq_attr "cpu" "ppce500mc64"))
kono
parents:
diff changeset
152 "e500mc64_decode,e500mc64_issue+e500mc64_su_stage0+e500mc64_retire")
kono
parents:
diff changeset
153
kono
parents:
diff changeset
154 ;; Brinc.
kono
parents:
diff changeset
155 (define_insn_reservation "e500mc64_brinc" 1
kono
parents:
diff changeset
156 (and (eq_attr "type" "brinc")
kono
parents:
diff changeset
157 (eq_attr "cpu" "ppce500mc64"))
kono
parents:
diff changeset
158 "e500mc64_decode,e500mc64_issue+e500mc64_su_stage0+e500mc64_retire")
kono
parents:
diff changeset
159
kono
parents:
diff changeset
160 ;; Loads.
kono
parents:
diff changeset
161 (define_insn_reservation "e500mc64_load" 3
kono
parents:
diff changeset
162 (and (eq_attr "type" "load,load_l,sync")
kono
parents:
diff changeset
163 (eq_attr "cpu" "ppce500mc64"))
kono
parents:
diff changeset
164 "e500mc64_decode,e500mc64_issue+e500mc64_lsu,nothing,e500mc64_retire")
kono
parents:
diff changeset
165
kono
parents:
diff changeset
166 (define_insn_reservation "e500mc64_fpload" 4
kono
parents:
diff changeset
167 (and (eq_attr "type" "fpload")
kono
parents:
diff changeset
168 (eq_attr "cpu" "ppce500mc64"))
kono
parents:
diff changeset
169 "e500mc64_decode,e500mc64_issue+e500mc64_lsu,nothing*2,e500mc64_retire")
kono
parents:
diff changeset
170
kono
parents:
diff changeset
171 ;; Stores.
kono
parents:
diff changeset
172 (define_insn_reservation "e500mc64_store" 3
kono
parents:
diff changeset
173 (and (eq_attr "type" "store,store_c")
kono
parents:
diff changeset
174 (eq_attr "cpu" "ppce500mc64"))
kono
parents:
diff changeset
175 "e500mc64_decode,e500mc64_issue+e500mc64_lsu,nothing,e500mc64_retire")
kono
parents:
diff changeset
176
kono
parents:
diff changeset
177 (define_insn_reservation "e500mc64_fpstore" 3
kono
parents:
diff changeset
178 (and (eq_attr "type" "fpstore")
kono
parents:
diff changeset
179 (eq_attr "cpu" "ppce500mc64"))
kono
parents:
diff changeset
180 "e500mc64_decode,e500mc64_issue+e500mc64_lsu,nothing,e500mc64_retire")
kono
parents:
diff changeset
181
kono
parents:
diff changeset
182 ;; The following ignores the retire unit to avoid a large automata.
kono
parents:
diff changeset
183
kono
parents:
diff changeset
184 ;; FP.
kono
parents:
diff changeset
185 (define_insn_reservation "e500mc64_float" 7
kono
parents:
diff changeset
186 (and (eq_attr "type" "fpsimple,fp,fpcompare,dmul")
kono
parents:
diff changeset
187 (eq_attr "cpu" "ppce500mc64"))
kono
parents:
diff changeset
188 "e500mc64_decode,e500mc64_issue+e500mc64_fpu")
kono
parents:
diff changeset
189 ; "e500mc64_decode,e500mc64_issue+e500mc64_fpu,nothing*5,e500mc64_retire")
kono
parents:
diff changeset
190
kono
parents:
diff changeset
191 ;; FP divides are not pipelined.
kono
parents:
diff changeset
192 (define_insn_reservation "e500mc64_sdiv" 20
kono
parents:
diff changeset
193 (and (eq_attr "type" "sdiv")
kono
parents:
diff changeset
194 (eq_attr "cpu" "ppce500mc64"))
kono
parents:
diff changeset
195 "e500mc64_decode,e500mc64_issue+e500mc64_fpu,e500mc64_fpu*19")
kono
parents:
diff changeset
196
kono
parents:
diff changeset
197 (define_insn_reservation "e500mc64_ddiv" 35
kono
parents:
diff changeset
198 (and (eq_attr "type" "ddiv")
kono
parents:
diff changeset
199 (eq_attr "cpu" "ppce500mc64"))
kono
parents:
diff changeset
200 "e500mc64_decode,e500mc64_issue+e500mc64_fpu,e500mc64_fpu*34")