annotate gcc/config/powerpcspe/e300c2c3.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 Motorola PowerPC e300c3 core.
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
2 ;; Copyright (C) 2008-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 (define_automaton "ppce300c3_most,ppce300c3_long,ppce300c3_retire")
kono
parents:
diff changeset
22 (define_cpu_unit "ppce300c3_decode_0,ppce300c3_decode_1" "ppce300c3_most")
kono
parents:
diff changeset
23
kono
parents:
diff changeset
24 ;; We don't simulate general issue queue (GIC). If we have SU insn
kono
parents:
diff changeset
25 ;; and then SU1 insn, they can not be issued on the same cycle
kono
parents:
diff changeset
26 ;; (although SU1 insn and then SU insn can be issued) because the SU
kono
parents:
diff changeset
27 ;; insn will go to SU1 from GIC0 entry. Fortunately, the first cycle
kono
parents:
diff changeset
28 ;; multipass insn scheduling will find the situation and issue the SU1
kono
parents:
diff changeset
29 ;; insn and then the SU insn.
kono
parents:
diff changeset
30 (define_cpu_unit "ppce300c3_issue_0,ppce300c3_issue_1" "ppce300c3_most")
kono
parents:
diff changeset
31
kono
parents:
diff changeset
32 ;; We could describe completion buffers slots in combination with the
kono
parents:
diff changeset
33 ;; retirement units and the order of completion but the result
kono
parents:
diff changeset
34 ;; automaton would behave in the same way because we can not describe
kono
parents:
diff changeset
35 ;; real latency time with taking in order completion into account.
kono
parents:
diff changeset
36 ;; Actually we could define the real latency time by querying reserved
kono
parents:
diff changeset
37 ;; automaton units but the current scheduler uses latency time before
kono
parents:
diff changeset
38 ;; issuing insns and making any reservations.
kono
parents:
diff changeset
39 ;;
kono
parents:
diff changeset
40 ;; So our description is aimed to achieve a insn schedule in which the
kono
parents:
diff changeset
41 ;; insns would not wait in the completion buffer.
kono
parents:
diff changeset
42 (define_cpu_unit "ppce300c3_retire_0,ppce300c3_retire_1" "ppce300c3_retire")
kono
parents:
diff changeset
43
kono
parents:
diff changeset
44 ;; Branch unit:
kono
parents:
diff changeset
45 (define_cpu_unit "ppce300c3_bu" "ppce300c3_most")
kono
parents:
diff changeset
46
kono
parents:
diff changeset
47 ;; IU:
kono
parents:
diff changeset
48 (define_cpu_unit "ppce300c3_iu0_stage0,ppce300c3_iu1_stage0" "ppce300c3_most")
kono
parents:
diff changeset
49
kono
parents:
diff changeset
50 ;; IU: This used to describe non-pipelined division.
kono
parents:
diff changeset
51 (define_cpu_unit "ppce300c3_mu_div" "ppce300c3_long")
kono
parents:
diff changeset
52
kono
parents:
diff changeset
53 ;; SRU:
kono
parents:
diff changeset
54 (define_cpu_unit "ppce300c3_sru_stage0" "ppce300c3_most")
kono
parents:
diff changeset
55
kono
parents:
diff changeset
56 ;; Here we simplified LSU unit description not describing the stages.
kono
parents:
diff changeset
57 (define_cpu_unit "ppce300c3_lsu" "ppce300c3_most")
kono
parents:
diff changeset
58
kono
parents:
diff changeset
59 ;; FPU:
kono
parents:
diff changeset
60 (define_cpu_unit "ppce300c3_fpu" "ppce300c3_most")
kono
parents:
diff changeset
61
kono
parents:
diff changeset
62 ;; The following units are used to make automata deterministic
kono
parents:
diff changeset
63 (define_cpu_unit "present_ppce300c3_decode_0" "ppce300c3_most")
kono
parents:
diff changeset
64 (define_cpu_unit "present_ppce300c3_issue_0" "ppce300c3_most")
kono
parents:
diff changeset
65 (define_cpu_unit "present_ppce300c3_retire_0" "ppce300c3_retire")
kono
parents:
diff changeset
66 (define_cpu_unit "present_ppce300c3_iu0_stage0" "ppce300c3_most")
kono
parents:
diff changeset
67
kono
parents:
diff changeset
68 ;; The following sets to make automata deterministic when option ndfa is used.
kono
parents:
diff changeset
69 (presence_set "present_ppce300c3_decode_0" "ppce300c3_decode_0")
kono
parents:
diff changeset
70 (presence_set "present_ppce300c3_issue_0" "ppce300c3_issue_0")
kono
parents:
diff changeset
71 (presence_set "present_ppce300c3_retire_0" "ppce300c3_retire_0")
kono
parents:
diff changeset
72 (presence_set "present_ppce300c3_iu0_stage0" "ppce300c3_iu0_stage0")
kono
parents:
diff changeset
73
kono
parents:
diff changeset
74 ;; Some useful abbreviations.
kono
parents:
diff changeset
75 (define_reservation "ppce300c3_decode"
kono
parents:
diff changeset
76 "ppce300c3_decode_0|ppce300c3_decode_1+present_ppce300c3_decode_0")
kono
parents:
diff changeset
77 (define_reservation "ppce300c3_issue"
kono
parents:
diff changeset
78 "ppce300c3_issue_0|ppce300c3_issue_1+present_ppce300c3_issue_0")
kono
parents:
diff changeset
79 (define_reservation "ppce300c3_retire"
kono
parents:
diff changeset
80 "ppce300c3_retire_0|ppce300c3_retire_1+present_ppce300c3_retire_0")
kono
parents:
diff changeset
81 (define_reservation "ppce300c3_iu_stage0"
kono
parents:
diff changeset
82 "ppce300c3_iu0_stage0|ppce300c3_iu1_stage0+present_ppce300c3_iu0_stage0")
kono
parents:
diff changeset
83
kono
parents:
diff changeset
84 ;; Compares can be executed either one of the IU or SRU
kono
parents:
diff changeset
85 (define_insn_reservation "ppce300c3_cmp" 1
kono
parents:
diff changeset
86 (and (ior (eq_attr "type" "cmp")
kono
parents:
diff changeset
87 (and (eq_attr "type" "add,logical,shift,exts")
kono
parents:
diff changeset
88 (eq_attr "dot" "yes")))
kono
parents:
diff changeset
89 (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
kono
parents:
diff changeset
90 "ppce300c3_decode,ppce300c3_issue+(ppce300c3_iu_stage0|ppce300c3_sru_stage0) \
kono
parents:
diff changeset
91 +ppce300c3_retire")
kono
parents:
diff changeset
92
kono
parents:
diff changeset
93 ;; Other one cycle IU insns
kono
parents:
diff changeset
94 (define_insn_reservation "ppce300c3_iu" 1
kono
parents:
diff changeset
95 (and (ior (eq_attr "type" "integer,insert,isel")
kono
parents:
diff changeset
96 (and (eq_attr "type" "add,logical,shift,exts")
kono
parents:
diff changeset
97 (eq_attr "dot" "no")))
kono
parents:
diff changeset
98 (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
kono
parents:
diff changeset
99 "ppce300c3_decode,ppce300c3_issue+ppce300c3_iu_stage0+ppce300c3_retire")
kono
parents:
diff changeset
100
kono
parents:
diff changeset
101 ;; Branch. Actually this latency time is not used by the scheduler.
kono
parents:
diff changeset
102 (define_insn_reservation "ppce300c3_branch" 1
kono
parents:
diff changeset
103 (and (eq_attr "type" "jmpreg,branch")
kono
parents:
diff changeset
104 (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
kono
parents:
diff changeset
105 "ppce300c3_decode,ppce300c3_bu,ppce300c3_retire")
kono
parents:
diff changeset
106
kono
parents:
diff changeset
107 ;; Multiply is non-pipelined but can be executed in any IU
kono
parents:
diff changeset
108 (define_insn_reservation "ppce300c3_multiply" 2
kono
parents:
diff changeset
109 (and (eq_attr "type" "mul")
kono
parents:
diff changeset
110 (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
kono
parents:
diff changeset
111 "ppce300c3_decode,ppce300c3_issue+ppce300c3_iu_stage0, \
kono
parents:
diff changeset
112 ppce300c3_iu_stage0+ppce300c3_retire")
kono
parents:
diff changeset
113
kono
parents:
diff changeset
114 ;; Divide. We use the average latency time here. We omit reserving a
kono
parents:
diff changeset
115 ;; retire unit because of the result automata will be huge.
kono
parents:
diff changeset
116 (define_insn_reservation "ppce300c3_divide" 20
kono
parents:
diff changeset
117 (and (eq_attr "type" "div")
kono
parents:
diff changeset
118 (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
kono
parents:
diff changeset
119 "ppce300c3_decode,ppce300c3_issue+ppce300c3_iu_stage0+ppce300c3_mu_div,\
kono
parents:
diff changeset
120 ppce300c3_mu_div*19")
kono
parents:
diff changeset
121
kono
parents:
diff changeset
122 ;; CR logical
kono
parents:
diff changeset
123 (define_insn_reservation "ppce300c3_cr_logical" 1
kono
parents:
diff changeset
124 (and (eq_attr "type" "cr_logical,delayed_cr")
kono
parents:
diff changeset
125 (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
kono
parents:
diff changeset
126 "ppce300c3_decode,ppce300c3_issue+ppce300c3_sru_stage0+ppce300c3_retire")
kono
parents:
diff changeset
127
kono
parents:
diff changeset
128 ;; Mfcr
kono
parents:
diff changeset
129 (define_insn_reservation "ppce300c3_mfcr" 1
kono
parents:
diff changeset
130 (and (eq_attr "type" "mfcr")
kono
parents:
diff changeset
131 (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
kono
parents:
diff changeset
132 "ppce300c3_decode,ppce300c3_issue+ppce300c3_sru_stage0+ppce300c3_retire")
kono
parents:
diff changeset
133
kono
parents:
diff changeset
134 ;; Mtcrf
kono
parents:
diff changeset
135 (define_insn_reservation "ppce300c3_mtcrf" 1
kono
parents:
diff changeset
136 (and (eq_attr "type" "mtcr")
kono
parents:
diff changeset
137 (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
kono
parents:
diff changeset
138 "ppce300c3_decode,ppce300c3_issue+ppce300c3_sru_stage0+ppce300c3_retire")
kono
parents:
diff changeset
139
kono
parents:
diff changeset
140 ;; Mtjmpr
kono
parents:
diff changeset
141 (define_insn_reservation "ppce300c3_mtjmpr" 1
kono
parents:
diff changeset
142 (and (eq_attr "type" "mtjmpr,mfjmpr")
kono
parents:
diff changeset
143 (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
kono
parents:
diff changeset
144 "ppce300c3_decode,ppce300c3_issue+ppce300c3_sru_stage0+ppce300c3_retire")
kono
parents:
diff changeset
145
kono
parents:
diff changeset
146 ;; Float point instructions
kono
parents:
diff changeset
147 (define_insn_reservation "ppce300c3_fpcompare" 3
kono
parents:
diff changeset
148 (and (eq_attr "type" "fpcompare")
kono
parents:
diff changeset
149 (eq_attr "cpu" "ppce300c3"))
kono
parents:
diff changeset
150 "ppce300c3_decode,ppce300c3_issue+ppce300c3_fpu,nothing,ppce300c3_retire")
kono
parents:
diff changeset
151
kono
parents:
diff changeset
152 (define_insn_reservation "ppce300c3_fp" 3
kono
parents:
diff changeset
153 (and (eq_attr "type" "fp,fpsimple")
kono
parents:
diff changeset
154 (eq_attr "cpu" "ppce300c3"))
kono
parents:
diff changeset
155 "ppce300c3_decode,ppce300c3_issue+ppce300c3_fpu,nothing,ppce300c3_retire")
kono
parents:
diff changeset
156
kono
parents:
diff changeset
157 (define_insn_reservation "ppce300c3_dmul" 4
kono
parents:
diff changeset
158 (and (eq_attr "type" "dmul")
kono
parents:
diff changeset
159 (eq_attr "cpu" "ppce300c3"))
kono
parents:
diff changeset
160 "ppce300c3_decode,ppce300c3_issue+ppce300c3_fpu,ppce300c3_fpu,nothing,ppce300c3_retire")
kono
parents:
diff changeset
161
kono
parents:
diff changeset
162 ; Divides are not pipelined
kono
parents:
diff changeset
163 (define_insn_reservation "ppce300c3_sdiv" 18
kono
parents:
diff changeset
164 (and (eq_attr "type" "sdiv")
kono
parents:
diff changeset
165 (eq_attr "cpu" "ppce300c3"))
kono
parents:
diff changeset
166 "ppce300c3_decode,ppce300c3_issue+ppce300c3_fpu,ppce300c3_fpu*17")
kono
parents:
diff changeset
167
kono
parents:
diff changeset
168 (define_insn_reservation "ppce300c3_ddiv" 33
kono
parents:
diff changeset
169 (and (eq_attr "type" "ddiv")
kono
parents:
diff changeset
170 (eq_attr "cpu" "ppce300c3"))
kono
parents:
diff changeset
171 "ppce300c3_decode,ppce300c3_issue+ppce300c3_fpu,ppce300c3_fpu*32")
kono
parents:
diff changeset
172
kono
parents:
diff changeset
173 ;; Loads
kono
parents:
diff changeset
174 (define_insn_reservation "ppce300c3_load" 2
kono
parents:
diff changeset
175 (and (eq_attr "type" "load")
kono
parents:
diff changeset
176 (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
kono
parents:
diff changeset
177 "ppce300c3_decode,ppce300c3_issue+ppce300c3_lsu,ppce300c3_retire")
kono
parents:
diff changeset
178
kono
parents:
diff changeset
179 (define_insn_reservation "ppce300c3_fpload" 2
kono
parents:
diff changeset
180 (and (eq_attr "type" "fpload")
kono
parents:
diff changeset
181 (eq_attr "cpu" "ppce300c3"))
kono
parents:
diff changeset
182 "ppce300c3_decode,ppce300c3_issue+ppce300c3_lsu,ppce300c3_retire")
kono
parents:
diff changeset
183
kono
parents:
diff changeset
184 ;; Stores.
kono
parents:
diff changeset
185 (define_insn_reservation "ppce300c3_store" 2
kono
parents:
diff changeset
186 (and (eq_attr "type" "store")
kono
parents:
diff changeset
187 (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
kono
parents:
diff changeset
188 "ppce300c3_decode,ppce300c3_issue+ppce300c3_lsu,ppce300c3_retire")
kono
parents:
diff changeset
189
kono
parents:
diff changeset
190 (define_insn_reservation "ppce300c3_fpstore" 2
kono
parents:
diff changeset
191 (and (eq_attr "type" "fpstore")
kono
parents:
diff changeset
192 (eq_attr "cpu" "ppce300c3"))
kono
parents:
diff changeset
193 "ppce300c3_decode,ppce300c3_issue+ppce300c3_lsu,ppce300c3_retire")