1 /* This file is automatically generated.  DO NOT EDIT! */
2 /* Generated from: NetBSD: mknative-gcc,v 1.116 2022/07/22 06:50:26 mrg Exp  */
3 /* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp  */
4 
5 /* -*- buffer-read-only: t -*-
6    Generated automatically by parsecpu.awk from arm-cpus.in.
7    Do not edit.
8 
9    Copyright (C) 2011-2020 Free Software Foundation, Inc.
10 
11    This file is part of GCC.
12 
13    GCC is free software; you can redistribute it and/or modify
14    it under the terms of the GNU General Public License as
15    published by the Free Software Foundation; either version 3,
16    or (at your option) any later version.
17 
18    GCC is distributed in the hope that it will be useful,
19    but WITHOUT ANY WARRANTY; without even the implied warranty of
20    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21    GNU General Public License for more details.
22 
23    You should have received a copy of the GNU General Public
24    License along with GCC; see the file COPYING3.  If not see
25    <http://www.gnu.org/licenses/>.  */
26 
27 enum isa_feature {
28   isa_nobit = 0,
29   isa_bit_cdecp1,
30   isa_bit_vfpv2,
31   isa_bit_adiv,
32   isa_bit_cdecp2,
33   isa_bit_vfpv3,
34   isa_bit_cdecp3,
35   isa_bit_vfpv4,
36   isa_bit_cdecp4,
37   isa_bit_cdecp5,
38   isa_bit_cdecp6,
39   isa_bit_cdecp7,
40   isa_bit_smallmul,
41   isa_bit_mve,
42   isa_bit_iwmmxt,
43   isa_bit_armv5te,
44   isa_bit_i8mm,
45   isa_bit_fp16fml,
46   isa_bit_xscale,
47   isa_bit_quirk_no_asmcpu,
48   isa_bit_bf16,
49   isa_bit_sb,
50   isa_bit_thumb,
51   isa_bit_quirk_cm3_ldrd,
52   isa_bit_be8,
53   isa_bit_armv5t,
54   isa_bit_dotprod,
55   isa_bit_lpae,
56   isa_bit_armv4,
57   isa_bit_armv8_1m_main,
58   isa_bit_quirk_armv6kz,
59   isa_bit_neon,
60   isa_bit_armv6,
61   isa_bit_crc32,
62   isa_bit_armv7,
63   isa_bit_armv7em,
64   isa_bit_cmse,
65   isa_bit_armv8,
66   isa_bit_fpv5,
67   isa_bit_vfp_base,
68   isa_bit_quirk_vlldm,
69   isa_bit_tdiv,
70   isa_bit_quirk_no_volatile_ce,
71   isa_bit_fp_d32,
72   isa_bit_thumb2,
73   isa_bit_iwmmxt2,
74   isa_bit_notm,
75   isa_bit_fp16,
76   isa_bit_armv8_1,
77   isa_bit_fp16conv,
78   isa_bit_armv8_2,
79   isa_bit_armv6k,
80   isa_bit_armv8_3,
81   isa_bit_armv8_4,
82   isa_bit_mp,
83   isa_bit_armv8_5,
84   isa_bit_crypto,
85   isa_bit_armv8_6,
86   isa_bit_mve_float,
87   isa_bit_fp_dbl,
88   isa_bit_sec,
89   isa_bit_cdecp0,
90   isa_bit_predres,
91   isa_num_bits
92 };
93 
94 #define ISA_CRYPTO \
95   isa_bit_crypto, \
96   isa_bit_neon, \
97   isa_bit_fp_dbl, \
98   isa_bit_fp_d32
99 
100 #define ISA_ARMv8_1a \
101   isa_bit_crc32, \
102   isa_bit_be8, \
103   isa_bit_lpae, \
104   isa_bit_notm, \
105   isa_bit_thumb, \
106   isa_bit_adiv, \
107   isa_bit_armv8_1, \
108   isa_bit_sec, \
109   isa_bit_armv5t, \
110   isa_bit_armv6k, \
111   isa_bit_thumb2, \
112   isa_bit_armv5te, \
113   isa_bit_mp, \
114   isa_bit_armv4, \
115   isa_bit_armv6, \
116   isa_bit_armv7, \
117   isa_bit_armv8, \
118   isa_bit_tdiv
119 
120 #define ISA_ARMv5t \
121   isa_bit_thumb, \
122   isa_bit_armv5t, \
123   isa_bit_armv4, \
124   isa_bit_notm
125 
126 #define ISA_ALL_FPU_EXTERNAL \
127   isa_bit_fp16, \
128   isa_bit_bf16
129 
130 #define ISA_ALL_CRYPTO \
131   isa_bit_crypto
132 
133 #define ISA_DOTPROD \
134   isa_bit_neon, \
135   isa_bit_dotprod, \
136   isa_bit_fp_dbl, \
137   isa_bit_fp_d32
138 
139 #define ISA_ARMv8_6a \
140   isa_bit_notm, \
141   isa_bit_sb, \
142   isa_bit_armv8_1, \
143   isa_bit_armv8_2, \
144   isa_bit_armv8_3, \
145   isa_bit_armv8_4, \
146   isa_bit_armv8_5, \
147   isa_bit_armv8_6, \
148   isa_bit_armv4, \
149   isa_bit_armv6, \
150   isa_bit_armv7, \
151   isa_bit_armv8, \
152   isa_bit_be8, \
153   isa_bit_predres, \
154   isa_bit_adiv, \
155   isa_bit_armv5te, \
156   isa_bit_crc32, \
157   isa_bit_armv5t, \
158   isa_bit_armv6k, \
159   isa_bit_thumb2, \
160   isa_bit_sec, \
161   isa_bit_thumb, \
162   isa_bit_tdiv, \
163   isa_bit_mp, \
164   isa_bit_lpae
165 
166 #define ISA_ARMv7m \
167   isa_bit_thumb, \
168   isa_bit_be8, \
169   isa_bit_armv5te, \
170   isa_bit_armv4, \
171   isa_bit_armv6, \
172   isa_bit_armv7, \
173   isa_bit_thumb2, \
174   isa_bit_armv5t, \
175   isa_bit_tdiv
176 
177 #define ISA_MVE_FP \
178   isa_bit_mve, \
179   isa_bit_fpv5, \
180   isa_bit_mve_float, \
181   isa_bit_fp16, \
182   isa_bit_vfpv2, \
183   isa_bit_vfpv3, \
184   isa_bit_vfpv4, \
185   isa_bit_fp16conv, \
186   isa_bit_armv7em
187 
188 #define ISA_ARMv8m_main \
189   isa_bit_armv5te, \
190   isa_bit_cmse, \
191   isa_bit_armv5t, \
192   isa_bit_thumb2, \
193   isa_bit_thumb, \
194   isa_bit_be8, \
195   isa_bit_armv4, \
196   isa_bit_armv6, \
197   isa_bit_armv7, \
198   isa_bit_armv8, \
199   isa_bit_tdiv
200 
201 #define ISA_ARMv8m_base \
202   isa_bit_tdiv, \
203   isa_bit_armv5te, \
204   isa_bit_cmse, \
205   isa_bit_thumb, \
206   isa_bit_armv5t, \
207   isa_bit_be8, \
208   isa_bit_armv4, \
209   isa_bit_armv6, \
210   isa_bit_armv8
211 
212 #define ISA_FPv5 \
213   isa_bit_fp16conv, \
214   isa_bit_fpv5, \
215   isa_bit_vfpv2, \
216   isa_bit_vfpv3, \
217   isa_bit_vfpv4
218 
219 #define ISA_ARMv7r \
220   isa_bit_tdiv, \
221   isa_bit_armv5te, \
222   isa_bit_be8, \
223   isa_bit_notm, \
224   isa_bit_armv4, \
225   isa_bit_armv6, \
226   isa_bit_armv7, \
227   isa_bit_thumb2, \
228   isa_bit_thumb, \
229   isa_bit_armv5t, \
230   isa_bit_armv6k
231 
232 #define ISA_ARMv8_3a \
233   isa_bit_thumb, \
234   isa_bit_tdiv, \
235   isa_bit_lpae, \
236   isa_bit_notm, \
237   isa_bit_sec, \
238   isa_bit_armv5t, \
239   isa_bit_armv6k, \
240   isa_bit_thumb2, \
241   isa_bit_armv4, \
242   isa_bit_armv6, \
243   isa_bit_armv7, \
244   isa_bit_armv8, \
245   isa_bit_adiv, \
246   isa_bit_mp, \
247   isa_bit_armv8_1, \
248   isa_bit_armv8_2, \
249   isa_bit_armv8_3, \
250   isa_bit_crc32, \
251   isa_bit_be8, \
252   isa_bit_armv5te
253 
254 #define ISA_ALL_SIMD_EXTERNAL \
255   isa_bit_fp16fml, \
256   isa_bit_dotprod, \
257   isa_bit_i8mm
258 
259 #define ISA_VFPv2 \
260   isa_bit_vfpv2
261 
262 #define ISA_FP_DBL \
263   isa_bit_fp_dbl
264 
265 #define ISA_VFPv3 \
266   isa_bit_vfpv2, \
267   isa_bit_vfpv3
268 
269 #define ISA_VFPv4 \
270   isa_bit_fp16conv, \
271   isa_bit_vfpv2, \
272   isa_bit_vfpv3, \
273   isa_bit_vfpv4
274 
275 #define ISA_ARMv7ve \
276   isa_bit_armv4, \
277   isa_bit_armv6, \
278   isa_bit_armv7, \
279   isa_bit_tdiv, \
280   isa_bit_mp, \
281   isa_bit_lpae, \
282   isa_bit_be8, \
283   isa_bit_notm, \
284   isa_bit_adiv, \
285   isa_bit_thumb, \
286   isa_bit_thumb2, \
287   isa_bit_armv5te, \
288   isa_bit_armv5t, \
289   isa_bit_armv6k, \
290   isa_bit_sec
291 
292 #define ISA_ARMv4t \
293   isa_bit_notm, \
294   isa_bit_thumb, \
295   isa_bit_armv4
296 
297 #define ISA_ARMv6j \
298   isa_bit_notm, \
299   isa_bit_armv5te, \
300   isa_bit_be8, \
301   isa_bit_thumb, \
302   isa_bit_armv4, \
303   isa_bit_armv6, \
304   isa_bit_armv5t
305 
306 #define ISA_ALL_FP \
307   isa_bit_fp_d32, \
308   isa_bit_neon, \
309   isa_bit_dotprod, \
310   isa_bit_vfpv2, \
311   isa_bit_vfpv3, \
312   isa_bit_vfpv4, \
313   isa_bit_fpv5, \
314   isa_bit_fp16conv, \
315   isa_bit_fp16fml, \
316   isa_bit_crypto, \
317   isa_bit_i8mm, \
318   isa_bit_fp16, \
319   isa_bit_fp_dbl, \
320   isa_bit_bf16
321 
322 #define ISA_ARMv6k \
323   isa_bit_thumb, \
324   isa_bit_armv5te, \
325   isa_bit_armv4, \
326   isa_bit_armv6, \
327   isa_bit_notm, \
328   isa_bit_armv5t, \
329   isa_bit_be8, \
330   isa_bit_armv6k
331 
332 #define ISA_FP_D32 \
333   isa_bit_fp_d32, \
334   isa_bit_fp_dbl
335 
336 #define ISA_ALL_QUIRKS \
337   isa_bit_quirk_cm3_ldrd, \
338   isa_bit_quirk_vlldm, \
339   isa_bit_xscale, \
340   isa_bit_quirk_no_asmcpu, \
341   isa_bit_quirk_armv6kz, \
342   isa_bit_quirk_no_volatile_ce
343 
344 #define ISA_ARMv8_5a \
345   isa_bit_predres, \
346   isa_bit_armv5te, \
347   isa_bit_sec, \
348   isa_bit_tdiv, \
349   isa_bit_armv4, \
350   isa_bit_armv6, \
351   isa_bit_armv7, \
352   isa_bit_armv8, \
353   isa_bit_armv5t, \
354   isa_bit_mp, \
355   isa_bit_armv6k, \
356   isa_bit_thumb2, \
357   isa_bit_lpae, \
358   isa_bit_notm, \
359   isa_bit_crc32, \
360   isa_bit_sb, \
361   isa_bit_be8, \
362   isa_bit_adiv, \
363   isa_bit_thumb, \
364   isa_bit_armv8_1, \
365   isa_bit_armv8_2, \
366   isa_bit_armv8_3, \
367   isa_bit_armv8_4, \
368   isa_bit_armv8_5
369 
370 #define ISA_ARMv8a \
371   isa_bit_armv5t, \
372   isa_bit_armv6k, \
373   isa_bit_thumb2, \
374   isa_bit_tdiv, \
375   isa_bit_sec, \
376   isa_bit_mp, \
377   isa_bit_lpae, \
378   isa_bit_notm, \
379   isa_bit_armv4, \
380   isa_bit_armv6, \
381   isa_bit_armv7, \
382   isa_bit_armv8, \
383   isa_bit_adiv, \
384   isa_bit_armv5te, \
385   isa_bit_be8, \
386   isa_bit_thumb
387 
388 #define ISA_ARMv6m \
389   isa_bit_armv5te, \
390   isa_bit_thumb, \
391   isa_bit_armv5t, \
392   isa_bit_armv4, \
393   isa_bit_armv6, \
394   isa_bit_be8
395 
396 #define ISA_ALL_FPU_INTERNAL \
397   isa_bit_crypto, \
398   isa_bit_neon, \
399   isa_bit_fp_dbl, \
400   isa_bit_fp_d32, \
401   isa_bit_fp16conv, \
402   isa_bit_fpv5, \
403   isa_bit_vfpv2, \
404   isa_bit_vfpv3, \
405   isa_bit_vfpv4
406 
407 #define ISA_IGNORE_FOR_MULTILIB \
408   isa_bit_cdecp0, \
409   isa_bit_cdecp1, \
410   isa_bit_cdecp2, \
411   isa_bit_cdecp3, \
412   isa_bit_cdecp4, \
413   isa_bit_cdecp5, \
414   isa_bit_cdecp6, \
415   isa_bit_cdecp7
416 
417 #define ISA_ARMv5tej \
418   isa_bit_armv5t, \
419   isa_bit_armv4, \
420   isa_bit_notm, \
421   isa_bit_armv5te, \
422   isa_bit_thumb
423 
424 #define ISA_ALL_SIMD \
425   isa_bit_i8mm, \
426   isa_bit_fp_d32, \
427   isa_bit_fp16fml, \
428   isa_bit_neon, \
429   isa_bit_dotprod, \
430   isa_bit_crypto
431 
432 #define ISA_MVE \
433   isa_bit_mve, \
434   isa_bit_armv7em
435 
436 #define ISA_ARMv8_2a \
437   isa_bit_mp, \
438   isa_bit_thumb, \
439   isa_bit_be8, \
440   isa_bit_armv5t, \
441   isa_bit_tdiv, \
442   isa_bit_armv6k, \
443   isa_bit_armv8_1, \
444   isa_bit_armv8_2, \
445   isa_bit_thumb2, \
446   isa_bit_lpae, \
447   isa_bit_notm, \
448   isa_bit_armv4, \
449   isa_bit_armv6, \
450   isa_bit_armv7, \
451   isa_bit_armv8, \
452   isa_bit_armv5te, \
453   isa_bit_sec, \
454   isa_bit_crc32, \
455   isa_bit_adiv
456 
457 #define ISA_NEON \
458   isa_bit_fp_dbl, \
459   isa_bit_fp_d32, \
460   isa_bit_neon
461 
462 #define ISA_ARMv5te \
463   isa_bit_thumb, \
464   isa_bit_armv4, \
465   isa_bit_notm, \
466   isa_bit_armv5t, \
467   isa_bit_armv5te
468 
469 #define ISA_ARMv4 \
470   isa_bit_armv4, \
471   isa_bit_notm
472 
473 #define ISA_ARMv8_1m_main \
474   isa_bit_thumb2, \
475   isa_bit_armv5te, \
476   isa_bit_thumb, \
477   isa_bit_tdiv, \
478   isa_bit_cmse, \
479   isa_bit_be8, \
480   isa_bit_armv4, \
481   isa_bit_armv8_1m_main, \
482   isa_bit_armv6, \
483   isa_bit_armv7, \
484   isa_bit_armv8, \
485   isa_bit_armv5t
486 
487 #define ISA_ARMv6 \
488   isa_bit_armv5t, \
489   isa_bit_armv4, \
490   isa_bit_armv6, \
491   isa_bit_be8, \
492   isa_bit_thumb, \
493   isa_bit_armv5te, \
494   isa_bit_notm
495 
496 #define ISA_ARMv7 \
497   isa_bit_thumb2, \
498   isa_bit_be8, \
499   isa_bit_thumb, \
500   isa_bit_armv4, \
501   isa_bit_armv6, \
502   isa_bit_armv7, \
503   isa_bit_armv5te, \
504   isa_bit_armv5t
505 
506 #define ISA_ARMv6zk \
507   isa_bit_armv4, \
508   isa_bit_armv6, \
509   isa_bit_armv5te, \
510   isa_bit_notm, \
511   isa_bit_thumb, \
512   isa_bit_armv5t, \
513   isa_bit_armv6k, \
514   isa_bit_be8
515 
516 #define ISA_ARMv6kz \
517   isa_bit_armv5t, \
518   isa_bit_armv6k, \
519   isa_bit_thumb, \
520   isa_bit_notm, \
521   isa_bit_quirk_armv6kz, \
522   isa_bit_be8, \
523   isa_bit_armv4, \
524   isa_bit_armv6, \
525   isa_bit_armv5te
526 
527 #define ISA_ARMv6z \
528   isa_bit_notm, \
529   isa_bit_armv4, \
530   isa_bit_armv6, \
531   isa_bit_armv5te, \
532   isa_bit_thumb, \
533   isa_bit_be8, \
534   isa_bit_armv5t
535 
536 #define ISA_ARMv8r \
537   isa_bit_adiv, \
538   isa_bit_armv5te, \
539   isa_bit_armv4, \
540   isa_bit_armv6, \
541   isa_bit_armv7, \
542   isa_bit_armv8, \
543   isa_bit_mp, \
544   isa_bit_be8, \
545   isa_bit_tdiv, \
546   isa_bit_lpae, \
547   isa_bit_notm, \
548   isa_bit_thumb, \
549   isa_bit_armv5t, \
550   isa_bit_armv6k, \
551   isa_bit_thumb2, \
552   isa_bit_sec
553 
554 #define ISA_FP_ARMv8 \
555   isa_bit_fpv5, \
556   isa_bit_vfpv2, \
557   isa_bit_vfpv3, \
558   isa_bit_vfpv4, \
559   isa_bit_fp16conv, \
560   isa_bit_fp_dbl, \
561   isa_bit_fp_d32
562 
563 #define ISA_ALL_SIMD_INTERNAL \
564   isa_bit_neon, \
565   isa_bit_crypto, \
566   isa_bit_fp_d32
567 
568 #define ISA_ARMv8_4a \
569   isa_bit_thumb, \
570   isa_bit_mp, \
571   isa_bit_armv5te, \
572   isa_bit_adiv, \
573   isa_bit_be8, \
574   isa_bit_armv4, \
575   isa_bit_armv6, \
576   isa_bit_armv7, \
577   isa_bit_armv8, \
578   isa_bit_armv5t, \
579   isa_bit_armv6k, \
580   isa_bit_thumb2, \
581   isa_bit_crc32, \
582   isa_bit_tdiv, \
583   isa_bit_sec, \
584   isa_bit_armv8_1, \
585   isa_bit_armv8_2, \
586   isa_bit_armv8_3, \
587   isa_bit_armv8_4, \
588   isa_bit_lpae, \
589   isa_bit_notm
590 
591 #define ISA_ARMv7a \
592   isa_bit_armv5t, \
593   isa_bit_thumb, \
594   isa_bit_armv6k, \
595   isa_bit_thumb2, \
596   isa_bit_be8, \
597   isa_bit_armv4, \
598   isa_bit_armv6, \
599   isa_bit_armv7, \
600   isa_bit_armv5te, \
601   isa_bit_notm
602 
603 #define ISA_ARMv6t2 \
604   isa_bit_notm, \
605   isa_bit_armv4, \
606   isa_bit_armv6, \
607   isa_bit_armv5te, \
608   isa_bit_armv5t, \
609   isa_bit_thumb2, \
610   isa_bit_be8, \
611   isa_bit_thumb
612 
613 #define ISA_ARMv7em \
614   isa_bit_armv4, \
615   isa_bit_armv6, \
616   isa_bit_armv7, \
617   isa_bit_be8, \
618   isa_bit_armv5t, \
619   isa_bit_armv7em, \
620   isa_bit_thumb2, \
621   isa_bit_armv5te, \
622   isa_bit_thumb, \
623   isa_bit_tdiv
624 
625 struct fbit_implication {
626   /* Represents a feature implication, where:
627      ante IMPLIES cons
628      meaning that if ante is enabled then we should
629      also implicitly enable cons.  */
630   enum isa_feature ante;
631   enum isa_feature cons;
632 };
633 
634 static const struct fbit_implication all_implied_fbits[] =
635 {
636   { isa_bit_vfpv2, isa_bit_vfp_base },
637   { isa_bit_vfpv3, isa_bit_vfp_base },
638   { isa_bit_vfpv4, isa_bit_vfp_base },
639   { isa_bit_fp16, isa_bit_vfp_base },
640   { isa_bit_fp16conv, isa_bit_vfp_base },
641   { isa_bit_mve, isa_bit_vfp_base },
642   { isa_bit_fp_d32, isa_bit_vfp_base },
643   { isa_bit_fp16fml, isa_bit_vfp_base },
644   { isa_bit_i8mm, isa_bit_vfp_base },
645   { isa_bit_dotprod, isa_bit_vfp_base },
646   { isa_bit_crypto, isa_bit_vfp_base },
647   { isa_bit_bf16, isa_bit_vfp_base },
648   { isa_bit_fp_dbl, isa_bit_vfp_base },
649   { isa_bit_armv7em, isa_bit_vfp_base },
650   { isa_bit_neon, isa_bit_vfp_base },
651   { isa_bit_mve_float, isa_bit_vfp_base },
652   { isa_bit_fpv5, isa_bit_vfp_base },
653   { isa_nobit, isa_nobit }
654 };
655 
656