1 /* RTX cost tables for AArch64.
2 
3    Copyright (C) 2014-2021 Free Software Foundation, Inc.
4 
5    This file is part of GCC.
6 
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.
11 
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.
16 
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/>.  */
20 
21 #ifndef GCC_AARCH64_COST_TABLES_H
22 #define GCC_AARCH64_COST_TABLES_H
23 
24 #include "config/arm/aarch-cost-tables.h"
25 
26 /* QDF24xx does not implement AArch32.  */
27 const struct cpu_cost_table qdf24xx_extra_costs =
28 {
29   /* ALU */
30   {
31     0,                 /* arith.  */
32     0,                 /* logical.  */
33     0,                 /* shift.  */
34     0,                 /* shift_reg.  */
35     COSTS_N_INSNS (1), /* arith_shift.  */
36     COSTS_N_INSNS (1), /* arith_shift_reg.  */
37     0,                 /* log_shift.  */
38     0,                 /* log_shift_reg.  */
39     0,                 /* extend.  */
40     0,                 /* extend_arith.  */
41     0,                 /* bfi.  */
42     0,                 /* bfx.  */
43     0,                 /* clz.  */
44     0,	               /* rev.  */
45     0,                 /* non_exec.  */
46     true               /* non_exec_costs_exec.  */
47   },
48   {
49     /* MULT SImode */
50     {
51       COSTS_N_INSNS (2),       /* simple.  */
52       COSTS_N_INSNS (2),       /* flag_setting.  */
53       COSTS_N_INSNS (2),       /* extend.  */
54       COSTS_N_INSNS (2),       /* add.  */
55       COSTS_N_INSNS (2),       /* extend_add.  */
56       COSTS_N_INSNS (4)       /* idiv.  */
57     },
58     /* MULT DImode */
59     {
60       COSTS_N_INSNS (3),       /* simple.  */
61       0,                       /* flag_setting (N/A).  */
62       COSTS_N_INSNS (3),       /* extend.  */
63       COSTS_N_INSNS (3),       /* add.  */
64       COSTS_N_INSNS (3),       /* extend_add.  */
65       COSTS_N_INSNS (9)       /* idiv.  */
66     }
67   },
68   /* LD/ST */
69   {
70     COSTS_N_INSNS (2),         /* load.  */
71     COSTS_N_INSNS (2),         /* load_sign_extend.  */
72     COSTS_N_INSNS (2),         /* ldrd.  */
73     COSTS_N_INSNS (2),         /* ldm_1st.  */
74     1,                         /* ldm_regs_per_insn_1st.  */
75     2,                         /* ldm_regs_per_insn_subsequent.  */
76     COSTS_N_INSNS (2),         /* loadf.  */
77     COSTS_N_INSNS (2),         /* loadd.  */
78     COSTS_N_INSNS (3),         /* load_unaligned.  */
79     0,                         /* store.  */
80     0,                         /* strd.  */
81     0,                         /* stm_1st.  */
82     1,                         /* stm_regs_per_insn_1st.  */
83     2,                         /* stm_regs_per_insn_subsequent.  */
84     0,                         /* storef.  */
85     0,                         /* stored.  */
86     COSTS_N_INSNS (1),         /* store_unaligned.  */
87     COSTS_N_INSNS (1),         /* loadv.  */
88     COSTS_N_INSNS (1)          /* storev.  */
89   },
90   {
91     /* FP SFmode */
92     {
93       COSTS_N_INSNS (6),      /* 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.  */
98       COSTS_N_INSNS (1),       /* fpconst. */
99       COSTS_N_INSNS (1),       /* neg.  */
100       COSTS_N_INSNS (2),       /* compare.  */
101       COSTS_N_INSNS (4),       /* widen.  */
102       COSTS_N_INSNS (4),       /* narrow.  */
103       COSTS_N_INSNS (4),       /* toint.  */
104       COSTS_N_INSNS (4),       /* fromint.  */
105       COSTS_N_INSNS (2)        /* roundint.  */
106     },
107     /* FP DFmode */
108     {
109       COSTS_N_INSNS (11),      /* div.  */
110       COSTS_N_INSNS (6),       /* mult.  */
111       COSTS_N_INSNS (6),       /* mult_addsub.  */
112       COSTS_N_INSNS (6),       /* fma.  */
113       COSTS_N_INSNS (3),       /* addsub.  */
114       COSTS_N_INSNS (1),       /* fpconst.  */
115       COSTS_N_INSNS (1),       /* neg.  */
116       COSTS_N_INSNS (2),       /* compare.  */
117       COSTS_N_INSNS (4),       /* widen.  */
118       COSTS_N_INSNS (4),       /* narrow.  */
119       COSTS_N_INSNS (4),       /* toint.  */
120       COSTS_N_INSNS (4),       /* fromint.  */
121       COSTS_N_INSNS (2)        /* roundint.  */
122     }
123   },
124   /* Vector */
125   {
126     COSTS_N_INSNS (1),  /* alu.  */
127     COSTS_N_INSNS (4)   /* mult.  */
128   }
129 };
130 
131 /* ThunderX does not implement AArch32.  */
132 const struct cpu_cost_table thunderx_extra_costs =
133 {
134   /* ALU */
135   {
136     0,			/* Arith.  */
137     0,			/* Logical.  */
138     0,			/* Shift.  */
139     0,			/* Shift_reg.  */
140     COSTS_N_INSNS (1)+1,	/* Arith_shift.  */
141     COSTS_N_INSNS (1)+1,	/* Arith_shift_reg.  */
142     COSTS_N_INSNS (1),	/* UNUSED: Log_shift.  */
143     COSTS_N_INSNS (1),	/* UNUSED: Log_shift_reg.  */
144     0,			/* Extend.  */
145     COSTS_N_INSNS (1),	/* Extend_arith.  */
146     0,			/* Bfi.  */
147     0,			/* Bfx.  */
148     COSTS_N_INSNS (5),	/* Clz.  */
149     0,			/* rev.  */
150     0,			/* UNUSED: non_exec.  */
151     false		/* UNUSED: non_exec_costs_exec.  */
152   },
153   {
154     /* MULT SImode */
155     {
156       COSTS_N_INSNS (3),	/* Simple.  */
157       0,			/* Flag_setting.  */
158       0,			/* Extend.  */
159       0,			/* Add.  */
160       COSTS_N_INSNS (1),	/* Extend_add.  */
161       COSTS_N_INSNS (21)	/* Idiv.  */
162     },
163     /* MULT DImode */
164     {
165       COSTS_N_INSNS (3),	/* Simple.  */
166       0,			/* Flag_setting.  */
167       0,			/* Extend.  */
168       0,			/* Add.  */
169       COSTS_N_INSNS (1),	/* Extend_add.  */
170       COSTS_N_INSNS (37)	/* Idiv.  */
171     },
172   },
173   /* LD/ST */
174   {
175     COSTS_N_INSNS (2),	/* Load.  */
176     COSTS_N_INSNS (2),	/* Load_sign_extend.  */
177     COSTS_N_INSNS (2),	/* Ldrd.  */
178     0,			/* N/A: Ldm_1st.  */
179     0,			/* N/A: Ldm_regs_per_insn_1st.  */
180     0,			/* N/A: Ldm_regs_per_insn_subsequent.  */
181     COSTS_N_INSNS (3),	/* Loadf.  */
182     COSTS_N_INSNS (3),	/* Loadd.  */
183     0,  		/* N/A: Load_unaligned.  */
184     0,			/* Store.  */
185     0,			/* Strd.  */
186     0,			/* N/A: Stm_1st.  */
187     0,			/* N/A: Stm_regs_per_insn_1st.  */
188     0,			/* N/A: Stm_regs_per_insn_subsequent.  */
189     0,			/* Storef.  */
190     0,			/* Stored.  */
191     COSTS_N_INSNS (1),	/* Store_unaligned.  */
192     COSTS_N_INSNS (1),	/* Loadv.  */
193     COSTS_N_INSNS (1)	/* Storev.  */
194   },
195   {
196     /* FP SFmode */
197     {
198       COSTS_N_INSNS (11),	/* Div.  */
199       COSTS_N_INSNS (5),	/* Mult.  */
200       COSTS_N_INSNS (5),	/* Mult_addsub.  */
201       COSTS_N_INSNS (5),	/* Fma.  */
202       COSTS_N_INSNS (3),	/* Addsub.  */
203       0,			/* Fpconst.  */
204       COSTS_N_INSNS (1),	/* Neg.  */
205       0,			/* Compare.  */
206       COSTS_N_INSNS (5),	/* Widen.  */
207       COSTS_N_INSNS (5),	/* Narrow.  */
208       COSTS_N_INSNS (5),	/* Toint.  */
209       COSTS_N_INSNS (5),	/* Fromint.  */
210       COSTS_N_INSNS (1)		/* Roundint.  */
211     },
212     /* FP DFmode */
213     {
214       COSTS_N_INSNS (21),	/* Div.  */
215       COSTS_N_INSNS (5),	/* Mult.  */
216       COSTS_N_INSNS (5),	/* Mult_addsub.  */
217       COSTS_N_INSNS (5),	/* Fma.  */
218       COSTS_N_INSNS (3),	/* Addsub.  */
219       0,			/* Fpconst.  */
220       COSTS_N_INSNS (1),	/* Neg.  */
221       0,			/* Compare.  */
222       COSTS_N_INSNS (5),	/* Widen.  */
223       COSTS_N_INSNS (5),	/* Narrow.  */
224       COSTS_N_INSNS (5),	/* Toint.  */
225       COSTS_N_INSNS (5),	/* Fromint.  */
226       COSTS_N_INSNS (1)		/* Roundint.  */
227     }
228   },
229   /* Vector */
230   {
231     COSTS_N_INSNS (1),	/* Alu.  */
232     COSTS_N_INSNS (4)	/* mult.  */
233   }
234 };
235 
236 const struct cpu_cost_table thunderx2t99_extra_costs =
237 {
238   /* ALU */
239   {
240     0,			/* Arith.  */
241     0,			/* Logical.  */
242     0,			/* Shift.  */
243     0,			/* Shift_reg.  */
244     COSTS_N_INSNS (1),	/* Arith_shift.  */
245     COSTS_N_INSNS (1),	/* Arith_shift_reg.  */
246     COSTS_N_INSNS (1),	/* Log_shift.  */
247     COSTS_N_INSNS (1),	/* Log_shift_reg.  */
248     0,			/* Extend.  */
249     COSTS_N_INSNS (1),	/* Extend_arith.  */
250     0,			/* Bfi.  */
251     0,			/* Bfx.  */
252     COSTS_N_INSNS (3),	/* Clz.  */
253     0,			/* Rev.  */
254     0,			/* Non_exec.  */
255     true		/* Non_exec_costs_exec.  */
256   },
257   {
258     /* MULT SImode */
259     {
260       COSTS_N_INSNS (4),	/* Simple.  */
261       COSTS_N_INSNS (4),	/* Flag_setting.  */
262       COSTS_N_INSNS (4),	/* Extend.  */
263       COSTS_N_INSNS (5),	/* Add.  */
264       COSTS_N_INSNS (5),	/* Extend_add.  */
265       COSTS_N_INSNS (18)	/* Idiv.  */
266     },
267     /* MULT DImode */
268     {
269       COSTS_N_INSNS (4),       /* Simple.  */
270       0,                       /* Flag_setting.  */
271       COSTS_N_INSNS (4),       /* Extend.  */
272       COSTS_N_INSNS (5),       /* Add.  */
273       COSTS_N_INSNS (5),       /* Extend_add.  */
274       COSTS_N_INSNS (26)       /* Idiv.  */
275     }
276   },
277   /* LD/ST */
278   {
279     COSTS_N_INSNS (4),	/* Load.  */
280     COSTS_N_INSNS (4),	/* Load_sign_extend.  */
281     COSTS_N_INSNS (5),	/* Ldrd.  */
282     COSTS_N_INSNS (4),	/* Ldm_1st.  */
283     1,			/* Ldm_regs_per_insn_1st.  */
284     1,			/* Ldm_regs_per_insn_subsequent.  */
285     COSTS_N_INSNS (4),	/* Loadf.  */
286     COSTS_N_INSNS (4),	/* Loadd.  */
287     COSTS_N_INSNS (4),	/* Load_unaligned.  */
288     0,			/* Store.  */
289     0,			/* Strd.  */
290     0,			/* Stm_1st.  */
291     1,			/* Stm_regs_per_insn_1st.  */
292     1,			/* Stm_regs_per_insn_subsequent.  */
293     0,			/* Storef.  */
294     0,			/* Stored.  */
295     0,			/* Store_unaligned.  */
296     COSTS_N_INSNS (1),	/* Loadv.  */
297     COSTS_N_INSNS (1)	/* Storev.  */
298   },
299   {
300     /* FP SFmode */
301     {
302       COSTS_N_INSNS (4),	/* Div.  */
303       COSTS_N_INSNS (1),	/* Mult.  */
304       COSTS_N_INSNS (1),	/* Mult_addsub. */
305       COSTS_N_INSNS (1),	/* Fma.  */
306       COSTS_N_INSNS (1),	/* Addsub.  */
307       COSTS_N_INSNS (1),	/* Fpconst. */
308       COSTS_N_INSNS (1),	/* Neg.  */
309       COSTS_N_INSNS (1),	/* Compare.  */
310       COSTS_N_INSNS (2),	/* Widen.  */
311       COSTS_N_INSNS (2),	/* Narrow.  */
312       COSTS_N_INSNS (2),	/* Toint.  */
313       COSTS_N_INSNS (2),	/* Fromint.  */
314       COSTS_N_INSNS (2) 	/* Roundint.  */
315     },
316     /* FP DFmode */
317     {
318       COSTS_N_INSNS (6),	/* Div.  */
319       COSTS_N_INSNS (1),	/* Mult.  */
320       COSTS_N_INSNS (1),	/* Mult_addsub.  */
321       COSTS_N_INSNS (1),	/* Fma.  */
322       COSTS_N_INSNS (1),	/* Addsub.  */
323       COSTS_N_INSNS (1),	/* Fpconst.  */
324       COSTS_N_INSNS (1),	/* Neg.  */
325       COSTS_N_INSNS (1),	/* Compare.  */
326       COSTS_N_INSNS (2),	/* Widen.  */
327       COSTS_N_INSNS (2),	/* Narrow.  */
328       COSTS_N_INSNS (2),	/* Toint.  */
329       COSTS_N_INSNS (2),	/* Fromint.  */
330       COSTS_N_INSNS (2) 	/* Roundint.  */
331     }
332   },
333   /* Vector */
334   {
335     COSTS_N_INSNS (1),	/* Alu.  */
336     COSTS_N_INSNS (4)	/* Mult.  */
337   }
338 };
339 
340 const struct cpu_cost_table thunderx3t110_extra_costs =
341 {
342   /* ALU */
343   {
344     0,			/* Arith.  */
345     0,			/* Logical.  */
346     0,			/* Shift.  */
347     0,			/* Shift_reg.  */
348     COSTS_N_INSNS (1),	/* Arith_shift.  */
349     COSTS_N_INSNS (1),	/* Arith_shift_reg.  */
350     COSTS_N_INSNS (1),	/* Log_shift.  */
351     COSTS_N_INSNS (1),	/* Log_shift_reg.  */
352     0,			/* Extend.  */
353     COSTS_N_INSNS (1),	/* Extend_arith.  */
354     0,			/* Bfi.  */
355     0,			/* Bfx.  */
356     COSTS_N_INSNS (3),	/* Clz.  */
357     0,			/* Rev.  */
358     0,			/* Non_exec.  */
359     true		/* Non_exec_costs_exec.  */
360   },
361   {
362     /* MULT SImode */
363     {
364       COSTS_N_INSNS (4),	/* Simple.  */
365       COSTS_N_INSNS (4),	/* Flag_setting.  */
366       COSTS_N_INSNS (4),	/* Extend.  */
367       COSTS_N_INSNS (5),	/* Add.  */
368       COSTS_N_INSNS (5),	/* Extend_add.  */
369       COSTS_N_INSNS (18)	/* Idiv.  */
370     },
371     /* MULT DImode */
372     {
373       COSTS_N_INSNS (4),       /* Simple.  */
374       0,                       /* Flag_setting.  */
375       COSTS_N_INSNS (4),       /* Extend.  */
376       COSTS_N_INSNS (5),       /* Add.  */
377       COSTS_N_INSNS (5),       /* Extend_add.  */
378       COSTS_N_INSNS (26)       /* Idiv.  */
379     }
380   },
381   /* LD/ST */
382   {
383     COSTS_N_INSNS (4),	/* Load.  */
384     COSTS_N_INSNS (4),	/* Load_sign_extend.  */
385     COSTS_N_INSNS (5),	/* Ldrd.  */
386     COSTS_N_INSNS (4),	/* Ldm_1st.  */
387     1,			/* Ldm_regs_per_insn_1st.  */
388     1,			/* Ldm_regs_per_insn_subsequent.  */
389     COSTS_N_INSNS (4),	/* Loadf.  */
390     COSTS_N_INSNS (4),	/* Loadd.  */
391     COSTS_N_INSNS (4),	/* Load_unaligned.  */
392     0,			/* Store.  */
393     0,			/* Strd.  */
394     0,			/* Stm_1st.  */
395     1,			/* Stm_regs_per_insn_1st.  */
396     1,			/* Stm_regs_per_insn_subsequent.  */
397     0,			/* Storef.  */
398     0,			/* Stored.  */
399     0,			/* Store_unaligned.  */
400     COSTS_N_INSNS (1),	/* Loadv.  */
401     COSTS_N_INSNS (1)	/* Storev.  */
402   },
403   {
404     /* FP SFmode */
405     {
406       COSTS_N_INSNS (4),	/* Div.  */
407       COSTS_N_INSNS (1),	/* Mult.  */
408       COSTS_N_INSNS (1),	/* Mult_addsub. */
409       COSTS_N_INSNS (1),	/* Fma.  */
410       COSTS_N_INSNS (1),	/* Addsub.  */
411       COSTS_N_INSNS (1),	/* Fpconst. */
412       COSTS_N_INSNS (1),	/* Neg.  */
413       COSTS_N_INSNS (1),	/* Compare.  */
414       COSTS_N_INSNS (2),	/* Widen.  */
415       COSTS_N_INSNS (2),	/* Narrow.  */
416       COSTS_N_INSNS (2),	/* Toint.  */
417       COSTS_N_INSNS (2),	/* Fromint.  */
418       COSTS_N_INSNS (2) 	/* Roundint.  */
419     },
420     /* FP DFmode */
421     {
422       COSTS_N_INSNS (6),	/* Div.  */
423       COSTS_N_INSNS (1),	/* Mult.  */
424       COSTS_N_INSNS (1),	/* Mult_addsub.  */
425       COSTS_N_INSNS (1),	/* Fma.  */
426       COSTS_N_INSNS (1),	/* Addsub.  */
427       COSTS_N_INSNS (1),	/* Fpconst.  */
428       COSTS_N_INSNS (1),	/* Neg.  */
429       COSTS_N_INSNS (1),	/* Compare.  */
430       COSTS_N_INSNS (2),	/* Widen.  */
431       COSTS_N_INSNS (2),	/* Narrow.  */
432       COSTS_N_INSNS (2),	/* Toint.  */
433       COSTS_N_INSNS (2),	/* Fromint.  */
434       COSTS_N_INSNS (2) 	/* Roundint.  */
435     }
436   },
437   /* Vector */
438   {
439     COSTS_N_INSNS (1),	/* Alu.  */
440     COSTS_N_INSNS (4)	/* Mult.  */
441   }
442 };
443 
444 const struct cpu_cost_table tsv110_extra_costs =
445 {
446   /* ALU */
447   {
448     0,                 /* arith.  */
449     0,                 /* logical.  */
450     0,                 /* shift.  */
451     0,                 /* shift_reg.  */
452     COSTS_N_INSNS (1), /* arith_shift.  */
453     COSTS_N_INSNS (1), /* arith_shift_reg.  */
454     COSTS_N_INSNS (1), /* log_shift.  */
455     COSTS_N_INSNS (1), /* log_shift_reg.  */
456     0,                 /* extend.  */
457     COSTS_N_INSNS (1), /* extend_arith.  */
458     0,                 /* bfi.  */
459     0,                 /* bfx.  */
460     0,                 /* clz.  */
461     0,                 /* rev.  */
462     0,                 /* non_exec.  */
463     true               /* non_exec_costs_exec.  */
464   },
465 
466   {
467     /* MULT SImode */
468     {
469       COSTS_N_INSNS (2),       /* simple.  */
470       COSTS_N_INSNS (2),       /* flag_setting.  */
471       COSTS_N_INSNS (2),       /* extend.  */
472       COSTS_N_INSNS (2),       /* add.  */
473       COSTS_N_INSNS (2),       /* extend_add.  */
474       COSTS_N_INSNS (11)       /* idiv.  */
475     },
476     /* MULT DImode */
477     {
478       COSTS_N_INSNS (3),       /* simple.  */
479       0,                       /* flag_setting (N/A).  */
480       COSTS_N_INSNS (3),       /* extend.  */
481       COSTS_N_INSNS (3),       /* add.  */
482       COSTS_N_INSNS (3),       /* extend_add.  */
483       COSTS_N_INSNS (19)       /* idiv.  */
484     }
485   },
486   /* LD/ST */
487   {
488     COSTS_N_INSNS (3),         /* load.  */
489     COSTS_N_INSNS (4),         /* load_sign_extend.  */
490     COSTS_N_INSNS (3),         /* ldrd.  */
491     COSTS_N_INSNS (3),         /* ldm_1st.  */
492     1,                         /* ldm_regs_per_insn_1st.  */
493     2,                         /* ldm_regs_per_insn_subsequent.  */
494     COSTS_N_INSNS (4),         /* loadf.  */
495     COSTS_N_INSNS (4),         /* loadd.  */
496     COSTS_N_INSNS (4),         /* load_unaligned.  */
497     0,                         /* store.  */
498     0,                         /* strd.  */
499     0,                         /* stm_1st.  */
500     1,                         /* stm_regs_per_insn_1st.  */
501     2,                         /* stm_regs_per_insn_subsequent.  */
502     0,                         /* storef.  */
503     0,                         /* stored.  */
504     COSTS_N_INSNS (1),         /* store_unaligned.  */
505     COSTS_N_INSNS (4),         /* loadv.  */
506     COSTS_N_INSNS (4)          /* storev.  */
507   },
508   {
509     /* FP SFmode */
510     {
511       COSTS_N_INSNS (10),      /* div.  */
512       COSTS_N_INSNS (4),       /* mult.  */
513       COSTS_N_INSNS (4),       /* mult_addsub.  */
514       COSTS_N_INSNS (4),       /* fma.  */
515       COSTS_N_INSNS (4),       /* addsub.  */
516       COSTS_N_INSNS (1),       /* fpconst.  */
517       COSTS_N_INSNS (1),       /* neg.  */
518       COSTS_N_INSNS (1),       /* compare.  */
519       COSTS_N_INSNS (2),       /* widen.  */
520       COSTS_N_INSNS (2),       /* narrow.  */
521       COSTS_N_INSNS (2),       /* toint.  */
522       COSTS_N_INSNS (1),       /* fromint.  */
523       COSTS_N_INSNS (2)        /* roundint.  */
524     },
525     /* FP DFmode */
526     {
527       COSTS_N_INSNS (17),      /* div.  */
528       COSTS_N_INSNS (4),       /* mult.  */
529       COSTS_N_INSNS (6),       /* mult_addsub.  */
530       COSTS_N_INSNS (6),       /* fma.  */
531       COSTS_N_INSNS (3),       /* addsub.  */
532       COSTS_N_INSNS (1),       /* fpconst.  */
533       COSTS_N_INSNS (1),       /* neg.  */
534       COSTS_N_INSNS (1),       /* compare.  */
535       COSTS_N_INSNS (2),       /* widen.  */
536       COSTS_N_INSNS (2),       /* narrow.  */
537       COSTS_N_INSNS (2),       /* toint.  */
538       COSTS_N_INSNS (1),       /* fromint.  */
539       COSTS_N_INSNS (2)        /* roundint.  */
540     }
541   },
542   /* Vector */
543   {
544     COSTS_N_INSNS (1),  /* alu.  */
545     COSTS_N_INSNS (4)   /* mult.  */
546   }
547 };
548 
549 const struct cpu_cost_table a64fx_extra_costs =
550 {
551   /* ALU */
552   {
553     0,                 /* arith.  */
554     0,                 /* logical.  */
555     0,                 /* shift.  */
556     0,                 /* shift_reg.  */
557     COSTS_N_INSNS (1), /* arith_shift.  */
558     COSTS_N_INSNS (1), /* arith_shift_reg.  */
559     COSTS_N_INSNS (1), /* log_shift.  */
560     COSTS_N_INSNS (1), /* log_shift_reg.  */
561     0,                 /* extend.  */
562     COSTS_N_INSNS (1), /* extend_arith.  */
563     0,                 /* bfi.  */
564     0,                 /* bfx.  */
565     0,                 /* clz.  */
566     0,                 /* rev.  */
567     0,                 /* non_exec.  */
568     true               /* non_exec_costs_exec.  */
569   },
570   {
571     /* MULT SImode */
572     {
573       COSTS_N_INSNS (4),       /* simple.  */
574       COSTS_N_INSNS (4),       /* flag_setting.  */
575       COSTS_N_INSNS (4),       /* extend.  */
576       COSTS_N_INSNS (5),       /* add.  */
577       COSTS_N_INSNS (5),       /* extend_add.  */
578       COSTS_N_INSNS (18)       /* idiv.  */
579     },
580     /* MULT DImode */
581     {
582       COSTS_N_INSNS (4),       /* simple.  */
583       0,                       /* flag_setting (N/A).  */
584       COSTS_N_INSNS (4),       /* extend.  */
585       COSTS_N_INSNS (5),       /* add.  */
586       COSTS_N_INSNS (5),       /* extend_add.  */
587       COSTS_N_INSNS (26)       /* idiv.  */
588     }
589   },
590   /* LD/ST */
591   {
592     COSTS_N_INSNS (4),         /* load.  */
593     COSTS_N_INSNS (4),         /* load_sign_extend.  */
594     COSTS_N_INSNS (5),         /* ldrd.  */
595     COSTS_N_INSNS (4),         /* ldm_1st.  */
596     1,                         /* ldm_regs_per_insn_1st.  */
597     2,                         /* ldm_regs_per_insn_subsequent.  */
598     COSTS_N_INSNS (4),         /* loadf.  */
599     COSTS_N_INSNS (4),         /* loadd.  */
600     COSTS_N_INSNS (5),         /* load_unaligned.  */
601     0,                         /* store.  */
602     0,                         /* strd.  */
603     0,                         /* stm_1st.  */
604     1,                         /* stm_regs_per_insn_1st.  */
605     2,                         /* stm_regs_per_insn_subsequent.  */
606     0,                         /* storef.  */
607     0,                         /* stored.  */
608     0,                         /* store_unaligned.  */
609     COSTS_N_INSNS (1),         /* loadv.  */
610     COSTS_N_INSNS (1)          /* storev.  */
611   },
612   {
613     /* FP SFmode */
614     {
615       COSTS_N_INSNS (6),      /* div.  */
616       COSTS_N_INSNS (1),       /* mult.  */
617       COSTS_N_INSNS (1),       /* mult_addsub.  */
618       COSTS_N_INSNS (2),       /* fma.  */
619       COSTS_N_INSNS (1),       /* addsub.  */
620       COSTS_N_INSNS (1),       /* fpconst.  */
621       COSTS_N_INSNS (1),       /* neg.  */
622       COSTS_N_INSNS (1),       /* compare.  */
623       COSTS_N_INSNS (2),       /* widen.  */
624       COSTS_N_INSNS (2),       /* narrow.  */
625       COSTS_N_INSNS (2),       /* toint.  */
626       COSTS_N_INSNS (2),       /* fromint.  */
627       COSTS_N_INSNS (2)        /* roundint.  */
628     },
629     /* FP DFmode */
630     {
631       COSTS_N_INSNS (11),      /* div.  */
632       COSTS_N_INSNS (1),       /* mult.  */
633       COSTS_N_INSNS (1),       /* mult_addsub.  */
634       COSTS_N_INSNS (2),       /* fma.  */
635       COSTS_N_INSNS (1),       /* addsub.  */
636       COSTS_N_INSNS (1),       /* fpconst.  */
637       COSTS_N_INSNS (1),       /* neg.  */
638       COSTS_N_INSNS (1),       /* compare.  */
639       COSTS_N_INSNS (2),       /* widen.  */
640       COSTS_N_INSNS (2),       /* narrow.  */
641       COSTS_N_INSNS (2),       /* toint.  */
642       COSTS_N_INSNS (2),       /* fromint.  */
643       COSTS_N_INSNS (2)        /* roundint.  */
644     }
645   },
646   /* Vector */
647   {
648     COSTS_N_INSNS (1),  /* alu.  */
649     COSTS_N_INSNS (4)   /* mult.  */
650   }
651 };
652 
653 #endif
654