/* Control debugging information emitted in this file. */
static bool csky_debug = false;
-static struct reggroup *cr_reggroup;
-static struct reggroup *fr_reggroup;
-static struct reggroup *vr_reggroup;
-static struct reggroup *mmu_reggroup;
-static struct reggroup *prof_reggroup;
+static const reggroup *cr_reggroup;
+static const reggroup *fr_reggroup;
+static const reggroup *vr_reggroup;
+static const reggroup *mmu_reggroup;
+static const reggroup *prof_reggroup;
/* Convenience function to print debug messages in prologue analysis. */
/* i386 register groups. In addition to the normal groups, add "mmx"
and "sse". */
-static struct reggroup *i386_sse_reggroup;
-static struct reggroup *i386_mmx_reggroup;
+static const reggroup *i386_sse_reggroup;
+static const reggroup *i386_mmx_reggroup;
static void
i386_init_reggroups (void)
\f
/* The m32c tdep structure. */
-static struct reggroup *m32c_dma_reggroup;
+static const reggroup *m32c_dma_reggroup;
/* The type of a function that moves the value of REG between CACHE or
BUF --- in either direction. */
/* 68HC11/68HC12 register groups.
Identify real hard registers and soft registers used by gcc. */
-static struct reggroup *m68hc11_soft_reggroup;
-static struct reggroup *m68hc11_hard_reggroup;
+static const reggroup *m68hc11_soft_reggroup;
+static const reggroup *m68hc11_hard_reggroup;
static void
m68hc11_init_reggroups (void)
/* Custom register groups for the MeP. */
-static struct reggroup *mep_csr_reggroup; /* control/special */
-static struct reggroup *mep_cr_reggroup; /* coprocessor general-purpose */
-static struct reggroup *mep_ccr_reggroup; /* coprocessor control */
+static const reggroup *mep_csr_reggroup; /* control/special */
+static const reggroup *mep_cr_reggroup; /* coprocessor general-purpose */
+static const reggroup *mep_ccr_reggroup; /* coprocessor control */
static int
}
\f
/* NDS32 register groups. */
-static struct reggroup *nds32_cr_reggroup;
-static struct reggroup *nds32_ir_reggroup;
-static struct reggroup *nds32_mr_reggroup;
-static struct reggroup *nds32_dr_reggroup;
-static struct reggroup *nds32_pfr_reggroup;
-static struct reggroup *nds32_hspr_reggroup;
-static struct reggroup *nds32_dmar_reggroup;
-static struct reggroup *nds32_racr_reggroup;
-static struct reggroup *nds32_idr_reggroup;
-static struct reggroup *nds32_secur_reggroup;
+static const reggroup *nds32_cr_reggroup;
+static const reggroup *nds32_ir_reggroup;
+static const reggroup *nds32_mr_reggroup;
+static const reggroup *nds32_dr_reggroup;
+static const reggroup *nds32_pfr_reggroup;
+static const reggroup *nds32_hspr_reggroup;
+static const reggroup *nds32_dmar_reggroup;
+static const reggroup *nds32_racr_reggroup;
+static const reggroup *nds32_idr_reggroup;
+static const reggroup *nds32_secur_reggroup;
static void
nds32_init_reggroups (void)
enum reggroup_type type;
};
-struct reggroup *
+const reggroup *
reggroup_new (const char *name, enum reggroup_type type)
{
struct reggroup *group = XNEW (struct reggroup);
/* See reggroups.h. */
-struct reggroup *
+const reggroup *
reggroup_gdbarch_new (struct gdbarch *gdbarch, const char *name,
enum reggroup_type type)
{
{
/* Add GROUP to the list of register groups. */
- void add (struct reggroup *group)
+ void add (const reggroup *group)
{
gdb_assert (group != nullptr);
gdb_assert (std::find (m_groups.begin(), m_groups.end(), group)
/* Add GROUP to the list of register groups for GDBARCH. */
void
-reggroup_add (struct gdbarch *gdbarch, struct reggroup *group)
+reggroup_add (struct gdbarch *gdbarch, const reggroup *group)
{
struct reggroups *groups
= (struct reggroups *) gdbarch_data (gdbarch, reggroups_data);
extern struct reggroup *const restore_reggroup;
/* Create a new local register group. */
-extern struct reggroup *reggroup_new (const char *name,
- enum reggroup_type type);
+extern const reggroup *reggroup_new (const char *name,
+ enum reggroup_type type);
+
/* Create a new register group allocated onto the gdbarch obstack. */
-extern struct reggroup *reggroup_gdbarch_new (struct gdbarch *gdbarch,
- const char *name,
- enum reggroup_type type);
+extern const reggroup *reggroup_gdbarch_new (struct gdbarch *gdbarch,
+ const char *name,
+ enum reggroup_type type);
/* Add a register group (with attribute values) to the pre-defined list. */
-extern void reggroup_add (struct gdbarch *gdbarch, struct reggroup *group);
+extern void reggroup_add (struct gdbarch *gdbarch, const reggroup *group);
/* Register group attributes. */
extern const char *reggroup_name (const struct reggroup *reggroup);
/* RISC-V specific register group for CSRs. */
-static reggroup *csr_reggroup = NULL;
+static const reggroup *csr_reggroup = nullptr;
/* Callback function for user_reg_add. */
_("invalid register number %d"), regnum);
}
-static struct reggroup *xtensa_ar_reggroup;
-static struct reggroup *xtensa_user_reggroup;
-static struct reggroup *xtensa_vectra_reggroup;
-static struct reggroup *xtensa_cp[XTENSA_MAX_COPROCESSOR];
+static const reggroup *xtensa_ar_reggroup;
+static const reggroup *xtensa_user_reggroup;
+static const reggroup *xtensa_vectra_reggroup;
+static const reggroup *xtensa_cp[XTENSA_MAX_COPROCESSOR];
static void
xtensa_init_reggroups (void)