Skip to content

Commit

Permalink
Constify TriCore
Browse files Browse the repository at this point in the history
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
  • Loading branch information
rth7680 committed Jan 15, 2024
1 parent 6ac231f commit ba047cb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions arch/TriCore/TriCoreMapping.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

#include "TriCoreGenInstrInfo.inc"

static insn_map insns[] = {
static const insn_map insns[] = {
// dummy item
{ 0,
0,
Expand All @@ -39,7 +39,7 @@ void TriCore_get_insn_id(cs_struct *h, cs_insn *insn, unsigned int id)
}

#ifndef CAPSTONE_DIET
static tricore_reg flag_regs[] = { TRICORE_REG_PSW };
static const tricore_reg flag_regs[] = { TRICORE_REG_PSW };
#endif // CAPSTONE_DIET

static inline void check_updates_flags(MCInst *MI)
Expand Down Expand Up @@ -72,14 +72,14 @@ void TriCore_set_instr_map_data(MCInst *MI)

#ifndef CAPSTONE_DIET

static const char *insn_names[] = {
static const char * const insn_names[] = {
NULL,

#include "TriCoreGenCSMappingInsnName.inc"
};

// special alias insn
static name_map alias_insn_names[] = { { 0, NULL } };
static const name_map alias_insn_names[] = { { 0, NULL } };
#endif

const char *TriCore_insn_name(csh handle, unsigned int id)
Expand All @@ -103,7 +103,7 @@ const char *TriCore_insn_name(csh handle, unsigned int id)
}

#ifndef CAPSTONE_DIET
static name_map group_name_maps[] = {
static const name_map group_name_maps[] = {
{ TRICORE_GRP_INVALID, NULL },
{ TRICORE_GRP_CALL, "call" },
{ TRICORE_GRP_JUMP, "jump" },
Expand Down

0 comments on commit ba047cb

Please sign in to comment.