annotate gcc/config/visium/gr6.md @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ;; Scheduling description for GR6.
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
2 ;; Copyright (C) 2013-2018 Free Software Foundation, Inc.
111
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
kono
parents:
diff changeset
7 ;; it under the terms of the GNU General Public License as published by
kono
parents:
diff changeset
8 ;; the Free Software Foundation; either version 3, or (at your option)
kono
parents:
diff changeset
9 ;; any later version.
kono
parents:
diff changeset
10 ;;
kono
parents:
diff changeset
11 ;; GCC is distributed in the hope that it will be useful,
kono
parents:
diff changeset
12 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
kono
parents:
diff changeset
13 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
kono
parents:
diff changeset
14 ;; GNU General Public 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 ;; GR6 is a dual-issue, superscalar, out-of-order processor.
kono
parents:
diff changeset
21 ;;
kono
parents:
diff changeset
22 ;; The GR6 pipeline has 3 major components:
kono
parents:
diff changeset
23 ;; 1. The FETCH/DECODE/DISPATCH stages, an in-order front-end,
kono
parents:
diff changeset
24 ;; 2. The PROCESS stage, which is the out-of-order core,
kono
parents:
diff changeset
25 ;; 3. The STORE stage, an in-order register storage stage.
kono
parents:
diff changeset
26 ;;
kono
parents:
diff changeset
27 ;; The front-end and the back-end (PROCESS + STORE) are connected through a set
kono
parents:
diff changeset
28 ;; of reservation stations which, among other things, serve as buffers for the
kono
parents:
diff changeset
29 ;; decoded instructions. The reservation stations are attached to a specific
kono
parents:
diff changeset
30 ;; execution unit of the PROCESS stage and the DISPATCH stage is responsible
kono
parents:
diff changeset
31 ;; for dispatching the decoded instructions to the appropriate stations. Most
kono
parents:
diff changeset
32 ;; execution units have multiple reservation stations, thus making it possible
kono
parents:
diff changeset
33 ;; to dispatch two instructions per unit on a given cycle, but only one of them
kono
parents:
diff changeset
34 ;; can be executed on the next cycle.
kono
parents:
diff changeset
35 ;;
kono
parents:
diff changeset
36 ;; Since the core executes the instructions out of order, the most important
kono
parents:
diff changeset
37 ;; consideration for performance tuning is to make sure that enough decoded
kono
parents:
diff changeset
38 ;; instructions are ready for execution in the PROCESS stage while not stalling
kono
parents:
diff changeset
39 ;; the front-end, i.e while not trying to dispatch a decoded instruction to an
kono
parents:
diff changeset
40 ;; execution unit whose reservation stations are full. Therefore, we do not
kono
parents:
diff changeset
41 ;; model the reservation stations (which is equivalent to pretending that there
kono
parents:
diff changeset
42 ;; is only one of them for each execution unit) but only the execution unit,
kono
parents:
diff changeset
43 ;; thus preserving some margin in case the unit itself stalls unexpectedly.
kono
parents:
diff changeset
44
kono
parents:
diff changeset
45 ;; CPU execution units:
kono
parents:
diff changeset
46 ;;
kono
parents:
diff changeset
47 ;; inst[1|2] The front-end: 2 instructions can be issued on a given
kono
parents:
diff changeset
48 ;; cycle by the FETCH/DECODE/DISPATCH stages, except for
kono
parents:
diff changeset
49 ;; the Block Move instructions.
kono
parents:
diff changeset
50 ;;
kono
parents:
diff changeset
51 ;; mov Move Execution Unit: immediate moves into registers.
kono
parents:
diff changeset
52 ;;
kono
parents:
diff changeset
53 ;; alu[1|2] The 2 Arithmetic and Logic Units: other instructions
kono
parents:
diff changeset
54 ;; operating on the registers.
kono
parents:
diff changeset
55 ;;
kono
parents:
diff changeset
56 ;; bru Branch Resolution Unit: all branches.
kono
parents:
diff changeset
57 ;;
kono
parents:
diff changeset
58 ;; mem_wr Memory Write Unit: all writes to memory.
kono
parents:
diff changeset
59 ;;
kono
parents:
diff changeset
60 ;; mem_rd Memory Read Unit: all reads from memory.
kono
parents:
diff changeset
61 ;;
kono
parents:
diff changeset
62 ;; mem_eam EAM interface: reads and writes from and to the EAM
kono
parents:
diff changeset
63 ;; and reads from the FP registers.
kono
parents:
diff changeset
64 ;;
kono
parents:
diff changeset
65 ;; eam Extended Arithmetic Module: multiply, divide and
kono
parents:
diff changeset
66 ;; 64-bit shifts.
kono
parents:
diff changeset
67 ;;
kono
parents:
diff changeset
68 ;; fpcu Floating-Point Compare Unit: FP comparisons.
kono
parents:
diff changeset
69 ;;
kono
parents:
diff changeset
70 ;; fpu[1|2|3|4] The 4 Floating-Point Units: all other instructions
kono
parents:
diff changeset
71 ;; operating on the FP registers.
kono
parents:
diff changeset
72
kono
parents:
diff changeset
73 (define_automaton "gr6,gr6_fpu")
kono
parents:
diff changeset
74
kono
parents:
diff changeset
75 (define_cpu_unit "gr6_inst1, gr6_inst2" "gr6")
kono
parents:
diff changeset
76 (define_cpu_unit "gr6_mov" "gr6")
kono
parents:
diff changeset
77 (define_cpu_unit "gr6_alu1,gr6_alu2" "gr6")
kono
parents:
diff changeset
78 (define_cpu_unit "gr6_bru" "gr6")
kono
parents:
diff changeset
79 (define_cpu_unit "gr6_mem_wr,gr6_mem_rd,gr6_mem_eam" "gr6")
kono
parents:
diff changeset
80 (define_cpu_unit "gr6_eam" "gr6")
kono
parents:
diff changeset
81 (define_cpu_unit "gr6_fpcu" "gr6")
kono
parents:
diff changeset
82 (define_cpu_unit "gr6_fpu1,gr6_fpu2,gr6_fpu3,gr6_fpu4" "gr6_fpu")
kono
parents:
diff changeset
83
kono
parents:
diff changeset
84 (define_reservation "gr6_issue" "(gr6_inst1 | gr6_inst2)")
kono
parents:
diff changeset
85 (define_reservation "gr6_single_issue" "gr6_inst1 + gr6_inst2")
kono
parents:
diff changeset
86
kono
parents:
diff changeset
87 (define_insn_reservation "gr6_immediate" 1
kono
parents:
diff changeset
88 (and (eq_attr "cpu" "gr6")
kono
parents:
diff changeset
89 (eq_attr "type" "imm_reg"))
kono
parents:
diff changeset
90 "gr6_issue + gr6_mov")
kono
parents:
diff changeset
91
kono
parents:
diff changeset
92 (define_insn_reservation "gr6_alu" 1
kono
parents:
diff changeset
93 (and (eq_attr "cpu" "gr6")
kono
parents:
diff changeset
94 (eq_attr "type" "arith,arith2,logic,cmp"))
kono
parents:
diff changeset
95 "gr6_issue + (gr6_alu1 | gr6_alu2)")
kono
parents:
diff changeset
96
kono
parents:
diff changeset
97 (define_insn_reservation "gr6_branch" 1
kono
parents:
diff changeset
98 (and (eq_attr "cpu" "gr6")
kono
parents:
diff changeset
99 (eq_attr "type" "abs_branch,branch,call,ret,rfi"))
kono
parents:
diff changeset
100 "gr6_issue + gr6_bru")
kono
parents:
diff changeset
101
kono
parents:
diff changeset
102 (define_insn_reservation "gr6_block_move" 16
kono
parents:
diff changeset
103 (and (eq_attr "cpu" "gr6")
kono
parents:
diff changeset
104 (eq_attr "type" "bmi"))
kono
parents:
diff changeset
105 "gr6_single_issue*16")
kono
parents:
diff changeset
106
kono
parents:
diff changeset
107 (define_insn_reservation "gr6_cpu_other" 1
kono
parents:
diff changeset
108 (and (eq_attr "cpu" "gr6")
kono
parents:
diff changeset
109 (eq_attr "type" "dsi,nop"))
kono
parents:
diff changeset
110 "gr6_issue")
kono
parents:
diff changeset
111
kono
parents:
diff changeset
112 (define_insn_reservation "gr6_write_mem" 1
kono
parents:
diff changeset
113 (and (eq_attr "cpu" "gr6")
kono
parents:
diff changeset
114 (eq_attr "type" "reg_mem"))
kono
parents:
diff changeset
115 "gr6_issue + gr6_mem_wr")
kono
parents:
diff changeset
116
kono
parents:
diff changeset
117 (define_insn_reservation "gr6_read_mem" 6
kono
parents:
diff changeset
118 (and (eq_attr "cpu" "gr6")
kono
parents:
diff changeset
119 (eq_attr "type" "mem_reg"))
kono
parents:
diff changeset
120 "gr6_issue + gr6_mem_rd, nothing*5")
kono
parents:
diff changeset
121
kono
parents:
diff changeset
122 ;; EAM instructions.
kono
parents:
diff changeset
123
kono
parents:
diff changeset
124 (define_insn_reservation "gr6_write_eam" 2
kono
parents:
diff changeset
125 (and (eq_attr "cpu" "gr6")
kono
parents:
diff changeset
126 (eq_attr "type" "reg_eam"))
kono
parents:
diff changeset
127 "gr6_issue + gr6_mem_eam, nothing")
kono
parents:
diff changeset
128
kono
parents:
diff changeset
129 (define_reservation "gr6_issue_eam" "gr6_issue + gr6_mem_eam + gr6_eam")
kono
parents:
diff changeset
130
kono
parents:
diff changeset
131 (define_insn_reservation "gr6_read_eam" 2
kono
parents:
diff changeset
132 (and (eq_attr "cpu" "gr6")
kono
parents:
diff changeset
133 (eq_attr "type" "eam_reg"))
kono
parents:
diff changeset
134 "gr6_issue_eam, nothing")
kono
parents:
diff changeset
135
kono
parents:
diff changeset
136 (define_insn_reservation "gr6_shiftdi" 2
kono
parents:
diff changeset
137 (and (eq_attr "cpu" "gr6")
kono
parents:
diff changeset
138 (eq_attr "type" "shiftdi"))
kono
parents:
diff changeset
139 "gr6_issue_eam, gr6_eam")
kono
parents:
diff changeset
140
kono
parents:
diff changeset
141 (define_insn_reservation "gr6_mul" 3
kono
parents:
diff changeset
142 (and (eq_attr "cpu" "gr6")
kono
parents:
diff changeset
143 (eq_attr "type" "mul"))
kono
parents:
diff changeset
144 "gr6_issue_eam, gr6_eam*2")
kono
parents:
diff changeset
145
kono
parents:
diff changeset
146 (define_insn_reservation "gr6_div" 34
kono
parents:
diff changeset
147 (and (eq_attr "cpu" "gr6")
kono
parents:
diff changeset
148 (eq_attr "type" "div"))
kono
parents:
diff changeset
149 "gr6_issue_eam, gr6_eam*33")
kono
parents:
diff changeset
150
kono
parents:
diff changeset
151 (define_insn_reservation "gr6_divd" 66
kono
parents:
diff changeset
152 (and (eq_attr "cpu" "gr6")
kono
parents:
diff changeset
153 (eq_attr "type" "divd"))
kono
parents:
diff changeset
154 "gr6_issue_eam, gr6_eam*65")
kono
parents:
diff changeset
155
kono
parents:
diff changeset
156 ;; FPU instructions.
kono
parents:
diff changeset
157
kono
parents:
diff changeset
158 (define_insn_reservation "gr6_read_fp" 2
kono
parents:
diff changeset
159 (and (eq_attr "cpu" "gr6")
kono
parents:
diff changeset
160 (eq_attr "type" "fp_reg"))
kono
parents:
diff changeset
161 "gr6_issue + gr6_mem_eam, nothing")
kono
parents:
diff changeset
162
kono
parents:
diff changeset
163 (define_insn_reservation "gr6_cmp_fp" 1
kono
parents:
diff changeset
164 (and (eq_attr "cpu" "gr6")
kono
parents:
diff changeset
165 (eq_attr "type" "fcmp"))
kono
parents:
diff changeset
166 "gr6_issue + gr6_fpcu")
kono
parents:
diff changeset
167
kono
parents:
diff changeset
168 (define_insn_reservation "gr6_fp_1cycle" 1
kono
parents:
diff changeset
169 (and (eq_attr "cpu" "gr6")
kono
parents:
diff changeset
170 (eq_attr "type" "fmove,ftoi,itof"))
kono
parents:
diff changeset
171 "gr6_issue + gr6_fpu1")
kono
parents:
diff changeset
172
kono
parents:
diff changeset
173 (define_insn_reservation "gr6_fp_3cycle" 3
kono
parents:
diff changeset
174 (and (eq_attr "cpu" "gr6")
kono
parents:
diff changeset
175 (eq_attr "type" "fp"))
kono
parents:
diff changeset
176 "gr6_issue + gr6_fpu2, nothing*2")
kono
parents:
diff changeset
177
kono
parents:
diff changeset
178 (define_insn_reservation "gr6_fp_17cycle" 17
kono
parents:
diff changeset
179 (and (eq_attr "cpu" "gr6")
kono
parents:
diff changeset
180 (eq_attr "type" "fdiv,fsqrt"))
kono
parents:
diff changeset
181 "gr6_issue + gr6_fpu3, gr6_fpu3*14, nothing*2")
kono
parents:
diff changeset
182
kono
parents:
diff changeset
183 (define_insn_reservation "gr6_write_fp" 1
kono
parents:
diff changeset
184 (and (eq_attr "cpu" "gr6")
kono
parents:
diff changeset
185 (eq_attr "type" "reg_fp"))
kono
parents:
diff changeset
186 "gr6_issue + gr6_fpu4")