1 /* RTX cost tables for AArch64.
3 Copyright (C) 2014-2017 Free Software Foundation, Inc.
5 This file is part of GCC.
7 GCC is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published
9 by the Free Software Foundation; either version 3, or (at your
10 option) any later version.
12 GCC is distributed in the hope that it will be useful, but WITHOUT
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
15 License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING3. If not see
19 <http://www.gnu.org/licenses/>. */
21 #ifndef GCC_AARCH64_COST_TABLES_H
22 #define GCC_AARCH64_COST_TABLES_H
24 #include "config/arm/aarch-cost-tables.h"
26 /* ThunderX does not have implement AArch32. */
27 const struct cpu_cost_table thunderx_extra_costs
=
35 COSTS_N_INSNS (1), /* Arith_shift. */
36 COSTS_N_INSNS (1), /* Arith_shift_reg. */
37 COSTS_N_INSNS (1), /* UNUSED: Log_shift. */
38 COSTS_N_INSNS (1), /* UNUSED: Log_shift_reg. */
40 COSTS_N_INSNS (1), /* Extend_arith. */
43 COSTS_N_INSNS (5), /* Clz. */
45 0, /* UNUSED: non_exec. */
46 false /* UNUSED: non_exec_costs_exec. */
51 COSTS_N_INSNS (3), /* Simple. */
52 0, /* Flag_setting. */
55 COSTS_N_INSNS (1), /* Extend_add. */
56 COSTS_N_INSNS (21) /* Idiv. */
60 COSTS_N_INSNS (3), /* Simple. */
61 0, /* Flag_setting. */
64 COSTS_N_INSNS (1), /* Extend_add. */
65 COSTS_N_INSNS (37) /* Idiv. */
70 COSTS_N_INSNS (2), /* Load. */
71 COSTS_N_INSNS (2), /* Load_sign_extend. */
72 COSTS_N_INSNS (2), /* Ldrd. */
73 0, /* N/A: Ldm_1st. */
74 0, /* N/A: Ldm_regs_per_insn_1st. */
75 0, /* N/A: Ldm_regs_per_insn_subsequent. */
76 COSTS_N_INSNS (3), /* Loadf. */
77 COSTS_N_INSNS (3), /* Loadd. */
78 0, /* N/A: Load_unaligned. */
81 0, /* N/A: Stm_1st. */
82 0, /* N/A: Stm_regs_per_insn_1st. */
83 0, /* N/A: Stm_regs_per_insn_subsequent. */
86 COSTS_N_INSNS (1), /* Store_unaligned. */
87 COSTS_N_INSNS (1), /* Loadv. */
88 COSTS_N_INSNS (1) /* Storev. */
93 COSTS_N_INSNS (11), /* Div. */
94 COSTS_N_INSNS (5), /* Mult. */
95 COSTS_N_INSNS (5), /* Mult_addsub. */
96 COSTS_N_INSNS (5), /* Fma. */
97 COSTS_N_INSNS (3), /* Addsub. */
99 COSTS_N_INSNS (1), /* Neg. */
101 COSTS_N_INSNS (5), /* Widen. */
102 COSTS_N_INSNS (5), /* Narrow. */
103 COSTS_N_INSNS (5), /* Toint. */
104 COSTS_N_INSNS (5), /* Fromint. */
105 COSTS_N_INSNS (1) /* Roundint. */
109 COSTS_N_INSNS (21), /* Div. */
110 COSTS_N_INSNS (5), /* Mult. */
111 COSTS_N_INSNS (5), /* Mult_addsub. */
112 COSTS_N_INSNS (5), /* Fma. */
113 COSTS_N_INSNS (3), /* Addsub. */
115 COSTS_N_INSNS (1), /* Neg. */
117 COSTS_N_INSNS (5), /* Widen. */
118 COSTS_N_INSNS (5), /* Narrow. */
119 COSTS_N_INSNS (5), /* Toint. */
120 COSTS_N_INSNS (5), /* Fromint. */
121 COSTS_N_INSNS (1) /* Roundint. */
126 COSTS_N_INSNS (1) /* Alu. */
130 const struct cpu_cost_table thunderx2t99_extra_costs
=
138 COSTS_N_INSNS (1), /* Arith_shift. */
139 COSTS_N_INSNS (1), /* Arith_shift_reg. */
140 COSTS_N_INSNS (1), /* Log_shift. */
141 COSTS_N_INSNS (1), /* Log_shift_reg. */
143 COSTS_N_INSNS (1), /* Extend_arith. */
146 COSTS_N_INSNS (3), /* Clz. */
149 true /* Non_exec_costs_exec. */
154 COSTS_N_INSNS (4), /* Simple. */
155 COSTS_N_INSNS (4), /* Flag_setting. */
156 COSTS_N_INSNS (4), /* Extend. */
157 COSTS_N_INSNS (5), /* Add. */
158 COSTS_N_INSNS (5), /* Extend_add. */
159 COSTS_N_INSNS (18) /* Idiv. */
163 COSTS_N_INSNS (4), /* Simple. */
164 0, /* Flag_setting. */
165 COSTS_N_INSNS (4), /* Extend. */
166 COSTS_N_INSNS (5), /* Add. */
167 COSTS_N_INSNS (5), /* Extend_add. */
168 COSTS_N_INSNS (26) /* Idiv. */
173 COSTS_N_INSNS (4), /* Load. */
174 COSTS_N_INSNS (4), /* Load_sign_extend. */
175 COSTS_N_INSNS (5), /* Ldrd. */
176 COSTS_N_INSNS (4), /* Ldm_1st. */
177 1, /* Ldm_regs_per_insn_1st. */
178 1, /* Ldm_regs_per_insn_subsequent. */
179 COSTS_N_INSNS (4), /* Loadf. */
180 COSTS_N_INSNS (4), /* Loadd. */
181 COSTS_N_INSNS (4), /* Load_unaligned. */
185 1, /* Stm_regs_per_insn_1st. */
186 1, /* Stm_regs_per_insn_subsequent. */
189 0, /* Store_unaligned. */
190 COSTS_N_INSNS (1), /* Loadv. */
191 COSTS_N_INSNS (1) /* Storev. */
196 COSTS_N_INSNS (4), /* Div. */
197 COSTS_N_INSNS (1), /* Mult. */
198 COSTS_N_INSNS (1), /* Mult_addsub. */
199 COSTS_N_INSNS (1), /* Fma. */
200 COSTS_N_INSNS (1), /* Addsub. */
201 COSTS_N_INSNS (1), /* Fpconst. */
202 COSTS_N_INSNS (1), /* Neg. */
203 COSTS_N_INSNS (1), /* Compare. */
204 COSTS_N_INSNS (2), /* Widen. */
205 COSTS_N_INSNS (2), /* Narrow. */
206 COSTS_N_INSNS (2), /* Toint. */
207 COSTS_N_INSNS (2), /* Fromint. */
208 COSTS_N_INSNS (2) /* Roundint. */
212 COSTS_N_INSNS (6), /* Div. */
213 COSTS_N_INSNS (1), /* Mult. */
214 COSTS_N_INSNS (1), /* Mult_addsub. */
215 COSTS_N_INSNS (1), /* Fma. */
216 COSTS_N_INSNS (1), /* Addsub. */
217 COSTS_N_INSNS (1), /* Fpconst. */
218 COSTS_N_INSNS (1), /* Neg. */
219 COSTS_N_INSNS (1), /* Compare. */
220 COSTS_N_INSNS (2), /* Widen. */
221 COSTS_N_INSNS (2), /* Narrow. */
222 COSTS_N_INSNS (2), /* Toint. */
223 COSTS_N_INSNS (2), /* Fromint. */
224 COSTS_N_INSNS (2) /* Roundint. */
229 COSTS_N_INSNS (1) /* Alu. */