Skip to content

Commit

Permalink
Constify three ARM and AArch64 variables (#2399)
Browse files Browse the repository at this point in the history
* arm: Constify arm_flag_regs

* aarch64: Constify aarch64_flag_regs and aarch64_flag_sys_regs
  • Loading branch information
rth7680 authored Jul 16, 2024
1 parent 404912f commit de5120e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions arch/AArch64/AArch64Mapping.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
#include "AArch64Mapping.h"

#ifndef CAPSTONE_DIET
static aarch64_reg aarch64_flag_regs[] = {
static const aarch64_reg aarch64_flag_regs[] = {
AARCH64_REG_NZCV,
};

static aarch64_sysreg aarch64_flag_sys_regs[] = {
static const aarch64_sysreg aarch64_flag_sys_regs[] = {
AARCH64_SYSREG_NZCV, AARCH64_SYSREG_PMOVSCLR_EL0,
AARCH64_SYSREG_PMOVSSET_EL0, AARCH64_SYSREG_SPMOVSCLR_EL0,
AARCH64_SYSREG_SPMOVSSET_EL0
Expand Down
2 changes: 1 addition & 1 deletion arch/ARM/ARMMapping.c
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ static const char *const insn_name_maps[] = {
#endif

#ifndef CAPSTONE_DIET
static arm_reg arm_flag_regs[] = {
static const arm_reg arm_flag_regs[] = {
ARM_REG_APSR, ARM_REG_APSR_NZCV, ARM_REG_CPSR,
ARM_REG_FPCXTNS, ARM_REG_FPCXTS, ARM_REG_FPEXC,
ARM_REG_FPINST, ARM_REG_FPSCR, ARM_REG_FPSCR_NZCV,
Expand Down

0 comments on commit de5120e

Please sign in to comment.