1 /* Generated automatically by "genstr" from "isa-evolution.in".
2 Please do not edit this file directly.
4 Copyright (C) 2023-2024 Free Software Foundation, Inc.
6 This file is part of GCC.
8 GCC is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3, or (at your option)
13 GCC is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with GCC; see the file COPYING3. If not see
20 <http://www.gnu.org/licenses/>.
23 #ifndef LOONGARCH_EVOLUTION_H
24 #define LOONGARCH_EVOLUTION_H
26 #if !defined(IN_LIBGCC2) && !defined(IN_TARGET_LIBS) && !defined(IN_RTS)
30 static constexpr struct {
32 unsigned int cpucfg_bit
;
33 HOST_WIDE_INT isa_evolution_bit
;
35 { 2, 1u << 25, OPTION_MASK_ISA_FRECIPE
},
36 { 2, 1u << 26, OPTION_MASK_ISA_DIV32
},
37 { 2, 1u << 27, OPTION_MASK_ISA_LAM_BH
},
38 { 2, 1u << 28, OPTION_MASK_ISA_LAMCAS
},
39 { 3, 1u << 23, OPTION_MASK_ISA_LD_SEQ_SA
},
42 static constexpr int cpucfg_useful_idx
[] = {
53 static constexpr int N_CPUCFG_WORDS
= 20;
55 /* ISA evolution features */
65 /* Condition macros */
66 #define ISA_HAS_FRECIPE \
67 (la_target.isa.evolution & OPTION_MASK_ISA_FRECIPE)
68 #define ISA_HAS_DIV32 \
69 (la_target.isa.evolution & OPTION_MASK_ISA_DIV32)
70 #define ISA_HAS_LAM_BH \
71 (la_target.isa.evolution & OPTION_MASK_ISA_LAM_BH)
72 #define ISA_HAS_LAMCAS \
73 (la_target.isa.evolution & OPTION_MASK_ISA_LAMCAS)
74 #define ISA_HAS_LD_SEQ_SA \
75 (la_target.isa.evolution & OPTION_MASK_ISA_LD_SEQ_SA)
77 /* Bitmasks on la_target.isa.evolution. */
78 extern int la_evo_feature_masks
[N_EVO_FEATURES
];
80 /* Builtin macro names for the evolution features. */
81 extern const char* la_evo_macro_name
[N_EVO_FEATURES
];
83 /* The ISA version where a specific feature is introduced. */
84 extern int la_evo_version_major
[N_EVO_FEATURES
];
85 extern int la_evo_version_minor
[N_EVO_FEATURES
];
89 #endif /* LOONGARCH_EVOLUTION_H */