annotate gcc/config/powerpcspe/e5500.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 e5500 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 ;; e5500 64-bit SFX(2), CFX, LSU, FPU, BU
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 "e5500_most,e5500_long")
kono
parents:
diff changeset
25 (define_cpu_unit "e5500_decode_0,e5500_decode_1" "e5500_most")
kono
parents:
diff changeset
26
kono
parents:
diff changeset
27 ;; SFX.
kono
parents:
diff changeset
28 (define_cpu_unit "e5500_sfx_0,e5500_sfx_1" "e5500_most")
kono
parents:
diff changeset
29
kono
parents:
diff changeset
30 ;; CFX.
kono
parents:
diff changeset
31 (define_cpu_unit "e5500_cfx_stage0,e5500_cfx_stage1" "e5500_most")
kono
parents:
diff changeset
32
kono
parents:
diff changeset
33 ;; Non-pipelined division.
kono
parents:
diff changeset
34 (define_cpu_unit "e5500_cfx_div" "e5500_long")
kono
parents:
diff changeset
35
kono
parents:
diff changeset
36 ;; LSU.
kono
parents:
diff changeset
37 (define_cpu_unit "e5500_lsu" "e5500_most")
kono
parents:
diff changeset
38
kono
parents:
diff changeset
39 ;; FPU.
kono
parents:
diff changeset
40 (define_cpu_unit "e5500_fpu" "e5500_long")
kono
parents:
diff changeset
41
kono
parents:
diff changeset
42 ;; BU.
kono
parents:
diff changeset
43 (define_cpu_unit "e5500_bu" "e5500_most")
kono
parents:
diff changeset
44
kono
parents:
diff changeset
45 ;; The following units are used to make the automata deterministic.
kono
parents:
diff changeset
46 (define_cpu_unit "present_e5500_decode_0" "e5500_most")
kono
parents:
diff changeset
47 (define_cpu_unit "present_e5500_sfx_0" "e5500_most")
kono
parents:
diff changeset
48 (presence_set "present_e5500_decode_0" "e5500_decode_0")
kono
parents:
diff changeset
49 (presence_set "present_e5500_sfx_0" "e5500_sfx_0")
kono
parents:
diff changeset
50
kono
parents:
diff changeset
51 ;; Some useful abbreviations.
kono
parents:
diff changeset
52 (define_reservation "e5500_decode"
kono
parents:
diff changeset
53 "e5500_decode_0|e5500_decode_1+present_e5500_decode_0")
kono
parents:
diff changeset
54 (define_reservation "e5500_sfx"
kono
parents:
diff changeset
55 "e5500_sfx_0|e5500_sfx_1+present_e5500_sfx_0")
kono
parents:
diff changeset
56
kono
parents:
diff changeset
57 ;; SFX.
kono
parents:
diff changeset
58 (define_insn_reservation "e5500_sfx" 1
kono
parents:
diff changeset
59 (and (ior (eq_attr "type" "integer,insert,cntlz")
kono
parents:
diff changeset
60 (and (eq_attr "type" "add,logical,exts")
kono
parents:
diff changeset
61 (eq_attr "dot" "no"))
kono
parents:
diff changeset
62 (and (eq_attr "type" "shift")
kono
parents:
diff changeset
63 (eq_attr "var_shift" "no")))
kono
parents:
diff changeset
64 (eq_attr "cpu" "ppce5500"))
kono
parents:
diff changeset
65 "e5500_decode,e5500_sfx")
kono
parents:
diff changeset
66
kono
parents:
diff changeset
67 (define_insn_reservation "e5500_sfx2" 2
kono
parents:
diff changeset
68 (and (ior (eq_attr "type" "cmp,trap")
kono
parents:
diff changeset
69 (and (eq_attr "type" "add,logical,exts")
kono
parents:
diff changeset
70 (eq_attr "dot" "yes"))
kono
parents:
diff changeset
71 (and (eq_attr "type" "shift")
kono
parents:
diff changeset
72 (eq_attr "dot" "yes")
kono
parents:
diff changeset
73 (eq_attr "var_shift" "no")))
kono
parents:
diff changeset
74 (eq_attr "cpu" "ppce5500"))
kono
parents:
diff changeset
75 "e5500_decode,e5500_sfx")
kono
parents:
diff changeset
76
kono
parents:
diff changeset
77 (define_insn_reservation "e5500_delayed" 2
kono
parents:
diff changeset
78 (and (eq_attr "type" "shift")
kono
parents:
diff changeset
79 (eq_attr "var_shift" "yes")
kono
parents:
diff changeset
80 (eq_attr "cpu" "ppce5500"))
kono
parents:
diff changeset
81 "e5500_decode,e5500_sfx*2")
kono
parents:
diff changeset
82
kono
parents:
diff changeset
83 (define_insn_reservation "e5500_two" 2
kono
parents:
diff changeset
84 (and (eq_attr "type" "two")
kono
parents:
diff changeset
85 (eq_attr "cpu" "ppce5500"))
kono
parents:
diff changeset
86 "e5500_decode,e5500_decode+e5500_sfx,e5500_sfx")
kono
parents:
diff changeset
87
kono
parents:
diff changeset
88 (define_insn_reservation "e5500_three" 3
kono
parents:
diff changeset
89 (and (eq_attr "type" "three")
kono
parents:
diff changeset
90 (eq_attr "cpu" "ppce5500"))
kono
parents:
diff changeset
91 "e5500_decode,(e5500_decode+e5500_sfx)*2,e5500_sfx")
kono
parents:
diff changeset
92
kono
parents:
diff changeset
93 ;; SFX - Mfcr.
kono
parents:
diff changeset
94 (define_insn_reservation "e5500_mfcr" 4
kono
parents:
diff changeset
95 (and (eq_attr "type" "mfcr")
kono
parents:
diff changeset
96 (eq_attr "cpu" "ppce5500"))
kono
parents:
diff changeset
97 "e5500_decode,e5500_sfx_0*4")
kono
parents:
diff changeset
98
kono
parents:
diff changeset
99 ;; SFX - Mtcrf.
kono
parents:
diff changeset
100 (define_insn_reservation "e5500_mtcrf" 1
kono
parents:
diff changeset
101 (and (eq_attr "type" "mtcr")
kono
parents:
diff changeset
102 (eq_attr "cpu" "ppce5500"))
kono
parents:
diff changeset
103 "e5500_decode,e5500_sfx_0")
kono
parents:
diff changeset
104
kono
parents:
diff changeset
105 ;; SFX - Mtjmpr.
kono
parents:
diff changeset
106 (define_insn_reservation "e5500_mtjmpr" 1
kono
parents:
diff changeset
107 (and (eq_attr "type" "mtjmpr,mfjmpr")
kono
parents:
diff changeset
108 (eq_attr "cpu" "ppce5500"))
kono
parents:
diff changeset
109 "e5500_decode,e5500_sfx")
kono
parents:
diff changeset
110
kono
parents:
diff changeset
111 ;; CFX - Multiply.
kono
parents:
diff changeset
112 (define_insn_reservation "e5500_multiply" 4
kono
parents:
diff changeset
113 (and (eq_attr "type" "mul")
kono
parents:
diff changeset
114 (eq_attr "dot" "no")
kono
parents:
diff changeset
115 (eq_attr "size" "32")
kono
parents:
diff changeset
116 (eq_attr "cpu" "ppce5500"))
kono
parents:
diff changeset
117 "e5500_decode,e5500_cfx_stage0,e5500_cfx_stage1")
kono
parents:
diff changeset
118
kono
parents:
diff changeset
119 (define_insn_reservation "e5500_multiply_i" 5
kono
parents:
diff changeset
120 (and (eq_attr "type" "mul")
kono
parents:
diff changeset
121 (ior (eq_attr "dot" "yes")
kono
parents:
diff changeset
122 (eq_attr "size" "8,16"))
kono
parents:
diff changeset
123 (eq_attr "cpu" "ppce5500"))
kono
parents:
diff changeset
124 "e5500_decode,e5500_cfx_stage0,\
kono
parents:
diff changeset
125 e5500_cfx_stage0+e5500_cfx_stage1,e5500_cfx_stage1")
kono
parents:
diff changeset
126
kono
parents:
diff changeset
127 ;; CFX - Divide.
kono
parents:
diff changeset
128 (define_insn_reservation "e5500_divide" 16
kono
parents:
diff changeset
129 (and (eq_attr "type" "div")
kono
parents:
diff changeset
130 (eq_attr "size" "32")
kono
parents:
diff changeset
131 (eq_attr "cpu" "ppce5500"))
kono
parents:
diff changeset
132 "e5500_decode,e5500_cfx_stage0+e5500_cfx_div,\
kono
parents:
diff changeset
133 e5500_cfx_div*15")
kono
parents:
diff changeset
134
kono
parents:
diff changeset
135 (define_insn_reservation "e5500_divide_d" 26
kono
parents:
diff changeset
136 (and (eq_attr "type" "div")
kono
parents:
diff changeset
137 (eq_attr "size" "64")
kono
parents:
diff changeset
138 (eq_attr "cpu" "ppce5500"))
kono
parents:
diff changeset
139 "e5500_decode,e5500_cfx_stage0+e5500_cfx_div,\
kono
parents:
diff changeset
140 e5500_cfx_div*25")
kono
parents:
diff changeset
141
kono
parents:
diff changeset
142 ;; LSU - Loads.
kono
parents:
diff changeset
143 (define_insn_reservation "e5500_load" 3
kono
parents:
diff changeset
144 (and (eq_attr "type" "load,load_l,sync")
kono
parents:
diff changeset
145 (eq_attr "cpu" "ppce5500"))
kono
parents:
diff changeset
146 "e5500_decode,e5500_lsu")
kono
parents:
diff changeset
147
kono
parents:
diff changeset
148 (define_insn_reservation "e5500_fpload" 4
kono
parents:
diff changeset
149 (and (eq_attr "type" "fpload")
kono
parents:
diff changeset
150 (eq_attr "cpu" "ppce5500"))
kono
parents:
diff changeset
151 "e5500_decode,e5500_lsu")
kono
parents:
diff changeset
152
kono
parents:
diff changeset
153 ;; LSU - Stores.
kono
parents:
diff changeset
154 (define_insn_reservation "e5500_store" 3
kono
parents:
diff changeset
155 (and (eq_attr "type" "store,store_c")
kono
parents:
diff changeset
156 (eq_attr "cpu" "ppce5500"))
kono
parents:
diff changeset
157 "e5500_decode,e5500_lsu")
kono
parents:
diff changeset
158
kono
parents:
diff changeset
159 (define_insn_reservation "e5500_fpstore" 3
kono
parents:
diff changeset
160 (and (eq_attr "type" "fpstore")
kono
parents:
diff changeset
161 (eq_attr "cpu" "ppce5500"))
kono
parents:
diff changeset
162 "e5500_decode,e5500_lsu")
kono
parents:
diff changeset
163
kono
parents:
diff changeset
164 ;; FP.
kono
parents:
diff changeset
165 (define_insn_reservation "e5500_float" 7
kono
parents:
diff changeset
166 (and (eq_attr "type" "fpsimple,fp,fpcompare,dmul")
kono
parents:
diff changeset
167 (eq_attr "cpu" "ppce5500"))
kono
parents:
diff changeset
168 "e5500_decode,e5500_fpu")
kono
parents:
diff changeset
169
kono
parents:
diff changeset
170 (define_insn_reservation "e5500_sdiv" 20
kono
parents:
diff changeset
171 (and (eq_attr "type" "sdiv")
kono
parents:
diff changeset
172 (eq_attr "cpu" "ppce5500"))
kono
parents:
diff changeset
173 "e5500_decode,e5500_fpu*20")
kono
parents:
diff changeset
174
kono
parents:
diff changeset
175 (define_insn_reservation "e5500_ddiv" 35
kono
parents:
diff changeset
176 (and (eq_attr "type" "ddiv")
kono
parents:
diff changeset
177 (eq_attr "cpu" "ppce5500"))
kono
parents:
diff changeset
178 "e5500_decode,e5500_fpu*35")
kono
parents:
diff changeset
179
kono
parents:
diff changeset
180 ;; BU.
kono
parents:
diff changeset
181 (define_insn_reservation "e5500_branch" 1
kono
parents:
diff changeset
182 (and (eq_attr "type" "jmpreg,branch,isync")
kono
parents:
diff changeset
183 (eq_attr "cpu" "ppce5500"))
kono
parents:
diff changeset
184 "e5500_decode,e5500_bu")
kono
parents:
diff changeset
185
kono
parents:
diff changeset
186 ;; BU - CR logical.
kono
parents:
diff changeset
187 (define_insn_reservation "e5500_cr_logical" 1
kono
parents:
diff changeset
188 (and (eq_attr "type" "cr_logical,delayed_cr")
kono
parents:
diff changeset
189 (eq_attr "cpu" "ppce5500"))
kono
parents:
diff changeset
190 "e5500_decode,e5500_bu")