annotate gcc/config/powerpcspe/7450.md @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children 84e7813d76e9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ;; Scheduling description for Motorola PowerPC 7450 processor.
kono
parents:
diff changeset
2 ;; Copyright (C) 2003-2017 Free Software Foundation, Inc.
kono
parents:
diff changeset
3 ;;
kono
parents:
diff changeset
4 ;; This file is part of GCC.
kono
parents:
diff changeset
5
kono
parents:
diff changeset
6 ;; GCC is free software; you can redistribute it and/or modify it
kono
parents:
diff changeset
7 ;; under the terms of the GNU General Public License as published
kono
parents:
diff changeset
8 ;; by the Free Software Foundation; either version 3, or (at your
kono
parents:
diff changeset
9 ;; option) any later version.
kono
parents:
diff changeset
10
kono
parents:
diff changeset
11 ;; GCC is distributed in the hope that it will be useful, but WITHOUT
kono
parents:
diff changeset
12 ;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
kono
parents:
diff changeset
13 ;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
kono
parents:
diff changeset
14 ;; License for more details.
kono
parents:
diff changeset
15
kono
parents:
diff changeset
16 ;; You should have received a copy of the GNU General Public License
kono
parents:
diff changeset
17 ;; along with GCC; see the file COPYING3. If not see
kono
parents:
diff changeset
18 ;; <http://www.gnu.org/licenses/>.
kono
parents:
diff changeset
19
kono
parents:
diff changeset
20 (define_automaton "ppc7450,ppc7450mciu,ppc7450fp,ppc7450vec")
kono
parents:
diff changeset
21 (define_cpu_unit "iu1_7450,iu2_7450,iu3_7450" "ppc7450")
kono
parents:
diff changeset
22 (define_cpu_unit "mciu_7450" "ppc7450mciu")
kono
parents:
diff changeset
23 (define_cpu_unit "fpu_7450" "ppc7450fp")
kono
parents:
diff changeset
24 (define_cpu_unit "lsu_7450,bpu_7450" "ppc7450")
kono
parents:
diff changeset
25 (define_cpu_unit "du1_7450,du2_7450,du3_7450" "ppc7450")
kono
parents:
diff changeset
26 (define_cpu_unit "vecsmpl_7450,veccmplx_7450,vecflt_7450,vecperm_7450" "ppc7450vec")
kono
parents:
diff changeset
27 (define_cpu_unit "vdu1_7450,vdu2_7450" "ppc7450vec")
kono
parents:
diff changeset
28
kono
parents:
diff changeset
29
kono
parents:
diff changeset
30 ;; PPC7450 32-bit 3xIU, MCIU, LSU, SRU, FPU, BPU, 4xVEC
kono
parents:
diff changeset
31 ;; IU1,IU2,IU3 can perform all integer operations
kono
parents:
diff changeset
32 ;; MCIU performs imul and idiv, cr logical, SPR moves
kono
parents:
diff changeset
33 ;; LSU 2 stage pipelined
kono
parents:
diff changeset
34 ;; FPU 3 stage pipelined
kono
parents:
diff changeset
35 ;; It also has 4 vector units, one for each type of vector instruction.
kono
parents:
diff changeset
36 ;; However, we can only dispatch 2 instructions per cycle.
kono
parents:
diff changeset
37 ;; Max issue 3 insns/clock cycle (includes 1 branch)
kono
parents:
diff changeset
38 ;; In-order execution
kono
parents:
diff changeset
39
kono
parents:
diff changeset
40 ;; Branches go straight to the BPU. All other insns are handled
kono
parents:
diff changeset
41 ;; by a dispatch unit which can issue a max of 3 insns per cycle.
kono
parents:
diff changeset
42 (define_reservation "ppc7450_du" "du1_7450|du2_7450|du3_7450")
kono
parents:
diff changeset
43 (define_reservation "ppc7450_vec_du" "vdu1_7450|vdu2_7450")
kono
parents:
diff changeset
44
kono
parents:
diff changeset
45 (define_insn_reservation "ppc7450-load" 3
kono
parents:
diff changeset
46 (and (eq_attr "type" "load,vecload")
kono
parents:
diff changeset
47 (eq_attr "cpu" "ppc7450"))
kono
parents:
diff changeset
48 "ppc7450_du,lsu_7450")
kono
parents:
diff changeset
49
kono
parents:
diff changeset
50 (define_insn_reservation "ppc7450-store" 3
kono
parents:
diff changeset
51 (and (eq_attr "type" "store,vecstore")
kono
parents:
diff changeset
52 (eq_attr "cpu" "ppc7450"))
kono
parents:
diff changeset
53 "ppc7450_du,lsu_7450")
kono
parents:
diff changeset
54
kono
parents:
diff changeset
55 (define_insn_reservation "ppc7450-fpload" 4
kono
parents:
diff changeset
56 (and (eq_attr "type" "fpload")
kono
parents:
diff changeset
57 (eq_attr "cpu" "ppc7450"))
kono
parents:
diff changeset
58 "ppc7450_du,lsu_7450")
kono
parents:
diff changeset
59
kono
parents:
diff changeset
60 (define_insn_reservation "ppc7450-fpstore" 3
kono
parents:
diff changeset
61 (and (eq_attr "type" "fpstore")
kono
parents:
diff changeset
62 (eq_attr "cpu" "ppc7450"))
kono
parents:
diff changeset
63 "ppc7450_du,lsu_7450*3")
kono
parents:
diff changeset
64
kono
parents:
diff changeset
65 (define_insn_reservation "ppc7450-llsc" 3
kono
parents:
diff changeset
66 (and (eq_attr "type" "load_l,store_c")
kono
parents:
diff changeset
67 (eq_attr "cpu" "ppc7450"))
kono
parents:
diff changeset
68 "ppc7450_du,lsu_7450")
kono
parents:
diff changeset
69
kono
parents:
diff changeset
70 (define_insn_reservation "ppc7450-sync" 35
kono
parents:
diff changeset
71 (and (eq_attr "type" "sync")
kono
parents:
diff changeset
72 (eq_attr "cpu" "ppc7450"))
kono
parents:
diff changeset
73 "ppc7450_du,lsu_7450")
kono
parents:
diff changeset
74
kono
parents:
diff changeset
75 (define_insn_reservation "ppc7450-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" "ppc7450"))
kono
parents:
diff changeset
80 "ppc7450_du,iu1_7450|iu2_7450|iu3_7450")
kono
parents:
diff changeset
81
kono
parents:
diff changeset
82 (define_insn_reservation "ppc7450-two" 1
kono
parents:
diff changeset
83 (and (eq_attr "type" "two")
kono
parents:
diff changeset
84 (eq_attr "cpu" "ppc7450"))
kono
parents:
diff changeset
85 "ppc7450_du,iu1_7450|iu2_7450|iu3_7450,iu1_7450|iu2_7450|iu3_7450")
kono
parents:
diff changeset
86
kono
parents:
diff changeset
87 (define_insn_reservation "ppc7450-three" 1
kono
parents:
diff changeset
88 (and (eq_attr "type" "three")
kono
parents:
diff changeset
89 (eq_attr "cpu" "ppc7450"))
kono
parents:
diff changeset
90 "ppc7450_du,iu1_7450|iu2_7450|iu3_7450,\
kono
parents:
diff changeset
91 iu1_7450|iu2_7450|iu3_7450,iu1_7450|iu2_7450|iu3_7450")
kono
parents:
diff changeset
92
kono
parents:
diff changeset
93 (define_insn_reservation "ppc7450-imul" 4
kono
parents:
diff changeset
94 (and (eq_attr "type" "mul")
kono
parents:
diff changeset
95 (eq_attr "size" "32")
kono
parents:
diff changeset
96 (eq_attr "cpu" "ppc7450"))
kono
parents:
diff changeset
97 "ppc7450_du,mciu_7450*2")
kono
parents:
diff changeset
98
kono
parents:
diff changeset
99 (define_insn_reservation "ppc7450-imul2" 3
kono
parents:
diff changeset
100 (and (eq_attr "type" "mul")
kono
parents:
diff changeset
101 (eq_attr "size" "8,16")
kono
parents:
diff changeset
102 (eq_attr "cpu" "ppc7450"))
kono
parents:
diff changeset
103 "ppc7450_du,mciu_7450")
kono
parents:
diff changeset
104
kono
parents:
diff changeset
105 (define_insn_reservation "ppc7450-idiv" 23
kono
parents:
diff changeset
106 (and (eq_attr "type" "div")
kono
parents:
diff changeset
107 (eq_attr "cpu" "ppc7450"))
kono
parents:
diff changeset
108 "ppc7450_du,mciu_7450*23")
kono
parents:
diff changeset
109
kono
parents:
diff changeset
110 (define_insn_reservation "ppc7450-compare" 2
kono
parents:
diff changeset
111 (and (ior (eq_attr "type" "cmp")
kono
parents:
diff changeset
112 (and (eq_attr "type" "add,logical,shift,exts")
kono
parents:
diff changeset
113 (eq_attr "dot" "yes")))
kono
parents:
diff changeset
114 (eq_attr "cpu" "ppc7450"))
kono
parents:
diff changeset
115 "ppc7450_du,(iu1_7450|iu2_7450|iu3_7450)")
kono
parents:
diff changeset
116
kono
parents:
diff changeset
117 (define_insn_reservation "ppc7450-fpcompare" 5
kono
parents:
diff changeset
118 (and (eq_attr "type" "fpcompare")
kono
parents:
diff changeset
119 (eq_attr "cpu" "ppc7450"))
kono
parents:
diff changeset
120 "ppc7450_du,fpu_7450")
kono
parents:
diff changeset
121
kono
parents:
diff changeset
122 (define_insn_reservation "ppc7450-fp" 5
kono
parents:
diff changeset
123 (and (eq_attr "type" "fp,fpsimple,dmul")
kono
parents:
diff changeset
124 (eq_attr "cpu" "ppc7450"))
kono
parents:
diff changeset
125 "ppc7450_du,fpu_7450")
kono
parents:
diff changeset
126
kono
parents:
diff changeset
127 ; Divides are not pipelined
kono
parents:
diff changeset
128 (define_insn_reservation "ppc7450-sdiv" 21
kono
parents:
diff changeset
129 (and (eq_attr "type" "sdiv")
kono
parents:
diff changeset
130 (eq_attr "cpu" "ppc7450"))
kono
parents:
diff changeset
131 "ppc7450_du,fpu_7450*21")
kono
parents:
diff changeset
132
kono
parents:
diff changeset
133 (define_insn_reservation "ppc7450-ddiv" 35
kono
parents:
diff changeset
134 (and (eq_attr "type" "ddiv")
kono
parents:
diff changeset
135 (eq_attr "cpu" "ppc7450"))
kono
parents:
diff changeset
136 "ppc7450_du,fpu_7450*35")
kono
parents:
diff changeset
137
kono
parents:
diff changeset
138 (define_insn_reservation "ppc7450-mfcr" 2
kono
parents:
diff changeset
139 (and (eq_attr "type" "mfcr,mtcr")
kono
parents:
diff changeset
140 (eq_attr "cpu" "ppc7450"))
kono
parents:
diff changeset
141 "ppc7450_du,mciu_7450")
kono
parents:
diff changeset
142
kono
parents:
diff changeset
143 (define_insn_reservation "ppc7450-crlogical" 1
kono
parents:
diff changeset
144 (and (eq_attr "type" "cr_logical,delayed_cr")
kono
parents:
diff changeset
145 (eq_attr "cpu" "ppc7450"))
kono
parents:
diff changeset
146 "ppc7450_du,mciu_7450")
kono
parents:
diff changeset
147
kono
parents:
diff changeset
148 (define_insn_reservation "ppc7450-mtjmpr" 2
kono
parents:
diff changeset
149 (and (eq_attr "type" "mtjmpr")
kono
parents:
diff changeset
150 (eq_attr "cpu" "ppc7450"))
kono
parents:
diff changeset
151 "nothing,mciu_7450*2")
kono
parents:
diff changeset
152
kono
parents:
diff changeset
153 (define_insn_reservation "ppc7450-mfjmpr" 3
kono
parents:
diff changeset
154 (and (eq_attr "type" "mfjmpr")
kono
parents:
diff changeset
155 (eq_attr "cpu" "ppc7450"))
kono
parents:
diff changeset
156 "nothing,mciu_7450*2")
kono
parents:
diff changeset
157
kono
parents:
diff changeset
158 (define_insn_reservation "ppc7450-jmpreg" 1
kono
parents:
diff changeset
159 (and (eq_attr "type" "jmpreg,branch,isync")
kono
parents:
diff changeset
160 (eq_attr "cpu" "ppc7450"))
kono
parents:
diff changeset
161 "nothing,bpu_7450")
kono
parents:
diff changeset
162
kono
parents:
diff changeset
163 ;; Altivec
kono
parents:
diff changeset
164 (define_insn_reservation "ppc7450-vecsimple" 1
kono
parents:
diff changeset
165 (and (eq_attr "type" "vecsimple,veclogical,vecmove")
kono
parents:
diff changeset
166 (eq_attr "cpu" "ppc7450"))
kono
parents:
diff changeset
167 "ppc7450_du,ppc7450_vec_du,vecsmpl_7450")
kono
parents:
diff changeset
168
kono
parents:
diff changeset
169 (define_insn_reservation "ppc7450-veccomplex" 4
kono
parents:
diff changeset
170 (and (eq_attr "type" "veccomplex")
kono
parents:
diff changeset
171 (eq_attr "cpu" "ppc7450"))
kono
parents:
diff changeset
172 "ppc7450_du,ppc7450_vec_du,veccmplx_7450")
kono
parents:
diff changeset
173
kono
parents:
diff changeset
174 (define_insn_reservation "ppc7450-veccmp" 2
kono
parents:
diff changeset
175 (and (eq_attr "type" "veccmp,veccmpfx")
kono
parents:
diff changeset
176 (eq_attr "cpu" "ppc7450"))
kono
parents:
diff changeset
177 "ppc7450_du,ppc7450_vec_du,veccmplx_7450")
kono
parents:
diff changeset
178
kono
parents:
diff changeset
179 (define_insn_reservation "ppc7450-vecfloat" 4
kono
parents:
diff changeset
180 (and (eq_attr "type" "vecfloat")
kono
parents:
diff changeset
181 (eq_attr "cpu" "ppc7450"))
kono
parents:
diff changeset
182 "ppc7450_du,ppc7450_vec_du,vecflt_7450")
kono
parents:
diff changeset
183
kono
parents:
diff changeset
184 (define_insn_reservation "ppc7450-vecperm" 2
kono
parents:
diff changeset
185 (and (eq_attr "type" "vecperm")
kono
parents:
diff changeset
186 (eq_attr "cpu" "ppc7450"))
kono
parents:
diff changeset
187 "ppc7450_du,ppc7450_vec_du,vecperm_7450")
kono
parents:
diff changeset
188