annotate gcc/config/powerpcspe/7xx.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 750 and PowerPC 7400 processors.
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 "ppc7xx,ppc7xxfp")
kono
parents:
diff changeset
21 (define_cpu_unit "iu1_7xx,iu2_7xx" "ppc7xx")
kono
parents:
diff changeset
22 (define_cpu_unit "fpu_7xx" "ppc7xxfp")
kono
parents:
diff changeset
23 (define_cpu_unit "lsu_7xx,bpu_7xx,sru_7xx" "ppc7xx")
kono
parents:
diff changeset
24 (define_cpu_unit "du1_7xx,du2_7xx" "ppc7xx")
kono
parents:
diff changeset
25 (define_cpu_unit "veccmplx_7xx,vecperm_7xx,vdu_7xx" "ppc7xx")
kono
parents:
diff changeset
26
kono
parents:
diff changeset
27 ;; PPC740/PPC750/PPC7400 32-bit 2xIU, LSU, SRU, FPU, BPU
kono
parents:
diff changeset
28 ;; IU1 can perform all integer operations
kono
parents:
diff changeset
29 ;; IU2 can perform all integer operations except imul and idiv
kono
parents:
diff changeset
30 ;; LSU 2 stage pipelined
kono
parents:
diff changeset
31 ;; FPU 3 stage pipelined
kono
parents:
diff changeset
32 ;; Max issue 3 insns/clock cycle (includes 1 branch)
kono
parents:
diff changeset
33 ;; In-order execution
kono
parents:
diff changeset
34
kono
parents:
diff changeset
35
kono
parents:
diff changeset
36 ;; The PPC750 user's manual recommends that to reduce branch mispredictions,
kono
parents:
diff changeset
37 ;; the insn that sets CR bits should be separated from the branch insn
kono
parents:
diff changeset
38 ;; that evaluates them. There is no advantage have more than 10 cycles
kono
parents:
diff changeset
39 ;; of separation.
kono
parents:
diff changeset
40 ;; This could be artificially achieved by exaggerating the latency of
kono
parents:
diff changeset
41 ;; compare insns but at the expense of a poorer schedule.
kono
parents:
diff changeset
42
kono
parents:
diff changeset
43 ;; Branches go straight to the BPU. All other insns are handled
kono
parents:
diff changeset
44 ;; by a dispatch unit which can issue a max of 2 insns per cycle.
kono
parents:
diff changeset
45 (define_reservation "ppc750_du" "du1_7xx|du2_7xx")
kono
parents:
diff changeset
46 (define_reservation "ppc7400_vec_du" "vdu_7xx")
kono
parents:
diff changeset
47
kono
parents:
diff changeset
48 (define_insn_reservation "ppc750-load" 2
kono
parents:
diff changeset
49 (and (eq_attr "type" "load,fpload,vecload,load_l")
kono
parents:
diff changeset
50 (eq_attr "cpu" "ppc750,ppc7400"))
kono
parents:
diff changeset
51 "ppc750_du,lsu_7xx")
kono
parents:
diff changeset
52
kono
parents:
diff changeset
53 (define_insn_reservation "ppc750-store" 2
kono
parents:
diff changeset
54 (and (eq_attr "type" "store,fpstore,vecstore")
kono
parents:
diff changeset
55 (eq_attr "cpu" "ppc750,ppc7400"))
kono
parents:
diff changeset
56 "ppc750_du,lsu_7xx")
kono
parents:
diff changeset
57
kono
parents:
diff changeset
58 (define_insn_reservation "ppc750-storec" 8
kono
parents:
diff changeset
59 (and (eq_attr "type" "store_c")
kono
parents:
diff changeset
60 (eq_attr "cpu" "ppc750,ppc7400"))
kono
parents:
diff changeset
61 "ppc750_du,lsu_7xx")
kono
parents:
diff changeset
62
kono
parents:
diff changeset
63 (define_insn_reservation "ppc750-integer" 1
kono
parents:
diff changeset
64 (and (ior (eq_attr "type" "integer,insert,trap,cntlz,isel")
kono
parents:
diff changeset
65 (and (eq_attr "type" "add,logical,shift,exts")
kono
parents:
diff changeset
66 (eq_attr "dot" "no")))
kono
parents:
diff changeset
67 (eq_attr "cpu" "ppc750,ppc7400"))
kono
parents:
diff changeset
68 "ppc750_du,iu1_7xx|iu2_7xx")
kono
parents:
diff changeset
69
kono
parents:
diff changeset
70 (define_insn_reservation "ppc750-two" 1
kono
parents:
diff changeset
71 (and (eq_attr "type" "two")
kono
parents:
diff changeset
72 (eq_attr "cpu" "ppc750,ppc7400"))
kono
parents:
diff changeset
73 "ppc750_du,iu1_7xx|iu2_7xx,iu1_7xx|iu2_7xx")
kono
parents:
diff changeset
74
kono
parents:
diff changeset
75 (define_insn_reservation "ppc750-three" 1
kono
parents:
diff changeset
76 (and (eq_attr "type" "three")
kono
parents:
diff changeset
77 (eq_attr "cpu" "ppc750,ppc7400"))
kono
parents:
diff changeset
78 "ppc750_du,iu1_7xx|iu2_7xx,iu1_7xx|iu2_7xx,iu1_7xx|iu2_7xx")
kono
parents:
diff changeset
79
kono
parents:
diff changeset
80 (define_insn_reservation "ppc750-imul" 4
kono
parents:
diff changeset
81 (and (eq_attr "type" "mul")
kono
parents:
diff changeset
82 (eq_attr "size" "32")
kono
parents:
diff changeset
83 (eq_attr "cpu" "ppc750,ppc7400"))
kono
parents:
diff changeset
84 "ppc750_du,iu1_7xx*4")
kono
parents:
diff changeset
85
kono
parents:
diff changeset
86 (define_insn_reservation "ppc750-imul2" 3
kono
parents:
diff changeset
87 (and (eq_attr "type" "mul")
kono
parents:
diff changeset
88 (eq_attr "size" "16")
kono
parents:
diff changeset
89 (eq_attr "cpu" "ppc750,ppc7400"))
kono
parents:
diff changeset
90 "ppc750_du,iu1_7xx*2")
kono
parents:
diff changeset
91
kono
parents:
diff changeset
92 (define_insn_reservation "ppc750-imul3" 2
kono
parents:
diff changeset
93 (and (eq_attr "type" "mul")
kono
parents:
diff changeset
94 (eq_attr "size" "8")
kono
parents:
diff changeset
95 (eq_attr "cpu" "ppc750,ppc7400"))
kono
parents:
diff changeset
96 "ppc750_du,iu1_7xx")
kono
parents:
diff changeset
97
kono
parents:
diff changeset
98 (define_insn_reservation "ppc750-idiv" 19
kono
parents:
diff changeset
99 (and (eq_attr "type" "div")
kono
parents:
diff changeset
100 (eq_attr "cpu" "ppc750,ppc7400"))
kono
parents:
diff changeset
101 "ppc750_du,iu1_7xx*19")
kono
parents:
diff changeset
102
kono
parents:
diff changeset
103 (define_insn_reservation "ppc750-compare" 2
kono
parents:
diff changeset
104 (and (ior (eq_attr "type" "cmp")
kono
parents:
diff changeset
105 (and (eq_attr "type" "add,logical,shift,exts")
kono
parents:
diff changeset
106 (eq_attr "dot" "yes")))
kono
parents:
diff changeset
107 (eq_attr "cpu" "ppc750,ppc7400"))
kono
parents:
diff changeset
108 "ppc750_du,(iu1_7xx|iu2_7xx)")
kono
parents:
diff changeset
109
kono
parents:
diff changeset
110 (define_insn_reservation "ppc750-fpcompare" 2
kono
parents:
diff changeset
111 (and (eq_attr "type" "fpcompare")
kono
parents:
diff changeset
112 (eq_attr "cpu" "ppc750,ppc7400"))
kono
parents:
diff changeset
113 "ppc750_du,fpu_7xx")
kono
parents:
diff changeset
114
kono
parents:
diff changeset
115 (define_insn_reservation "ppc750-fp" 3
kono
parents:
diff changeset
116 (and (eq_attr "type" "fp,fpsimple")
kono
parents:
diff changeset
117 (eq_attr "cpu" "ppc750,ppc7400"))
kono
parents:
diff changeset
118 "ppc750_du,fpu_7xx")
kono
parents:
diff changeset
119
kono
parents:
diff changeset
120 (define_insn_reservation "ppc750-dmul" 4
kono
parents:
diff changeset
121 (and (eq_attr "type" "dmul")
kono
parents:
diff changeset
122 (eq_attr "cpu" "ppc750"))
kono
parents:
diff changeset
123 "ppc750_du,fpu_7xx*2")
kono
parents:
diff changeset
124
kono
parents:
diff changeset
125 (define_insn_reservation "ppc7400-dmul" 3
kono
parents:
diff changeset
126 (and (eq_attr "type" "dmul")
kono
parents:
diff changeset
127 (eq_attr "cpu" "ppc7400"))
kono
parents:
diff changeset
128 "ppc750_du,fpu_7xx")
kono
parents:
diff changeset
129
kono
parents:
diff changeset
130 ; Divides are not pipelined
kono
parents:
diff changeset
131 (define_insn_reservation "ppc750-sdiv" 17
kono
parents:
diff changeset
132 (and (eq_attr "type" "sdiv")
kono
parents:
diff changeset
133 (eq_attr "cpu" "ppc750,ppc7400"))
kono
parents:
diff changeset
134 "ppc750_du,fpu_7xx*17")
kono
parents:
diff changeset
135
kono
parents:
diff changeset
136 (define_insn_reservation "ppc750-ddiv" 31
kono
parents:
diff changeset
137 (and (eq_attr "type" "ddiv")
kono
parents:
diff changeset
138 (eq_attr "cpu" "ppc750,ppc7400"))
kono
parents:
diff changeset
139 "ppc750_du,fpu_7xx*31")
kono
parents:
diff changeset
140
kono
parents:
diff changeset
141 (define_insn_reservation "ppc750-mfcr" 2
kono
parents:
diff changeset
142 (and (eq_attr "type" "mfcr,mtcr")
kono
parents:
diff changeset
143 (eq_attr "cpu" "ppc750,ppc7400"))
kono
parents:
diff changeset
144 "ppc750_du,iu1_7xx")
kono
parents:
diff changeset
145
kono
parents:
diff changeset
146 (define_insn_reservation "ppc750-crlogical" 3
kono
parents:
diff changeset
147 (and (eq_attr "type" "cr_logical,delayed_cr")
kono
parents:
diff changeset
148 (eq_attr "cpu" "ppc750,ppc7400"))
kono
parents:
diff changeset
149 "nothing,sru_7xx*2")
kono
parents:
diff changeset
150
kono
parents:
diff changeset
151 (define_insn_reservation "ppc750-mtjmpr" 2
kono
parents:
diff changeset
152 (and (eq_attr "type" "mtjmpr,isync,sync")
kono
parents:
diff changeset
153 (eq_attr "cpu" "ppc750,ppc7400"))
kono
parents:
diff changeset
154 "nothing,sru_7xx*2")
kono
parents:
diff changeset
155
kono
parents:
diff changeset
156 (define_insn_reservation "ppc750-mfjmpr" 3
kono
parents:
diff changeset
157 (and (eq_attr "type" "mfjmpr")
kono
parents:
diff changeset
158 (eq_attr "cpu" "ppc750,ppc7400"))
kono
parents:
diff changeset
159 "nothing,sru_7xx*2")
kono
parents:
diff changeset
160
kono
parents:
diff changeset
161 (define_insn_reservation "ppc750-jmpreg" 1
kono
parents:
diff changeset
162 (and (eq_attr "type" "jmpreg,branch,isync")
kono
parents:
diff changeset
163 (eq_attr "cpu" "ppc750,ppc7400"))
kono
parents:
diff changeset
164 "nothing,bpu_7xx")
kono
parents:
diff changeset
165
kono
parents:
diff changeset
166 ;; Altivec
kono
parents:
diff changeset
167 (define_insn_reservation "ppc7400-vecsimple" 1
kono
parents:
diff changeset
168 (and (eq_attr "type" "vecsimple,veclogical,vecmove,veccmp,veccmpfx")
kono
parents:
diff changeset
169 (eq_attr "cpu" "ppc7400"))
kono
parents:
diff changeset
170 "ppc750_du,ppc7400_vec_du,veccmplx_7xx")
kono
parents:
diff changeset
171
kono
parents:
diff changeset
172 (define_insn_reservation "ppc7400-veccomplex" 4
kono
parents:
diff changeset
173 (and (eq_attr "type" "veccomplex")
kono
parents:
diff changeset
174 (eq_attr "cpu" "ppc7400"))
kono
parents:
diff changeset
175 "ppc750_du,ppc7400_vec_du,veccmplx_7xx")
kono
parents:
diff changeset
176
kono
parents:
diff changeset
177 (define_insn_reservation "ppc7400-vecfloat" 4
kono
parents:
diff changeset
178 (and (eq_attr "type" "vecfloat")
kono
parents:
diff changeset
179 (eq_attr "cpu" "ppc7400"))
kono
parents:
diff changeset
180 "ppc750_du,ppc7400_vec_du,veccmplx_7xx")
kono
parents:
diff changeset
181
kono
parents:
diff changeset
182 (define_insn_reservation "ppc7400-vecperm" 2
kono
parents:
diff changeset
183 (and (eq_attr "type" "vecperm")
kono
parents:
diff changeset
184 (eq_attr "cpu" "ppc7400"))
kono
parents:
diff changeset
185 "ppc750_du,ppc7400_vec_du,vecperm_7xx")
kono
parents:
diff changeset
186